selenium.common.exceptions.SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 114. LATEST_RELEASE_115 doesn't exist
Asked Answered
S

13

31
#Once the zip has finished downloading, extract the folder and copy the path of the chromedriver exe file (should be the #first one), add it to your code like this,

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

url = "somewebsite.com"

service_obj = Service("D:\\Users\\eggman\Downloads\chromedriver-win64\chromedriver-win64\chromedriver.exe")
driver = webdriver.Chrome(service=service_obj)
driver.get(url)

Returns the error:

selenium.common.exceptions.SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 114. LATEST_RELEASE_115 doesn't exist

I'm guessing to avoid this in the future I can just turn off automatic updates?

I originally used the following code which worked fine

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
Sailmaker answered 16/8, 2023 at 13:13 Comment(4)
@UpAndAdam Did you miss the sentence that ends in a question mark right in the middle of the post?Sealskin
i sure did... kinda hard to find amidst all the other stuff.. its a very poorly formed questionRarotonga
if thats the 'question' then none of the answers actually answer it... the question seems to be 'how do I resolve it'Rarotonga
You could probably find higher driver version on ChromeDriver Canary chromedriver.chromium.org/chromedriver-canaryApprehend
J
43

For Chrome/chromedriver 116+, the solution is similar to https://mcmap.net/q/67428/-selenium-webdriver-chrome-115-stopped-working, but now you need a minimum selenium version of 4.11.2. Then selenium gets the correct driver for you at runtime.

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
# ... Automate something here
driver.quit()

For more info on the new Chrome-for-Testing, see https://googlechromelabs.github.io/chrome-for-testing/ (this also includes chromedrivers for testing).

