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.jsonRUN 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.