问题
Running TestNG scripts through docker container with standlone-chrome image, at the container level chrome fails to start in Linux machine.
capablities also includes : --disable-dev-shm-usage",--no-sandbox,--headless.
I tried updating the chrome driver but still didn't worked.
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
回答1:
StackOverflow newbie here. Sharing the version of Chrome/ChromeDriver under discussion would help. In any case, we back-leveled to Chrome 78 (+ Driver), and this problem went away. It appears this error "DevToolsActivePort file doesn't exist" was introduced in late builds.
A few gotchas:
- Finding an older release may be problematic; we found them here the version that worked for us is Linux_x64_693954_chrome-linux.zip
- The chrome-wrapper script should be renamed to google-chrome
- The chrome_sandbox executable must be renamed chrome-sandbox and chmodded 4755
- Install the matching Chromedriver version 78 (chromedriver_78.0.3904.105)
来源:https://stackoverflow.com/questions/59781412/getting-unknown-error-chrome-failed-to-start-exited-abnormally-unknown-error