. Advertisement .
..3..
. Advertisement .
..4..
WebDriver is an open source program for testing web applications automatically in a variety of browsers. It has functions for accessing web pages, user input, running JavaScript, and more. The W3C WebDriver standard is implemented by ChromeDriver, a standalone server. ChromeDriver is appropriate for Chrome on the Desktop ( such as Mac, Windows, Linux and ChromeOS) and Chrome on Android. Both the language bindings and the actual implementations of the unique browser controlling code are referred to as Selenium WebDriver. Commonly, this is referred to as WebDriver. In spite of such benefits, sometimes WebDriver One raises an error. One such error that might be coming up is the “selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed”. Let’s learn how you can solve this through this blog.
What is the error “selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed”?
When attempting to utilize Selenium Webdriver, the browser instance doesn’t start and you might get the following error.
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)
According to the message, the ChromeDriver was unable to start/spawn a new WebBrowser session, or Chrome Browser session. The Chrome browser is not installed in the system’s default location, which is the main problem you have.
ChromeDriver, the server, requires that you have Chrome installed in the system’s default location as shown in the following picture:
......... ADVERTISEMENT .........
..8..

The ChromeDriver requests that /usr/bin/google-chrome on Linux platforms will be a symlink to the genuine Chrome binary.
Tips On Solving The Error “selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed”
Option 1: Utilize this approach
To solve “selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed” error, you can do as the following example:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.binary_location = "C:\\path\\to\\your\\chrome.exe" #chrome binary location
specified here
options.add_argument("--start-maximized") #open Browser in maximized mode
options.add_argument("--no-sandbox") #bypass OS security model
options.add_argument("--disable-dev-shm-usage") #overcome limited resource problems
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options, executable_path=r'C:\path\to\chromedriver.exe')
driver.get('http://google.com/')
Option 2: Download the latest Chrome driver version that corresponds to your browser’s version.
Firstly, check the version of your Chrome browser. Simply download the chrome driver version that corresponds to your Chrome version from this link. Simply copy and paste the code below.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('your-chrome-driver-path',chrome_options=chrome_options)
d.get('https://www.google.nl/')
Conclusion
The error “selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed” is a confusing error message. We hope this blog has helped clear the air around what this error message means and how to solve it. If you have more questions about this issue, please leave a comment below. Thank you for reading; we are always excited when one of our posts can provide useful information on a topic like this!
Read more
Leave a comment