Issue metadata
Sign in to add a comment
|
Chromedriver crashes when using wct
Reported by
thomasmu...@yahoo.com,
Jan 4 2018
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36
Steps to reproduce the problem:
Issue Description:
Hi, when trying to setup chrome in docker using debian stretch. It keeps crashing when using wct.
I am trying to run tests with gerrit and it fails with
Starting Selenium server for local browsers
Selenium server running on port 38377
no bower.json found, defaulting to packageName=tmp.QOCgp0UIx1
chrome 63 Tests failed: {"message":"[get(\"http://localhost:8000/components/tmp.QOCgp0UIx1/generated-index.html?cli_browser_id=0\")] Error response status: 6 Selenium error: no such session
\n (Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.9.49-moby x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration
or timeout: 16 milliseconds\nBuild info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'\nSystem info: hos...
Test run ended in failure: Error: [get("http://localhost:8000/components/tmp.QOCgp0UIx1/generated-index.html?cli_browser_id=0")] Error response status: 6 Selenium error: no such session
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.9.49-moby x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 16 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: '03e948ea2843', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.49-moby', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{message=unknown error: Chrome failed to start: crashed
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.9.49-moby x86_64), platform=ANY}]
Session ID: e17de49fc3c134c6a44f36f5f2b504f7
Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
git clone https://gerrit-review.googlesource.com/#/admin/projects/gerrit-ci-scripts
cd gerrit-ci-scripts
git fetch https://gerrit.googlesource.com/gerrit-ci-scripts refs/changes/11/139511/19 && git cherry-pick FETCH_HEAD
cd jenkins-docker/slave-debia
make build
cd ../slave-bazel
make build
docker run --privileged -it gerritforge/gerrit-ci-slave-bazel bash
export DISPLAY=:1
/usr/bin//Xvfb :1 -screen 0 1024x768x16 -fbdir /home/jenkins/xvfb-38311-3699325632873016508.fbdir -fbdir /tmp &
su jenkins
cd ~/
git clone https://gerrit.googlesource.com/gerrit --recursive
cd gerrit
./polygerrit-ui/app/run_test.sh
-----Other helpful tips:
I coulden't find any logs for this.
I did report this at chromedriver here https://bugs.chromium.org/p/chromedriver/issues/detail?id=2190 .
This bug / regression seems to have started when headless mode was introduced in chrome as we were using chrome fine in 15.04 up until until this dist was discontinued by the chrome team.
Using a non-gui os like debian (if i install gui chrome and chromedriver work, if i doint use a gui headless mode works but if you doint use headless it dosen't.
See
What is the expected behavior?
What went wrong?
the chromedriver is failing to start
Did this work before? N/A
Chrome version: 63.0.3239.108 Channel: stable
OS Version: stretch 9.3
Flash Version:
,
Jan 5 2018
We investigated this issue and found the issue has not been related to Chromedriver. ChromeDriver doesn't need to be involved in the repro.
,
Jan 5 2018
I'll add details how to create the container and launch the Chrome inside the container, which will basically repro the issue.
,
Jan 5 2018
First of all you'll need to install the Docker on your machine. How to install Docker and run docker service on your machine is described in here: https://docs.google.com/document/d/12A18kDIcxg55YVktnG3bz3aWJL1f-0V_v0S4xjz8-8g/edit#heading=h.397bgafuaemt If you have successfully installed Docker and run the service, then 'docker -v' should pop up the docker version. At this point you can run the following steps: 1. git clone https://gerrit.googlesource.com/gerrit-ci-scripts 2. cd /gerrit-ci-scripts/ 2. git fetch https://gerrit.googlesource.com/gerrit-ci-scripts refs/changes/11/139511/19 && git cherry-pick FETCH_HEAD 3. cd jenkins-docker/slave-debian 4. make build 5. cd ../gerrit-ci-scripts/jenkins-docker/master 6. make build 7. cd ../gerrit-ci-scripts/jenkins-docker/slave-bazel/ 8. make build Now you can run into the container as a root user: 9. docker run --privileged -it gerritforge/gerrit-ci-slave-bazel bash You should get the command prompt like the following: root@eb2252767dc1: Which means you have successfully run inside the Docker container. Type the following commands: 10. export DISPLAY=:1 11. /usr/bin/Xvfb :1 -screen 0 1024x768x16 -fbdir /home/jenkins/xvfb-38311-3699325632873016508.fbdir -fbdir /tmp & And now you can launch the Chrome: 12. /opt/google/chrome/google-chrome --no-sandbox You should see Chrome was crashed with the following message: ". Aborted (core dumped) "
,
Jan 5 2018
You should see the following while you launch Chrome in Docker container:
root@eb2252767dc1:/# /opt/google/chrome/google-chrome --no-sandbox
[40:63:0105/185314.925947:ERROR:bus.cc(395)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Xlib: extension "RANDR" missing on display ":1".
[40:81:0105/185314.936508:FATAL:nss_util.cc(632)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted (core dumped)
root@eb2252767dc1:/# [0105/185315.071411:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
,
Jan 5 2018
Thankyou for writing that :).
,
Jan 28 2018
I also contribute to Gerrit Code Review and I also noticed, that
chromedriver stopped working for me in interactive mode. All is fine
in headless mode, but I would like to figure out what is going on in
interactive mode.
Interactive mode doesn't work neither on docker, nor on my desktop,
so these may be different problems.
In any event, I don't have any issue to launch the driver from
python, as you mentioned in this issue:
from selenium import webdriver
driver = webdriver.Chrome(service_args=["--verbose", "--log-path=/home/jenkins/gerrit/chromedriver.log"])
driver.get("https://google.com")
The problem occurs, when I run tests from Bazel.
The toolchain look like this.
Bazel calls web-component-tester
web-component-tester calls wct-local
wct-local calls selenium-standalone
selenium-standalone launches chromedriver and selenium server
Chromedriver is crashing here. Environment:
$ uname -a
Linux wizball 4.14.13-1-default #1 SMP PREEMPT Wed Jan 10 09:14:27 UTC 2018 (bd444a0) x86_64 x86_64 x86_64 GNU/Linux
$ chromedriver --version
ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)
selenium-standalone
$ google-chrome --version
Google Chrome 64.0.3282.119 beta
I havn't found an easy way to force chromedriver.log activation,
so I hard coded it in standalone-selenium and opened this FR: [1]
to simplify it by allowing to provide selenium-java-args option
Now, I see, what is going on (shortened):
[1517161454.564][INFO]: Launching chrome: /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit/tmpa43_4958d8e13a65cf1f/.org.chromium.Chromium.dAYgFD/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12829 --start-maximized --test-type=webdriver --use-mock-keychain --user-data-dir=/home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit/tmpa43_4958d8e13a65cf1f/.org.chromium.Chromium.9aasse data:,
[1517161454.568][SEVERE]: After loading Root Certs, loaded==false: NSS error code: -8018
[1517161514.588][INFO]: RESPONSE InitSession unknown error: Chrome failed to start: crashed
I suspect, that --user-data-dir option messed up. I see this directory and zipped it and upload as attachment to this issue.
[1] https://github.com/Polymer/web-component-tester/issues/676
,
Jan 28 2018
Interesting, further investigation: All directories are sane, and created by Bazel and do exist. Still somehow, chromedriver cannot start. However, during Firefox tests are executed, all Bazel directories still exist, and I just repeated the same command from the command line, and this time, chrome started correctly and all tests were successful: 1. time chromedriver run by selenium and crashed: 1517168736.361][INFO]: Launching chrome: /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit/tmp995_b6bb67660fc01d68/.org.chromium.Chromium.OSiuNS/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12720 --start-maximized --test-type=webdriver --use-mock-keychain --user-data-dir=/home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit/tmp995_b6bb67660fc01d68/.org.chromium.Chromium.cSlncf data:, [1517168736.365][SEVERE]: After loading Root Certs, loaded==false: NSS error code: -8018 2. time I repeated immediately the same command from interactive shell, all is fine, and all tests passes: davido@wizball:~$ /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension=/home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit/tmp995_b6bb67660fc01d68/.org.chromium.Chromium.OSiuNS/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12720 --start-maximized --test-type=webdriver --use-mock-keychain --user-data-dir=/home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit/tmp995_b6bb67660fc01d68/.org.chromium.Chromium.cSlncf data:, [21696:21733:0128/204607.673070:ERROR:nss_util.cc(724)] After loading Root Certs, loaded==false: NSS error code: -8018 DevTools listening on ws://127.0.0.1:12720/devtools/browser/7eff7f48-3c5e-4ed2-bc91-b324f25a6495
,
Jan 28 2018
Could this be a bug in bazel Or chrome?
,
Jun 30 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by sc00335...@techmahindra.com
, Jan 5 2018Components: Tests>WebDriver
Labels: Needs-Triage-M63 Triaged-ET TE-NeedsTriageHelp