ChromeDriver "only supports Chrome version X" mismatch in CI
ChromeDriver is version-locked to a Chrome major version. When CI installs a newer or older Chrome than the ChromeDriver on the runner, the WebDriver session fails immediately with a "session not created" error naming both versions.
What this error means
Selenium or a WebDriver client fails at session start with "session not created: This version of ChromeDriver only supports Chrome version X. Current browser version is Y".
selenium.common.exceptions.SessionNotCreatedException: Message: session not created:
This version of ChromeDriver only supports Chrome version 122
Current browser version is 124.0.6367.60 with binary path /usr/bin/google-chromeCommon causes
Chrome auto-updated past the pinned driver
The runner image ships a newer Chrome than the ChromeDriver installed separately, so the majors no longer match.
A hardcoded ChromeDriver version in CI
The workflow installs a fixed ChromeDriver that lags behind the Chrome the image provides.
How to fix it
Let Selenium Manager resolve the driver
Selenium 4.6+ downloads a matching driver automatically; remove the hardcoded ChromeDriver and let it pick the right one.
# Selenium 4.6+ resolves the driver for the installed Chrome
driver = webdriver.Chrome() # no manual chromedriver neededPin the driver to the browser major version
If you install the driver yourself, match it to the Chrome major on the runner.
- uses: browser-actions/setup-chrome@v1
- uses: nanasess/setup-chromedriver@v2
# setup-chromedriver matches the installed Chrome versionHow to prevent it
- Prefer Selenium Manager (4.6+) so the driver always matches Chrome.
- If pinning, install Chrome and ChromeDriver from actions that keep them in sync.
- Avoid hardcoding a ChromeDriver version that can drift from the browser.