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.78k stars 239 forks source link

Chrome fails to load web page and crashes due to net::ERR_INSUFFICIENT_RESOURCES #222

Open mflorea opened 1 year ago

mflorea commented 1 year ago

Describe the bug

I've been using the zenika/alpine-chrome:latest image without any issue for almost 1 year but today I had to clear (prune) the Docker images I have locally and the new fetched image stopped working correctly. My code hasn't changed so this is clearly a regression on the Chrome image side. I then run my code with the zenika/alpine-chrome:102 image and everything was fine. So the problem seems to be with the latest 108 tag.

To Reproduce

Steps to reproduce the behavior:

  1. I have these images:
    REPOSITORY             TAG       IMAGE ID       CREATED       SIZE
    zenika/alpine-chrome   latest    c70655f95a7e   2 days ago    439MB
    zenika/alpine-chrome   102       fdcfb5e17b3e   3 weeks ago   405MB
  2. I create a start the docker container, which leads to:
    zenika/alpine-chrome:latest   "chromium-browser --headless --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222"
    zenika/alpine-chrome:102   "chromium-browser --headless --use-gl=swiftshader --disable-software-rasterizer --disable-dev-shm-usage --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222"

    Notice that the command line parameters passed to Chrome are different between the two images, most probably related to https://github.com/Zenika/alpine-chrome/commit/a80c4e3e68080bc9f8f090bb1021642b085d70e9 .

  3. Open http://localhost:9222/json with the local instance of Chrome to connect remotely to the Chrome instance from the Docker container
  4. Open something like http://localhost:9222/devtools/inspector.html?ws=localhost:9222/devtools/page/86DA8B8B16A870375D36C324EB4D0FA9 with the local instance of Chrome to connect remotely to the Chrome tab
  5. Load https://github.com/Zenika/alpine-chrome in the remote Chrome tab

What is the expected behavior?

The web page is loaded fine.

What is the actual behavior?

The web page is loaded fine with the 102 tag but crashes the Chrome browser (with lots of net::ERR_INSUFFICIENT_RESOURCES) when the latest (108) tag is used.

Versions

Docker Engine: 20.10.22

RoSk0 commented 1 year ago

I might have facing the same issue.

At the moment a pinned a problem down to the this image version. Tag 100 confirmed to work. Running test pipelines at the moment to get actual logs on 102 and 108 tags.

Thanks for details @mflorea !

RoSk0 commented 1 year ago

With the flags from environment variable CHROMIUM_FLAGS added to the start command I see way less errors on 108 tagged image and my test suite passes with browser crash. So I believe that https://github.com/Zenika/alpine-chrome/commit/a80c4e3e68080bc9f8f090bb1021642b085d70e9 commit should be reverted.

fran6k commented 1 year ago

i face the same issue both tag 102 and latest :( 。but happen occasionally。