question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛 Bug]: selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed.

See original GitHub issue

What happened?

webdriver doesn’t seem be able to start chrome properly. Visually I can’t see any window popping up.

It was working at around Chrome v99.

This bug does NOT happen if I add options.add_argument('--headless'). Anything else like

options.add_argument('--disable-gpu')
options.add_argument('--single-process')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')

does NOT help.

How can we reproduce the issue?

from selenium import webdriver

options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=options)

driver.get('https://example.com')
print(driver.title)
driver.close()

Relevant log output

F:\sync\code\python\_gists>_test5.py
Traceback (most recent call last):
  File "F:\sync\code\python\_gists\_test5.py", line 14, in <module>
    driver = webdriver.Chrome(options=options)
  File "C:\Program Files\Python3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "C:\Program Files\Python3\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 92, in __init__
    RemoteWebDriver.__init__(
  File "C:\Program Files\Python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 275, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Program Files\Python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 365, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Program Files\Python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute
    self.error_handler.check_response(response)
  File "C:\Program Files\Python3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
Backtrace:
        Ordinal0 [0x0126B8F3+2406643]
        Ordinal0 [0x011FAF31+1945393]
        Ordinal0 [0x010EC748+837448]
        Ordinal0 [0x01109994+956820]
        Ordinal0 [0x01105D71+941425]
        Ordinal0 [0x01138EE0+1150688]
        Ordinal0 [0x01138B3A+1149754]
        Ordinal0 [0x01134096+1130646]
        Ordinal0 [0x0110E636+976438]
        Ordinal0 [0x0110F546+980294]
        GetHandleVerifier [0x014D9612+2498066]
        GetHandleVerifier [0x014CC920+2445600]
        GetHandleVerifier [0x01304F2A+579370]
        GetHandleVerifier [0x01303D36+574774]
        Ordinal0 [0x01201C0B+1973259]
        Ordinal0 [0x01206688+1992328]
        Ordinal0 [0x01206775+1992565]
        Ordinal0 [0x0120F8D1+2029777]
        BaseThreadInitThunk [0x752D343D+18]
        RtlInitializeExceptionChain [0x772A9812+99]
        RtlInitializeExceptionChain [0x772A97E5+54]

Operating System

Windows 7

Selenium version

Python 3.8.7 + selenium 4.1.5

What are the browser(s) and version(s) where you see this issue?

Chrome 101.0.4951.67

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 101.0.4951.41 (93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904})

Are you using Selenium Grid?

No

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
fireattackcommented, May 20, 2022

Problem solved after I manually assigned options.binary_location. This seems like a proper solution than just work-around.

Thanks for your reply.

0reactions
github-actions[bot]commented, Jun 21, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message: unknown error: Chrome failed to start: crashed
I was having a problem getting headless Chrome to work on Ubuntu 14.04, it was dying with the same unknown ...
Read more >
unknown error: Chrome failed to start: exited abnormally
"Chrome failed to start: exited abnormally" means that ChromeDriver started Chrome as a subprocess, but then Chrome crashed. It could help you to...
Read more >
Downloads - ChromeDriver - WebDriver for Chrome
Resolved issue 3515: selenium.common.exceptions.WebDriverException: Message: unknown error: bad inspector message. For more details, please see the release ...
Read more >
Message: Unknown Error: Chrome Failed To Start: Crashed
implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session. Your main issue is the Chrome browser is...
Read more >
unknown error: unable to discover open window in chrome
WebDriverException : Message: unknown error: unable to discover open ... raise exception_class(message, screen, stacktrace) selenium.common.exceptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found