selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
Fixes undetected-chromedriver failing because Google Chrome itself is not installed. Use when the error says `cannot find Chrome binary`. Not for driver version mismatches (Chrome exists but the driver is wrong).
ChromeDriver is ready but there is no Chrome browser for it to drive. Install Google Chrome on the machine (not just chromedriver), then re-run. On servers and containers, install the headless Chrome binary for your distro; the shopsmart README lists this as the first thing to check for exactly this error.
The error
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binaryFix it
- Install Google Chrome
On Debian/Ubuntu:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.debExpected: google-chrome --version prints a version.
- Re-run your script unchanged
python -c "import undetected_chromedriver as uc; d = uc.Chrome(); print('ok'); d.quit()"Expected: prints ok. undetected-chromedriver locates the standard Chrome install automatically.
- If Chrome lives somewhere unusual, point at it
driver = uc.Chrome(browser_executable_path='/path/to/chrome')Expected: the session starts using that binary. Only needed for non-standard install locations.
When this applies
- the error text is
cannot find Chrome binary - a server, container, or fresh VM where only chromedriver was set up
- CI runners without a browser installed
When it does NOT apply
only supports Chrome version Nmeans Chrome EXISTS and the driver mismatches it'chromedriver' executable needs to be in PATHis the missing-driver problem
Compatibility
undetected-chromedriver 3.x, any Chrome. The auto-detection covers standard install paths on Windows, macOS, and Linux.
Why it happens
undetected-chromedriver manages the DRIVER binary for you, but the BROWSER binary (Chrome itself) must exist on the system. Minimal containers and servers often have neither, and installing only chromedriver (or only the Python package) leaves ChromeDriver with nothing to launch, producing this error.
Edge cases
- Headless servers still need the full Chrome binary (it runs with --headless). There is no driver-only setup.
- Snap-installed Chromium on Ubuntu sometimes confuses auto-detection. Prefer the .deb Chrome or pass browserexecutablepath.
- In Docker, install Chrome in the same image layer as your script so the binary is present at runtime, not just build time.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.