🎉 Premium Proxies · 24-Hour Free TrialClaim Now
Guides

ChromeDriver Only Supports Chrome Version X: Fix

Fix 'This version of ChromeDriver only supports Chrome version' in Selenium, Docker and undetected-chromedriver: the real N+1 rule, Selenium Manager, CfT pins.

S SparkProxy 0 11 min read
Share
ChromeDriver Only Supports Chrome Version X: Fix

"This version of ChromeDriver only supports Chrome version" is the session not created error Selenium throws when the driver binary and the browser binary don't line up. The usual advice is "make the major versions match". That's close, but not the actual rule, and the difference explains why the error seems to appear out of nowhere weeks after your last change.

We reproduced every variant on 23 November 2026 with Chrome 157, ChromeDriver 156, 157 and 158, older Chromium builds, Selenium 4.54 and undetected-chromedriver 3.5.5, and read the check in ChromeDriver's own source. Below is the exact rule, the four situations that trigger it, and the fix for each.

The full error, and the two lines that matter

From our test with ChromeDriver 156 and an older Chromium build:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created:
This version of ChromeDriver only supports Chrome version 156
Current browser version is 151.0.7922.34 with binary path C:\...\chromium-1234\chrome-win64\chrome.exe

Two numbers tell you everything: the driver's major version ("only supports Chrome version 156") and the browser's full version ("Current browser version is 151..."), plus the path of the browser it actually launched. That last part matters more often than people expect: if the path isn't the Chrome you thought you were testing, you're fixing the wrong binary.

With undetected-chromedriver the same error arrives wrapped in a connection message: session not created: cannot connect to chrome at 127.0.0.1: followed by from session not created: This version of ChromeDriver only supports Chrome version 158.

The real rule: version N works with N and N+1

The check lives in ChromeDriver's CheckVersion() function (chrome/test/chromedriver/chrome_launcher.cc in the Chromium source). Paraphrasing the code:

  • If the browser's major version equals the driver's, carry on.
  • If the browser is exactly one major newer (N+1), carry on but log a warning that this ChromeDriver "has not been tested with" that Chrome version. The source comment explains why: it allows "ChromeDriver version n (e.g. Beta) with Chrome version n+1 (e.g. Dev or Canary)".
  • If the browser reports version 0 (Content Shell), skip the check with a warning.
  • Anything else fails: a browser older than the driver, or two or more majors newer.
  • The whole check is skipped if ChromeDriver runs with --disable-build-check.

That asymmetry is the key to diagnosing it:

DriverBrowserResult
156156works
156157works, with a warning in the driver log
156158fails
156151fails
158157fails

Chrome ships a new major about every four weeks. So a pinned driver doesn't break the day Chrome auto-updates; it keeps working through one release and breaks on the second, roughly a month or two after you pinned it. And a driver that's newer than the browser fails immediately, which is exactly what happens when a tool downloads "the latest" driver for a Chrome that hasn't updated yet.

Free trial

Scraping at scale? Skip the blocks.

Fast, unblockable datacentre proxies with unlimited bandwidth.

What we measured

All tests opened only local pages, on 23 November 2026, Windows Server, with Google Chrome 157.0.8103.79 installed. Chrome for Testing's Stable channel was already on 158.0.8127.36, so this machine's Chrome was one release behind, a common state for servers and managed desktops.

TestResult
ChromeDriver 156.0.8078.80 + Chrome 157.0.8103.79session created (the N+1 allowance)
ChromeDriver 156 + Chromium 156.0.8078.4session created
ChromeDriver 156 + Chromium 151.0.7922.34`session not created: This version of ChromeDriver only supports Chrome version 156`
ChromeDriver 156 + Chromium 149.0.7827.55same error
Selenium 4.54 `webdriver.Chrome()`, no driver pathsession created; Selenium Manager picked ChromeDriver 157.0.8103.78
undetected-chromedriver 3.5.5 `uc.Chrome()` defaultsfailed: driver 158 for Chrome 157
undetected-chromedriver `uc.Chrome(version_main=157)`session created with ChromeDriver 157.0.8103.78

Fix 1: let Selenium Manager pick the driver

Since Selenium 4.6, Selenium ships Selenium Manager, which detects your browser version, downloads the matching driver and caches it in ~/.cache/selenium. From Selenium 4.11 it resolves Chrome drivers through Chrome for Testing, and can also download the browser itself.

