Reputation: 13
Trying to run Selenium with Chromium (through ChromeDriverManager) on a Linux machine.
Error message:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Chromium info:
$ chrome --version
Chromium 116.0.5826.0
$ which chrome
/usr/local/bin/chrome
Python code:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromiumService
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.utils import ChromeType
chromium_driver = ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()
driver = webdriver.Chrome(service=ChromiumService(chromium_driver))
driver.get("http://www.justinbieber.sucks")
driver.quit()
The error message makes it obvious that this is a version/compatibility issue (between Chromium and ChromeDriver), but there doesn't seem to be a ChromeDriver for Chromium 16.0 yet. Also, I can't for the love of God find a download link for Chromium 14. ChromeDriverManager is not helping a lot either.
Upvotes: 1
Views: 1593
Reputation: 193298
This error message...
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
...implies that there is a version incompatibility between chromium and ChromeDriver version.
The latest ChromeDriver being v114.0.5735.90 you have to downgrade the Chromium browser version accordingly.
To download, install and use a specific version of Chrome / Chromium on Linux you need to follow the relevant steps from the Download Chromium page:
Downloading old builds of Chrome / Chromium Let's say you want a build of Chrome 44 for debugging purposes. Google does not offer old builds as they do not have up-to-date security fixes.
However, you can get a build of Chromium 44.x which should mostly match the stable release.
Here's how you find it:
Look in https://googlechromereleases.blogspot.com/search/label/Stable updates for the last time "44." was mentioned. Loop up that version history ("44.0.2403.157") in the Position Lookup In this case it returns a base position of "330231". This is the commit of where the 44 release was branched, back in May 2015.* Open the continuous builds archive Click through on your platform (Linux/Mac/Win) Paste "330231" into the filter field at the top and wait for all the results to XHR in. Eventually I get a perfect hit: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/330231/ Sometimes you may have to decrement the commit number until you find one. Download and run!
- As this build was made at 44 branch point, it does not have any commits merged in while in beta.
Typically that's OK, but if you need a true build of "44.0.2403.x" then you'll need to build Chromium from the 2403 branch. Some PortableApps/PortableChromium sites offer binaries like this, due to security concerns, the Chrome team does not recommend running them.
Upvotes: -1