Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium hangs in a non-npm environment #55

Closed
chx opened this issue Feb 9, 2023 · 0 comments · Fixed by #76
Closed

Chromium hangs in a non-npm environment #55

chx opened this issue Feb 9, 2023 · 0 comments · Fixed by #76
Labels
bug Something isn't working

Comments

@chx
Copy link

chx commented Feb 9, 2023

Environment

https://github.com/Sparticuz/chromium/raw/29ee254e56699485903d0df8beda04c1e9caa516/bin/chromium.br

Expected Behavior

My script works because it does work with the old one https://github.com/Sparticuz/chrome-aws-lambda/raw/2fb71eb0ca2e08292973efe3ca59182debbbffc8/bin/chromium.br

Current Behavior

Just hangs there.

Steps to Reproduce

https://stackoverflow.com/q/75393408/308851

I can provide my actual Dockerfile if necessary , here's the install-chrome.sh script:

#!/usr/bin/bash

set -e

cd /tmp
#curl -sL https://github.com/Sparticuz/chrome-aws-lambda/raw/2fb71eb0ca2e08292973efe3ca59182debbbffc8/bin/chromium.br > chromium.br
curl -sL https://github.com/Sparticuz/chromium/raw/29ee254e56699485903d0df8beda04c1e9caa516/bin/chromium.br > chromium.br
curl -sL https://github.com/Sparticuz/chromium/raw/29ee254e56699485903d0df8beda04c1e9caa516/bin/swiftshader.tar.br > swiftshader.tar.br
brotli -d chromium.br
brotli -d swiftshader.tar.br
mv chromium /usr/bin/google-chrome
chmod +x /usr/bin/google-chrome
yum -q -y install tar
tar xf swiftshader.tar --directory /usr/bin/
#CHROMEVERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE_106.0.5249)
CHROMEVERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE_110.0.5481)
curl -s https://chromedriver.storage.googleapis.com/$CHROMEVERSION/chromedriver_linux64.zip > chromedriver_linux64.zip
unzip chromedriver_linux64.zip -d /opt/bin/
rm chromium.br chromedriver_linux64.zip

as you can see I tried to swiftshader, it wasn't helping much. I tried download the aws.tar.br and copying it into /usr/lib64, doesn't help either.

This is the verbose output from chromedriver

[1675969500.086][INFO]: Launching chrome: /usr/bin/google-chrome --allow-pre-commit-input --data-path=/tmp/chrome/3 --disable-background-networking --disa
ble-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-
prompt-on-repost --disable-sync --disk-cache-dir=/tmp/chrome/4 --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging=stderr --log-level
=0 --no-first-run --no-sandbox --no-service-autorun --no-zygote --password-store=basic --remote-debugging-port=0 --single-process --test-type=webdriver --
use-mock-keychain --user-data-dir=/tmp/chrome/2

DevTools listening on ws://127.0.0.1:46315/devtools/browser/d237e0d1-d384-4afc-bcfd-de51f2c203ea
[1675969500.139][DEBUG]: DevTools HTTP Request: http://localhost:46315/json/version
[1675969500.144][DEBUG]: DevTools HTTP Response: {
   "Browser": "HeadlessChrome/110.0.5478.0",
   "Protocol-Version": "1.3",
   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/110.0.5478.0 Safari/537.36",
   "V8-Version": "11.0.220",
   "WebKit-Version": "537.36 (@9979ee28bf4ee15e703bac226a967208387d9a6d)",
   "webSocketDebuggerUrl": "ws://localhost:46315/devtools/browser/d237e0d1-d384-4afc-bcfd-de51f2c203ea"
}

[1675969500.144][DEBUG]: DevTools HTTP Request: http://localhost:46315/json/list
[1675969500.148][DEBUG]: DevTools HTTP Response: [  ]

Last two lines repeat forever.

@chx chx added the bug Something isn't working label Feb 9, 2023
@chx chx changed the title Chromium hangs Chromium hangs in a non-npm environment Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant