SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 87 using ChromeDriver and Chrome

14,109

This error message...

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

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • You are using chromedriver=87.0
  • Release Notes of chromedriver=87.0 clearly mentions the following :

Supports Chrome version 87

  • You are using Chrome v86.0.4240.198

So there is a clear mismatch between ChromeDriver v2.40 and the Chrome Browser v85.0


Solution

Ensure that:

  • ChromeDriver is updated to current ChromeDriver v87.0 level.
  • Chrome is updated to current Chrome Version 87.0 level. (as per ChromeDriver v87.0 release notes).
  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test as non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Share:
14,109
Kooboi
Author by

Kooboi

Updated on June 21, 2022

Comments

  • Kooboi
    Kooboi almost 2 years

    I am trying to get selenium to open a site and I don't really have any errors in my PyCharm editor but when I run my code I am getting a lot of errors I do not really understand it would be nice to get some help

    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    
    driver = webdriver.Chrome(executable_path=r"C:\chromedriver\chromedriver.exe")
    
    driver.get("https://www.singaporetech.edu.sg/")  # get gets url
    print(driver.title)  # title of the page
    
    driver.close()
    

    This is the error I get:

    C:\Users\kaush\PycharmProjects\seleniumTest1\venv\Scripts\python.exe C:/Users/kaush/PycharmProjects/seleniumTest1/main.py
    Traceback (most recent call last):
      File "C:\Users\kaush\PycharmProjects\seleniumTest1\main.py", line 4, in <module>
        driver = webdriver.Chrome(executable_path=r"C:\chromedriver\chromedriver.exe")
      File "C:\Users\kaush\PycharmProjects\seleniumTest1\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in __init__
        RemoteWebDriver.__init__(
      File "C:\Users\kaush\PycharmProjects\seleniumTest1\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
        self.start_session(capabilities, browser_profile)
      File "C:\Users\kaush\PycharmProjects\seleniumTest1\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
        response = self.execute(Command.NEW_SESSION, parameters)
      File "C:\Users\kaush\PycharmProjects\seleniumTest1\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
        self.error_handler.check_response(response)
      File "C:\Users\kaush\PycharmProjects\seleniumTest1\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 87
    Current browser version is 86.0.4240.198 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    • Arundeep Chohan
      Arundeep Chohan over 3 years
      You chromedriver version and chrome version dont match up.
    • KunduK
      KunduK over 3 years
      If you read the last line selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 87 Current browser version is 86.0.4240.198 It says version mismatch. You can refer following link to find compatible version. chromedriver.chromium.org/downloads
  • Bartosz
    Bartosz over 3 years
    So there's no kind of backward compatibility....Amazing:O