The fix is mostly deletion. Remove hard-coded driver paths and legacy helpers such as webdriver-manager, and let Selenium resolve the driver:

# pip install -U selenium   (4.11 or newer)
from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument("--headless=new")
driver = webdriver.Chrome(options=options)      # no Service(executable_path=...) needed
print(driver.capabilities["browserVersion"],
      driver.capabilities["chrome"]["chromedriverVersion"].split(" ")[0])
driver.quit()

On our machine that printed 157.0.8103.79 157.0.8103.78: matched without any configuration. Two details from Selenium's docs:

  • Selenium Manager caches discovered versions for one hour by default (the TTL, configurable with SE_TTL), so a mid-run Chrome update can lag briefly.
  • An old chromedriver.exe sitting on your PATH can still win in some setups. If the error persists after upgrading Selenium, check where chromedriver (Windows) or which chromedriver and remove stale copies.

Fix 2: pin Chrome and ChromeDriver together with Chrome for Testing

Matching the driver to "whatever Chrome is installed" fixes the error, but your environment still changes every four weeks. For reproducible runs, pin both binaries to the same version. Chrome for Testing (CfT) publishes Chrome and ChromeDriver builds per version, with JSON endpoints listing their downloads.

The simplest pin is through Selenium itself. Setting a browser version makes Selenium Manager fetch that CfT Chrome and its matching driver:

options = webdriver.ChromeOptions()
options.browser_version = "157"          # or "stable", "beta"; same as SE_BROWSER_VERSION=157
driver = webdriver.Chrome(options=options)

For anything outside Selenium, look the URLs up directly:

import json, urllib.request

MAJOR, PLATFORM = "157", "linux64"   # also win64, mac-arm64, mac-x64
url = "https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json"
m = json.load(urllib.request.urlopen(url))["milestones"][MAJOR]
pick = lambda kind: next(d["url"] for d in m["downloads"][kind] if d["platform"] == PLATFORM)
print(m["version"], pick("chrome"), pick("chromedriver"), sep="\n")

Run on 23 November 2026, that returned version 157.0.8103.78 with matching chrome-linux64.zip and chromedriver-linux64.zip URLs under storage.googleapis.com/chrome-for-testing-public/. CfT builds don't auto-update, which is the point.

Fix 3: Docker and CI images

Containers hit this error in two ways: an image installs a fixed driver and a moving google-chrome-stable package, or a cached layer keeps an old Chrome while a later step fetches a new driver. Either way, the cure is to install both from the same CfT version in the same layer:

