Docker error DevToolsActivePort file doesn't exist

405 views
Skip to first unread message

Jakob Anderson

unread,
Aug 8, 2022, 12:45:50 AM8/8/22
to Selenium Users
I am running the selenium/standalone-chrome image in docker, and here is the python code. All of the subsequent code using the driver works.

options = webdriver.ChromeOptions()
options.add_argument('--ignore-ssl-errors=yes')
options.add_argument('--ignore-certificate-errors')
driver = webdriver.Remote(
command_executor='http://localhost:4444/wd/hub',
options=options
)

I get the error:
selenium.common.exceptions.SessionNotCreatedException: Message: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

bakki reddy nagendra reddy

unread,
Jan 10, 2023, 10:40:29 PM1/10/23
to Selenium Users
Hi jakoband,
Including below option might solve this issue.
options.add_argument('--headless')

Reply all
Reply to author
Forward
0 new messages