20

I'm using VS Code and Anaconda3. Currently trying to install ChromeDriver_Binary but, when I try to execute code, I get this error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 102
Current browser version is 100.0.4896.127 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

jps
  • 20,041
  • 15
  • 75
  • 79
Angel Wang
  • 251
  • 1
  • 2
  • 7
  • 1
    Try updating your Chrome from 100 to 102 . – Tamás Pápai May 04 '22 at 10:07
  • I tried to update from chrome, and I got the new version of Versión 101.0.4951.54 (Build oficial) (64 bits). Still not 102, also I downloaded the chromeDriver 101 from chromeAPI, tho I can't figure how to install Exe to python... – Angel Wang May 04 '22 at 10:16

8 Answers8

20

One option is to use chromedriver-autoinstaller to do it all at once:

import chromedriver_autoinstaller as chromedriver
chromedriver.install()

Alternatively use chromedriver-binary-auto to find the required version and install the driver:

pip install --upgrade --force-reinstall chromedriver-binary-auto
import chromedriver_binary

No restarting is required.

misantroop
  • 2,276
  • 1
  • 16
  • 24
  • 1
    Good solution! Simple and works. – joeyagreco May 09 '22 at 00:50
  • Very nice work! Worked where everything else failed! – Martin H Sep 08 '22 at 10:47
  • Unfortunately, none of these approaches worked for [my issue with getting the latest version of chromedriver automatically](https://stackoverflow.com/questions/74279326/undetected-chromedriver-requires-newer-chromedriver-version-than-automatically). – Andreas L. Nov 01 '22 at 17:05
  • It works perfectly (Python 3.9, Win11). For what it's worth, i used this solution with a proxy and this one should be activated before the ```chromedriver.install()``` line and, then, desactivated before ```webdriver.Chrome()``` line – 8oris Nov 22 '22 at 10:51
5

I fixed it, by updating chrome to version 101, downloading chromedriver from https://chromedriver.chromium.org/downloads and rebooting.

Angel Wang
  • 251
  • 1
  • 2
  • 7
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 04 '22 at 12:44
3

I had the same issue, I'm running MacOS Monterrey. My Chrome version is Version 104.0.5112.79. I was getting the same error as you; This version of ChromeDriver only supports Chrome version 102

What I did was:

  1. Download the version of chromedriver that matched the version of Chrome, in this case 104 https://chromedriver.chromium.org/downloads

  2. Opened the location of chromedriver, it's usually under this path: /usr/local/bin

  • Open Finder.
  • Press Command-Shift-G to open the dialogue box
  • Input the following search: /usr/local/bin
  1. Replaced the previous chromedriver from that location with the new one I just downloaded.
elpat7
  • 43
  • 5
1

You need to check your current chrome version first, and then download the chrome driver following this version: https://chromedriver.chromium.org/downloads

The point here is that we have to make sure both of chrome version are the same

enter image description here

enter image description here

Leo N
  • 126
  • 2
  • 5
1

Here's the updated code to install the latest version of Google Chrome and the latest version of ChromeDriver in Ubuntu, and move the ChromeDriver executable to /usr/local/bin/chromedriver:

# Install the latest version of Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f

# Install the latest version of ChromeDriver
CHROME_VERSION=$(google-chrome-stable --version | grep -oE '[0-9]{2}')
LATEST_CHROMEDRIVER_VERSION=$(wget -q -O - https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
wget https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER_VERSION/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/

# Clean up downloaded files
rm chromedriver_linux64.zip google-chrome-stable_current_amd64.deb

Or, Here is the code in one command (Easy to Copy):

LATEST_CHROME=$(curl -s https://dl.google.com/linux/chrome/deb/dists/stable/main/binary-amd64/Packages | grep -E "^Version:" | awk '{ print $2 }' | head -n1 | cut -d'-' -f1) && LATEST_CHROMEDRIVER=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE) && sudo apt-get update && sudo apt-get install -y google-chrome-stable && wget https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && sudo mv chromedriver /usr/local/bin/ && sudo apt-get install -y fonts-liberation
Amit Ghosh
  • 1,500
  • 13
  • 18
0

chrome browser and the chromedriver.exe(Path provided by the project) versions should match to the same version.

0

please follow the below steps:

1- Delete the current chrome driver from visual studio.

2- Download the latest release of the chrome driver.

3- Add the new chrome drive to the project ( follow below steps) 3.a- Copy the chrome driver to the application path on your pc for example:C:\Users\xxx\source\repos\APPAutomation\APPAutomation
3.b- Select the project in Visual Studio and press on Add – existing item 3.c- Select the chromedriver exe file in Visual Studio. 3.d- Go to the properties of the chrome driver and change the “Copy to Output Directory” to “Copy if newer”

4- End the chrome driver task from task manager (back ground process)

5- Delete the Bin file from the project path

6- Build the project in Visual Studio .

Daniel Walker
  • 6,380
  • 5
  • 22
  • 45
Georges
  • 1
  • 1
0

This version of ChromeDriver only supports Chrome version 106 Current browser version is 108.0.4896.127 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

I was getting exact same error

steps I followed:

  1. delete the old chromedriver.exe file.

  2. download the chromedriver.exe file which is compatible with my chrome version which is 108. so I downloaded 108 and it worked.

downloadable link

attached is the link and pic of from where you can download.