FROM python:3.12-slim
ARG CFT_VERSION=157.0.8103.78
RUN apt-get update && apt-get install -y --no-install-recommends curl unzip ca-certificates \
      libnss3 libatk-bridge2.0-0 libgbm1 libasound2 libxkbcommon0 libgtk-3-0 \
 && base=https://storage.googleapis.com/chrome-for-testing-public/${CFT_VERSION}/linux64 \
 && curl -fsSLo /tmp/chrome.zip ${base}/chrome-linux64.zip \
 && curl -fsSLo /tmp/driver.zip ${base}/chromedriver-linux64.zip \
 && unzip -q /tmp/chrome.zip -d /opt && unzip -q /tmp/driver.zip -d /opt \
 && ln -s /opt/chrome-linux64/chrome /usr/local/bin/chrome \
 && ln -s /opt/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver \
 && rm -rf /tmp/*.zip /var/lib/apt/lists/*
ENV SE_OFFLINE=true

Point Selenium at /usr/local/bin/chrome via options.binary_location, and SE_OFFLINE=true stops Selenium Manager from reaching out to download anything else. The library list is a starting point; CfT's Linux Chrome needs the usual Chrome shared libraries, so add whatever your base image is missing. Bump CFT_VERSION deliberately, in a pull request, instead of letting the build pick it.

Fix 4: undetected-chromedriver and version_main

undetected-chromedriver (uc) downloads and patches its own ChromeDriver, and that's where many mismatch reports come from. Reading its patcher source: when version_main isn't set, it asks Chrome for Testing for the latest Stable version and downloads that driver. It doesn't check which Chrome you have installed. So any machine whose Chrome lags Stable by a release gets a driver one version too new, and, per the rule above, a driver newer than the browser always fails. That's exactly what happened on our test machine (Chrome 157, Stable 158).

The fix is one argument:

import undetected_chromedriver as uc

driver = uc.Chrome(version_main=157)   # match the installed Chrome's major version

To avoid hard-coding it, read the installed version first (for example from chrome --version on Linux or the registry or file version on Windows) and pass its major number. Two more things to know: uc's last code push on GitHub was 5 July 2025, and on Windows it can print a harmless OSError: [WinError 6] The handle is invalid from its cleanup when the script exits. If you're weighing whether to stay on uc, our comparisons of nodriver vs undetected-chromedriver and SeleniumBase UC Mode vs undetected-chromedriver cover the maintained alternatives.

The --disable-build-check escape hatch

ChromeDriver accepts a --disable-build-check switch that skips the version check entirely. The source logs a warning when you use it: it's "an unsupported command-line switch", and you shouldn't report bugs that "cannot be reproduced with this switch removed". It can get a stuck pipeline running for an afternoon, but a driver that hasn't been built for your browser can fail in subtler ways later, so treat it as a stopgap, not a fix.

Prevent it from coming back

  • Pick one owner for versions. Either Selenium Manager matches the driver to whatever Chrome is present, or you pin both binaries with CfT. Mixing the two (a pinned driver plus an auto-updating Chrome) is what produces the error.
  • Disable Chrome auto-update on build agents if you pin, or use CfT builds, which don't update.
  • Log both versions at startup. One line printing browserVersion and chromedriverVersion from the session capabilities makes the next failure a 30-second diagnosis.
  • Watch the N+1 warning. If your driver log says ChromeDriver "has not been tested with" your Chrome version, you have one release left before it breaks.
  • Keep headless and headed builds aligned across tools; our guide to updating headless Chrome for Playwright and Puppeteer covers the same drift in those frameworks.

Once the driver matches, proxy setup is the next common Selenium snag; see how to use proxies with Selenium.

Frequently asked questions

FAQ

ChromeDriver refused to start a session because the browser's version isn't one it supports. A ChromeDriver with major version N accepts Chrome N and Chrome N+1 (with a warning), and rejects older browsers and anything two or more majors newer. The second line of the error shows the browser version and path it found.

Upgrade to Selenium 4.11 or newer, remove hard-coded driver paths and webdriver-manager, and let Selenium Manager download the matching driver automatically. For reproducible environments, pin both Chrome and ChromeDriver to the same Chrome for Testing version, for example with options.browser_version = "157".

Chrome auto-updated. A pinned ChromeDriver keeps working for one Chrome release (the N+1 allowance) and fails on the next, so the break shows up about a month or two after you pinned it. The reverse also happens: a tool fetched a newer driver while Chrome stayed on the old version.

Pass the installed Chrome's major version: uc.Chrome(version_main=157). Without it, undetected-chromedriver downloads the latest Stable ChromeDriver from Chrome for Testing, which fails whenever your installed Chrome is a release behind Stable.

No. Only the major version is checked, and ChromeDriver N also accepts Chrome N+1. In our test, ChromeDriver 156.0.8078.80 ran Chromium 156.0.8078.4 and Chrome 157.0.8103.79, while rejecting Chromium 151 and 149.

The driver and browser manager built into Selenium since version 4.6. It detects your browser version, downloads the matching driver (and, since 4.11, Chrome for Testing browsers), and caches them in ~/.cache/selenium. It's why modern Selenium usually needs no driver setup at all.

Special Discount · 20% off

Get 20% off your first month

Premium datacentre proxies with unlimited bandwidth. Use the code at checkout.

Save up to 15% more on quarterly, half-yearly and yearly plans

Claim Discount

About the Author

This guide was written by the SparkProxy Technical Team, which runs SparkProxy's datacenter proxy network and the SparkProxy Scraping API and maintains Selenium, Playwright and Puppeteer integrations for customers. Every result above was reproduced on our own machine on 23 November 2026, and the version rule is taken from ChromeDriver's source code; the scripts are kept with our research notes. Corrections: support@sparkproxy.io.

Keep reading

Related articles

Web Bot Auth: Sign Your Agent's HTTP Requests

Web Bot Auth: Sign Your Agent's HTTP Requests

Web Bot Auth explained and implemented: Ed25519 keys, the key directory, RFC 9421 signatures in Python and Node, who verifies them, and the header format trap.

SparkProxy·Guides