Zenika / alpine-chrome

Chrome Headless docker images built upon alpine official image
https://hub.docker.com/r/zenika/alpine-chrome
Apache License 2.0
1.82k stars 241 forks source link

WebGL is not working #203

Closed efournival closed 1 year ago

efournival commented 2 years ago

Describe the bug WebGL is not working out of the box.

To Reproduce Steps to reproduce the behavior:

docker run -p 9222:9222 zenika/alpine-chrome --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222

Output:

[0530/181215.015079:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0530/181215.015127:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0530/181215.015407:WARNING:dns_config_service_linux.cc(428)] Failed to read DnsConfig.

DevTools listening on ws://0.0.0.0:9222/devtools/browser/7592fc77-7117-4f29-a380-8973a30df6ae
[0530/181215.016587:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[0530/181215.017551:ERROR:egl_util.cc(74)] Failed to load GLES library: /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0530/181215.018593:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
[0530/181215.023259:ERROR:egl_util.cc(74)] Failed to load GLES library: /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0530/181215.024226:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
[0530/181215.027839:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is disabled, ANGLE is

What is the expected behavior? No error, able to render a WebGL canvas.

What is the actual behavior? Errors, cannot render a WebGL canvas.

Versions

Software Version(s) How-to
Chromium Chromium 101.0.4951.64 docker container run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version
Image zenika/alpine-chrome@sha256:eede72416a1edfeed4e1ba85e99c9e9233187db38c98f3384657cbd42e413545 docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome
Docker Engine 20.10.16 docker version
FukeKazki commented 1 year ago

I I'm facing this problem also. image: zenika/alpine-chrome:102-with-node-16 karma error: Uncaught Error: your browser not support webgl thrown

efournival commented 1 year ago

For those still having this issue, I started using another Chrome image: https://github.com/chromedp/chromedp I opened this issue: https://github.com/chromedp/chromedp/issues/1073 A solution has been found and I'm using that in a production environment.

zigarn commented 1 year ago

@efournival @FukeKazki can you test the docker image zenika/alpine-chrome:test-web-gl?

LegendWojciechPolowniak commented 1 year ago

@zigarn that did resolve the issue for me - thank you.