I can't get Chromedriver to run in a Docker, and it seems I'm passing everything as needed, but it still throws the 'root with sandbox' error and quits.
2019-02-15 15:30:22 INFO : Using chromedriver set in webdriver.chrome.driver: /usr/bin/google-chrome
2019-02-15 15:30:22 INFO : Setting ChromeDriver options {browserName=chrome, goog:chromeOptions={args=[--start-maximized, headless, --no-sandbox], extensions=[], prefs={profile.default_content_settings.popups=0, download.prompt_for_download=false, download.default_directory=/home/jenkins/workspace/..../}}}
[1036:1036:0215/153022.769651:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Feb 15, 2019 3:30:42 PM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Failure in before hook:Hooks.getDriver(Scenario)
I've logged the ChromeOptions content and it's clear args
contains --no-sandbox
- What could be the problem here?
- Google Chrome 70.0.3538.77
- org.seleniumhq.selenium:selenium-chrome-driver:jar: 3.141.59
Similar to How to run selenium chromedriver as root? (not working even with --no-sandbox but that was solved by a Python dependency - this is a Java project.
I've also added -Dwebdriver.chrome.args="--no-sandbox"
to the Maven command.