Error creating WebGL context in chrome 144.0.0.0

10 views
Skip to first unread message

Nicolas Jourdain

unread,
1:59 PM (4 hours ago) 1:59 PM
to Chromium-dev
Chrome 143 didn't have that error (Error creating WebGL context).

Code throwing the error :
// canvas is an HTMLCanvasElement
new WebGLRenderer({
    canvas,
    alpha: true,
    antialias: true,
    stencil: false,
    powerPreference: 'high-performance',
});

Running with ChromeHeadless with flags --enable-gpu and --use-angle on debian linux (see dockerfile below for more details)

No error when running the same version of chrome on macos

Dockerfile :

# Image used by the CI to run tests
FROM node:22

# https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/linux/debian/dist_package_versions.json
RUN apt-get update && apt-get install -y \
    libasound2 \
    libatk-bridge2.0-0 \
    libatk1.0-0 \
    libatspi2.0-0 \
    libc6 \
    libcairo2 \
    libcups2 \
    libdbus-1-3 \
    libdrm2 \
    libexpat1 \
    libgbm1 \
    libgcc1 \
    libglib2.0-0 \
    libnspr4 \
    libnss3 \
    libpango-1.0-0 \
    libpangocairo-1.0-0 \
    libstdc++6 \
    libuuid1 \
    libx11-6 \
    libx11-xcb1 \
    libxcb-dri3-0 \
    libxcb1 \
    libxcomposite1 \
    libxcursor1 \
    libxdamage1 \
    libxext6 \
    libxfixes3 \
    libxi6 \
    libxkbcommon0 \
    libxrandr2 \
    libxrender1 \
    libxshmfence1 \
    libxss1 \
    libxtst6

ENV CHROME_BIN=/opt/google/chrome/google-chrome
RUN curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
    apt-get update --allow-releaseinfo-change && \
    apt-get -y install ./google-chrome.deb && \
    sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome && \
    rm google-chrome.deb



Disclaimer
The information transmitted, including any attachments, is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, dissemination or other use of this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and immediately delete the material from any electronic device.

Ken Russell

unread,
3:05 PM (2 hours ago) 3:05 PM
to njou...@samasource.org, Chromium-dev, Geoff Lang
Hi Nicolas,

I suspect this is due to the deprecation of SwiftShader and it might be necessary for you to add more command line arguments. Can you try adding --enable-unsafe-swiftshader per https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/swiftshader.md ?

-Ken


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/e1951f96-0739-4eb6-b5a2-2f2e3d647808n%40chromium.org.

Nicolas Jourdain

unread,
4:55 PM (1 hour ago) 4:55 PM
to Chromium-dev, Ken Russell, Chromium-dev, Geoff Lang, njou...@samasource.org

That works, thank you very much!
Reply all
Reply to author
Forward
0 new messages