Selenium "SessionNotCreatedException: only supports Chrome version X" in CI
ChromeDriver checks the major version of the Chrome it drives at session start. When the driver was built for a different major version than the browser on the runner, it refuses to start and raises SessionNotCreatedException.
What this error means
A test fails at driver startup with "selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version X" followed by "Current browser version is Y".
selenium.common.exceptions.SessionNotCreatedException: Message: session not created:
This version of ChromeDriver only supports Chrome version 114
Current browser version is 126.0.6478.126 with binary path /usr/bin/google-chromeCommon causes
A pinned ChromeDriver lags the auto-updated Chrome
The runner image updated Chrome to a new major version, but the ChromeDriver pinned in the job (or cached from a previous run) is still the old major version.
Driver and browser come from different sources
Chrome is installed by the base image while ChromeDriver is fetched separately, so the two drift apart whenever one updates and the other does not.
How to fix it
Let Selenium Manager pick the matching driver
- Upgrade to Selenium 4.6 or newer, which bundles Selenium Manager.
- Stop pinning a ChromeDriver path so Selenium resolves the driver for the installed Chrome.
- Re-run; Selenium Manager downloads the driver whose major version matches the browser.
pip install -U "selenium>=4.6"
# remove any explicit Service(executable_path=...) so Selenium Manager resolves itPin both Chrome and ChromeDriver to the same major
If you manage the driver yourself, install Chrome and ChromeDriver from the Chrome for Testing endpoints at the same version so the majors always match.
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: '126'
install-chromedriver: trueHow to prevent it
- Use Selenium Manager (Selenium 4.6+) instead of a hand-pinned driver path.
- Source Chrome and ChromeDriver from Chrome for Testing at one version.
- Do not cache the ChromeDriver binary across runs where Chrome auto-updates.