Selenium: WebDriverException: unknown error: cannot find Chrome binary
Last verified
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binaryWhat it means
ChromeDriver started, but it could not find a Chrome executable to launch. ChromeDriver looks in the default install locations for your operating system; if Chrome is installed somewhere else, is missing, or the path you supplied is wrong, the session fails with this message before any browser window opens.
It is common on servers and containers where only the driver was installed, on macOS when Chrome lives outside /Applications, on Windows with per-user installs, and on Linux distributions that install Chromium under a different name. Another frequent cause is setting binary_location to a folder instead of the executable file itself.
What is not wrong: the driver and Selenium setup. ChromeDriver is running; it just has nothing to start. If Chrome is present and found but crashes, you would see the DevToolsActivePort error instead.
What it looks like
from selenium import webdriver
options = webdriver.ChromeOptions()
options.binary_location = "/usr/bin/chromium" # the executable, not its folder
driver = webdriver.Chrome(options=options)
# No Chrome installed? Let Selenium Manager fetch Chrome for Testing:
# options.browser_version = "stable"Why it happens
- Chrome is not installed on the machine or container running the driver.
- Chrome or Chromium is installed in a non-default location.
- options.binary_location points to a directory or wrong file rather than the Chrome executable.
- A portable or per-user Chrome install that ChromeDriver does not search.
How to fix it
- Confirm Chrome is installed: google-chrome --version, chromium --version, or check the install folder.
- Point to the executable explicitly: options.binary_location = '/usr/bin/chromium'.
- On macOS use the full path inside the app bundle: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome.
- Let Selenium Manager download Chrome for Testing for you by setting options.browser_version = 'stable' when no browser is installed.
- In Docker, install Chrome in the image or use a selenium/standalone-chrome image.
How to stop it recurring
Make the browser part of the environment definition (Dockerfile, CI image, provisioning script) rather than assuming it exists. When you must use a non-standard install, set binary_location from a single configuration value and validate the path exists at start-up, so a missing browser fails with a clear message.
Official documentation: www.selenium.dev/documentation/webdriver/browsers/chrome/#start-browser-in-a-specified-location. See all Selenium error messages.
Related errors
- Chrome failed to start: DevToolsActivePort file doesn't existselenium.common.exceptions.SessionNotCreatedException: Message: session not…
- NoSuchDriverException: Unable to obtain driver for chromeselenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain…
- This version of ChromeDriver only supports Chrome version Nselenium.common.exceptions.SessionNotCreatedException: Message: session not…
Definitions
- SeleniumSelenium is an open-source browser automation project, best known for Selenium WebDriver, a library that contr
- ChromeDriverChromeDriver is the Chromium project's standalone server that implements the W3C WebDriver standard for Chrome
- CSS SelectorA CSS selector is a pattern used to identify and target specific HTML elements on a web page, widely used in b
- Headless ChromeHeadless Chrome is Google Chrome running without a visible window. It renders pages and runs JavaScript like n
- IframeAn iframe (inline frame) is an HTML element that embeds a separate web page within a parent page, creating an
- Web ElementA web element is any individual component rendered on a web page — buttons, links, input fields, images, text
Quick answers
What does "WebDriverException: unknown error: cannot find Chrome binary" mean in Selenium?
ChromeDriver started, but it could not find a Chrome executable to launch. ChromeDriver looks in the default install locations for your operating system; if Chrome is installed somewhere else, is missing, or the path you supplied is wrong, the session fails with this message before any browser window opens.
How do I fix "WebDriverException: unknown error: cannot find Chrome binary"?
1. Confirm Chrome is installed: google-chrome --version, chromium --version, or check the install folder. 2. Point to the executable explicitly: options.binary_location = '/usr/bin/chromium'. 3. On macOS use the full path inside the app bundle: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome. 4. Let Selenium Manager download Chrome for Testing for you by setting options.browser_version = 'stable' when no browser is installed. 5. In Docker, install Chrome in the image or use a selenium/standalone-chrome image.
Run browser automation you can watch and take over
Autonoly runs each job in a real cloud Chromium browser driven by Playwright. Timeouts and detached elements still happen; the difference is that you can watch the run live, see the step that failed, and take control of the browser to finish it.
Also see Live browser control.