Jephthah answered 16/8, 2023 at 14:32 Comment(7)
That works for me, though I get a warnng: The chromedriver version (115.0.5790.102) detected in PATH at /usr/local/bin/chromedriver might not be compatible with the detected chrome version (116.0.5845.96); currently, chromedriver 116.0.5845.96 is recommended for chrome 116.*, so it is advised to delete the driver in PATH and retrySenegal
If you see a warning, it's because Selenium detected that your driver doesn't match your version of Chrome. Selenium will by default save drivers to ~/.cache/selenium. If you already have a driver on your PATH, it'll try to use that first. You can remove drivers from your PATH to force Selenium's default driver location.Jephthah
This worked. But not before I upgraded selenium: "pip install --upgrade selenium"Wiles
@MichaelMintz how do you remove the drivers from the path?Nadabus
If there's an existing driver on your path that doesn't match, the warning message tells you where it's located.Jephthah
@MichaelMintz, I thought I'd fixed this by removing chromedriver from path (which I'd installed using brew) and using the three lines starting service=Service() to automatically find the right chromedriver version. That was working (I thought). But now I am getting this error again WebDriverException: Message: 'chromedriver' executable needs to be in PATH.Senegal
@Senegal If you installed it using brew, then it might not have gotten installed to a location on your System PATH. (Selenium wasn't able to find it.) Maybe try finding/relocating it, or install it again. Also looks like there was an issue with Selenium Manager on the version you have, because it didn't download it when it was not found. Alternatives include manually getting it from the chrome-for-testing page, using WebdriverManager, or using SeleniumBase for downloading chromedriver when you need it.Jephthah
P
7

Please use the below command to upgrade Selenium. It helped me out to get resolve the issue. This version of Selenium will start recognizing the correct browser version. (Environment: Windows 10, PyCharm, and venv)

pip install -U selenium==4.11.2
Predial answered 22/8, 2023 at 9:9 Comment(1)
Didnt work.. ``` Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 120.0.6099.130 with binary path ```Wrest
R
3

For users of an undetected chromedriver: get the newest version of the driver from this link in the start post, and then use the driver_executable_path parameter. Also, you need update both Selenium and undetected chromedriver libraries.

driver = uc.Chrome(driver_executable_path=r"chromedriver-win64\chromedriver.exe", options=options)

Where folder chromedriver-win64 in the script's directory. If you won't use this parameter, the program will try automatically to get the version that doesn't support Chrome 115+.

Reviere answered 24/8, 2023 at 10:14 Comment(0)
M
3

For me, using Python Selenium, it stopped working when Chrome updated from 115 to 116. I downloaded the Chrome driver 116, but I still got the same error.

I tried updating Selenium from 4.9.0, but I ran into different errors further on, so I reverted back. Finally, the solution was to put file in the drivers path, not just directory. I changed from

python -m pytest --driver Chrome --driver-path c:\Users\MyName\code\chromedriver-win64-116\

to this:

python -m pytest --driver Chrome --driver-path c:\Users\MyName\code\chromedriver-win64-116\chromedriver.exe
Mcniel answered 5/9, 2023 at 7:7 Comment(0)
D
2

For my setup, the solution to this was quite simple (only discovered after a lot of research though), thanks to New Dedicated Chrome Browser for Automated Testing || Major Impact on Selenium || Chrome 115.x.

Even though I was on the latest Selenium (4.11.2), I still got the error about versions not matching.

I downloaded Chrome 114 from Chrome for Testing availability, unpacked into my downloads folder, and then added this code to set the binary location:

options.binary_location = r"ADD_YOUR_PATH\chrome.exe"
Debonair answered 19/8, 2023 at 7:1 Comment(2)
I am looking EVERYWHERE for Chrome 114, but cannot find it. I went to your link and it isn't there either. Can you help me find it?Terrify
I also have looked everywhere and cant find it. Even tried using the wayback machine and using ungoogled chromium releases (that just do nothing when their exe installed are told to run)Wrest
K
2

Simply downgrade to Chrome version 114:

apt-get update
wget http://dl.google.com/linux/deb/pool/main/g/google-chrome-unstable/google-chrome-unstable_114.0.5735.6-1_amd64.deb
sudo apt-get install -f ./google-chrome-unstable_114.0.5735.6-1_amd64.deb

sudo ln -s /opt/google/chrome-unstable/google-chrome google-chrome-stable

114.0.5735.6-1 is the last release of Chrome version 114.

Kreutzer answered 13/10, 2023 at 20:30 Comment(0)
S
1

Migrating OP's solution from the question to an answer:

I found a solution (in python) and wanted to share, go to the Chrome Labs Testing page and copy the corresponding "URL" for your platform and paste it in to your browser and the download will begin. I selected the version based on the version that my chrome browser automatically updated to which was 116.0.5845.97. You can find this by opening settings in chrome browser and then clicking on "About Chrome".

Sealskin answered 16/8, 2023 at 13:13 Comment(0)
S
1

After installation of Selenium v4.11.2, things are working fine. I faced the issue with v4.10.

Supen answered 23/8, 2023 at 19:52 Comment(0)
C
1

To solve it, I just updated Chrome to version 117 and then changed the cromedriver I was using to match the version. I found it here (I found the list from chromedriver official downloads page). The code I use to launch the chromedriver is:

from pathlib import Path
from selenium.webdriver.chrome.service import Service as ChromeService

service = ChromeService(executable_path=Path.cwd() / 'chromedriver_mac64')

(Of course I renamed the chromedriver executable to chromedriver_mac64).

Cattan answered 26/9, 2023 at 14:51 Comment(1)
What does "/" do? Doesn't it result in "TypeError: unsupported operand type(s) for /: 'str' and 'str'"?Heed
S
0

I encountered the same issue, and I tried the below approach and it worked.

pip install chromedriver-py

Use the below code after installation is complete:

from selenium import webdriver
from chromedriver_py import binary_path # This will get you the path variable

svc = webdriver.ChromeService(executable_path=binary_path)
driver = webdriver.Chrome(service=svc)

# Deprecated, but it works in older Selenium versions
# driver = webdriver.Chrome(executable_path=binary_path)
driver.get("http://www.python.org") #
assert "Python" in driver.title
Spirochaetosis answered 9/10, 2023 at 10:5 Comment(0)
U
0

Use this uc.Chrome(headless=False, version_main=115)

Upshot answered 21/3 at 8:10 Comment(0)
P
0

I found same issue but with undetected chrome driver, solution were I had old installed version undetected-chromedriver==3.1.7, all I did

pip uninstall undetected-chromedriver

and

pip install undetected-chromedriver

and it downloaded latest version, then this code

chromedriver_autoinstaller.install()
options = uc.ChromeOptions()
driver = uc.Chrome(options=options)
Printmaker answered 11/4 at 16:43 Comment(0)
H
0

go to Chrome-for-Testing website and download the appropriate chromedriver binary version :

wget https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.122/linux64/chromedriver-linux64.zip

unzip chromedriver-linux64.zip && mv ./chromedriver-linux64/chromedriver /usr/bin/chromedriver

it works for me, this was my error:

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 123.0.6312.122 with binary path /usr/bin/google-chrome

Humanist answered 16/4 at 10:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.