Selenium "session not created: ... only supports Chrome version N"
Selenium could not start a browser session because ChromeDriver and Chrome are different major versions. The driver speaks only to its matching Chrome, and CI has a different browser installed.
What this error means
Session creation fails with "session not created: This version of ChromeDriver only supports Chrome version N. Current browser version is M." It appears after Chrome auto-updates on the runner but the pinned driver does not.
selenium.common.exceptions.SessionNotCreatedException: Message: session
not created: This version of ChromeDriver only supports Chrome version 124
Current browser version is 131.0.6778.85Common causes
Driver and browser major versions differ
A pinned ChromeDriver (124) cannot drive a newer Chrome (131); the driver only matches its own major version.
Hardcoded driver path overriding auto-resolution
An explicit old driver on PATH or via Service(executable_path=...) shadows Selenium Manager's automatic matching.
How to fix it
Let Selenium Manager resolve the driver
Selenium 4.6+ ships Selenium Manager, which downloads a matching driver automatically - drop the hardcoded path.
from selenium import webdriver
driver = webdriver.Chrome() # no Service(executable_path=...)Or pin browser and driver together
- Install a fixed Chrome version in CI instead of tracking latest.
- Install the matching ChromeDriver major version in the same step.
- Upgrade Selenium to 4.6+ so Manager handles matching.
How to prevent it
- Use Selenium 4.6+ and let Selenium Manager match the driver.
- If you pin Chrome, pin the matching driver alongside it.
- Avoid auto-updating the browser without updating the driver.