Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Message: session not created: This version of ChromeDriver only supports Chrome version 94 Current browser version is 93.0.4577.82

Tags:

Writing a simple selenium script to click on links on aa website. The script is written like so:

from selenium import webdriver
import time

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)

try:
    browser.get("https://www.google.com")
    print("Page title was '{}'".format(browser.title))

finally:
    browser.quit()

Now the issue is the actual chrome driver itself I get the following exception

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 93.0.4577.82 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

I went to the chromedriver downloads site. I still get the same error though.

like image 645
Evan Gertis Avatar asked Sep 17 '21 16:09

Evan Gertis


2 Answers

Compatibility issue.

Your chrome driver version is 94.0.4606.41 and this driver version supports Chrome browser 94

Please do anyone of the following.

  • Update the chrome browser version to 94
  • Degrade the driver version to 93 (Download 93 version from here https://chromedriver.storage.googleapis.com/index.html?path=93.0.4577.63/)
like image 88
Nandan A Avatar answered Sep 28 '22 12:09

Nandan A


This error occurred because you have different versions of Google Chrome and driver. It is better to update the driver, rather than install the old version of Google, since in the future it will be constantly updated (why do you want to use outdated technologies?). I usually use :

ChromeDriverManager

because at any time without going to the web driver website you can simply download the driver with the following command:

driver = webdriver.Chrome(ChromeDriverManager().install())

Further, using the path given by this command, you can use the freshly installed version:

driver = webdriver.Chrome(executable_path=r"C:\path_to_chrome_driver_executable\chromedriver.exe")
like image 33
TroHaN Avatar answered Sep 28 '22 13:09

TroHaN