SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

323,618

Solution 1

I solved these kinds of problems using the webdrive manager.

You can automatically use the correct chromedriver by using the webdrive-manager. Install the webdrive-manager:

pip install webdriver-manager

Then use the driver in python as follows

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

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

This answer is taken from https://stackoverflow.com/a/52878725/10741023

Solution 2

Do below steps :

  1. Check the version of chrome browser.

  2. download chromedriver of same version from https://sites.google.com/chromium.org/driver/home

  3. Give correct path in the pycharm and run the code.

Solution 3

I got the same message on MacOS:

"selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81"

Then I run this command, it's gone:

# Homebrew 3
brew upgrade chromedriver

# Homebrew < 3
brew cask upgrade chromedriver

Solution 4

This error message...

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

...implies that the ChromeDriver v81 was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser where is version is other then 81.0.


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

  • You mentioned about using chromedriver=80 and chrome=80 but somehow while your program execution ChromeDriver v 81.0 is used.
  • So, it's quite evident your have chromedriver=81.0 present within your system and is present within the system PATH variable which gets invoked while you:

    driver = webdriver.Chrome()
    

Solution

There are two solutions:

  • Either you upgrade chrome to Chrome Version 81.0 level. (as per ChromeDriver v81.0 release notes)
  • Or you can override the default chromedriver v81.0 binary location with chromedriver v80.0 binary location as follows:

    from selenium import webdriver
    
    driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')
    driver.get('http://google.com/')
    

Reference

You can find a couple of relevant discussions in:

Solution 5

Go to your Chrome settings -> About Chrome -> Check version and download chromedriver from Below according to your Chrome version https://chromedriver.chromium.org/downloads

Share:
323,618
finlandlearner
Author by

finlandlearner

Updated on April 13, 2022

Comments

  • finlandlearner
    finlandlearner about 2 years

    I am currently new to robot framework.I am currently using latest window version of chrome and chromedriver which is 80 but when i try to run the test it gives the message "SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81" in pycharm but currently beta version of 81 is only available. I have tried uninstalling everthing and reinstalling it again but nothing works can anyone help me with this.Thank you!

    Screenshots below: 1

    2

    • AndiCover
      AndiCover about 4 years
      Why don't you use version 81? It won't work with version 80.
    • finlandlearner
      finlandlearner about 4 years
      only beta version available and it is not supporting it.
    • JWallace
      JWallace about 4 years
      Same issue running E2E tests in selenium (Angular 8.2.x) (Driver info: chromedriver=81.0.4044.20 (f006328e39a9769596eb506c8841c3004b24e747-refs/branch-heads/‌​4044@{#244}),platfor‌​m=Windows NT 10.0.18362 x86_64) at Object.checkLegacyResponse (..\node_modules\selenium-webdriver\lib\error.js:546:15) at parseHttpResponse (..\node_modules\selenium-webdriver\lib\http.js:509:13) at ..\node_modules\selenium-webdriver\lib\http.js:441:30 at processTicksAndRejections (internal/process/task_queues.js:94:5) [08:54:47] E/launcher - Process exited with error code 100
    • User
      User almost 4 years
      In my case all I had to do was open my normal chrome browser, go to menu Help -> About Google Chrome and then it started updating chrome to the latest version (I had 81 and updated to 83). Restarted chrome and when I reran the chromedriver it worked.
    • ScottyBlades
      ScottyBlades almost 4 years
      You need to simply update ChromeDriver. I wrote an easy article on medium for it.
    • AncientSwordRage
      AncientSwordRage almost 4 years
  • finlandlearner
    finlandlearner about 4 years
    Thanks for your response @debanjan. Also I tried with firefox browser by installing and adding path of geckodriver
  • Mickael B.
    Mickael B. almost 4 years
    Don't duplicate answers please. It has already been answered can you read before posting.
  • ASAD HAMEED
    ASAD HAMEED almost 4 years
    I answered it on another page and thought I should probably add it here and I didn't bother to see answers here, will care next time 🙂
  • Espoir Murhabazi
    Espoir Murhabazi almost 4 years
    Thanks, @dylanvanw, while need to download the image everytime?
  • dylanvanw
    dylanvanw almost 4 years
    @EspoirMurhabazi you don't need to download the image every time. There is a caching mechanism in in webdriver_manager so if possible it will use the correct driver on your machine that the webdriver_manager downloaded in a previous run.
  • user9847788
    user9847788 almost 4 years
    Hi, just wondering where are you running this command? I'm facing an issue where my version of ChromeDriver only supports Chrome version 85. When I check my version of CHrome it is 84, but it says that version is up-to-date.
  • Navaneeth S
    Navaneeth S almost 4 years
    @user9847788 I have a base file with a method to start a browser and specify the URL. It goes like this, def startBrowser(): global driver if Browser == "chrome": driver = webdriver.Chrome(ChromeDriverManager("83.0.4103.14").install‌​()) elif Browser == 'firefox': driver = webdriver.Firefox(executable_path=GeckoDriverManager().insta‌​ll()) else: driver = webdriver.Chrome(executable_path = "./Driver/chromedriver.exe") driver.get(Application_url) driver.maximize_window() return driver
  • Al Martins
    Al Martins over 3 years
    Worked fine to me. I found the correct path into the error message itself and replaced the file with the one I just downloaded. Hope this helps too
  • Konstantin Vahrushev
    Konstantin Vahrushev over 3 years
    how to find location of my chromedriver?
  • Mauro
    Mauro over 3 years
    I opened a Finder instance and typed "chromedriver" in the search bar (make sure the search is set for "This Mac" and not "Recents"). With the results on sight, scroll down and when you see it just right click it and select "Show in Enclosing Folder". Replace at will.
  • casper123
    casper123 over 3 years
    @KonstantinVahrushev use command which chromedriver
  • j413254
    j413254 over 3 years
    How do you find the correct path? Edit: I figured the path out. On mac, cmd+shift+g then /usr/local/bin
  • SidGabriel
    SidGabriel over 3 years
    such a great answer, prevented me from an headache
  • ScottyBlades
    ScottyBlades over 3 years
    Didn't work for me. I think this won't work unless the path is correct.
  • ScottyBlades
    ScottyBlades over 3 years
    How do we get the path?
  • dylanvanw
    dylanvanw over 3 years
    @ScottyBlades the nice thing about this solution is that you do not have to provide a path yourself. What about this solution did not work for you?
  • moveson
    moveson about 3 years
    For homebrew 3, just brew upgrade chromedriver.
  • Čamo
    Čamo about 3 years
    @casper123 how to use command which chromedriver?
  • casper123
    casper123 about 3 years
    @Čamo if you're on mac, the default path for chromedriver is /usr/local/bin/chromedriver
  • Čamo
    Čamo about 3 years
    I am on Ubuntu / Win 10 But the problem is solved.
  • Anh Hoang
    Anh Hoang almost 3 years
    Very simple and worked solution. Thank you
  • PJSCopeland
    PJSCopeland over 2 years
    This fixed the error in my Ruby framework as well :)