SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81
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 :
-
Check the version of chrome browser.
-
download chromedriver of same version from https://sites.google.com/chromium.org/driver/home
-
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:
- How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
- selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
- Ubuntu: selenium.common.exceptions: session not created: This version of ChromeDriver only supports Chrome version 79
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
finlandlearner
Updated on April 13, 2022Comments
-
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!
-
AndiCover about 4 yearsWhy don't you use version 81? It won't work with version 80.
-
finlandlearner about 4 yearsonly beta version available and it is not supporting it.
-
JWallace about 4 yearsSame issue running E2E tests in selenium (Angular 8.2.x) (Driver info: chromedriver=81.0.4044.20 (f006328e39a9769596eb506c8841c3004b24e747-refs/branch-heads/4044@{#244}),platform=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 almost 4 yearsIn 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 almost 4 yearsYou need to simply update ChromeDriver. I wrote an easy article on medium for it.
-
AncientSwordRage almost 4 yearsDoes this answer your question? Error message: "'chromedriver' executable needs to be available in the path"
-
-
finlandlearner about 4 yearsThanks for your response @debanjan. Also I tried with firefox browser by installing and adding path of geckodriver
-
Mickael B. almost 4 yearsDon't duplicate answers please. It has already been answered can you read before posting.
-
ASAD HAMEED almost 4 yearsI 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 almost 4 yearsThanks, @dylanvanw, while need to download the image everytime?
-
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 almost 4 yearsHi, 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 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().install()) else: driver = webdriver.Chrome(executable_path = "./Driver/chromedriver.exe") driver.get(Application_url) driver.maximize_window() return driver
-
Al Martins over 3 yearsWorked 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 over 3 yearshow to find location of my chromedriver?
-
Mauro over 3 yearsI 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 over 3 years@KonstantinVahrushev use command
which chromedriver
-
j413254 over 3 yearsHow do you find the correct path? Edit: I figured the path out. On mac, cmd+shift+g then /usr/local/bin
-
SidGabriel over 3 yearssuch a great answer, prevented me from an headache
-
ScottyBlades over 3 yearsDidn't work for me. I think this won't work unless the path is correct.
-
ScottyBlades over 3 yearsHow do we get the path?
-
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 about 3 yearsFor homebrew 3, just
brew upgrade chromedriver
. -
Čamo about 3 years@casper123 how to use command which chromedriver?
-
casper123 about 3 years@Čamo if you're on mac, the default path for chromedriver is /usr/local/bin/chromedriver
-
Čamo about 3 yearsI am on Ubuntu / Win 10 But the problem is solved.
-
Anh Hoang almost 3 yearsVery simple and worked solution. Thank you
-
PJSCopeland over 2 yearsThis fixed the error in my Ruby framework as well :)