SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 97 Current browser version is 100.0.4896.75
Asked Answered
A

9

22

I'm trying to start a selenium webdriverinstance, but I get this error:

SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 97 Current browser version is 100.0.4896.75 with binary path *path here*

I already tried using chromium 98, it works, but a new vulnerability was found in version 100 and i would like to update

Ahn answered 6/4, 2022 at 21:6 Comment(0)
V
8

This error message...

SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 97 Current browser version is 100.0.4896.75 with binary path...

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

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

  • You are using chrome=100.0.4896.75
  • You are using chromedriver=97.0
  • Release Notes of chromedriver=97.0 clearly mentions the following :

Supports Chrome version 97

So there is a clear mismatch between chromedriver=97.0 and the chrome=100.0.4896.75


Solution

Ensure that:

Venita answered 6/4, 2022 at 21:9 Comment(1)
Thanks for this answer. As a sidenote, Selenium Webdriver truly is a nightmare to install and maintain. The fact that chromedriver only works with one version at a time and must constantly be kept in sync w/ Chrome's auto updates are just one of the reasons why this tech is 'advanced' as far as how difficult it is to maintain. On our team only one person's e2e tests run properly, due to webdriver install/versioning/dependency/OS/CPU issues (yes, all of those). As an Angular dev I'm glad Protractor is being deprecated and can't wait to jump to something like Cypress (does not use Webdriver).Horsefly
E
11

On a mac M1, I was getting the following error:

Selenium::WebDriver::Error::SessionNotCreatedError:
        session not created: This version of ChromeDriver only supports Chrome version 103
        Current browser version is 105.0.5195.125 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
          (Driver info: chromedriver=103.0.5060.134 (8ec6fce403b3feb0869b0732eda8bd95011d333c-refs/branch-heads/5060@{#1262}),platform=Mac OS X 12.5.1 arm64)

I simply upgraded the chromedriver using brew and it fixed the issue for me.

brew upgrade chromeDriver

Emogene answered 15/9, 2022 at 9:20 Comment(2)
This worked for me, but I also had to manually kill a still-running chromedriver process before the upgrade took effect.Essive
This worked for me. On macOS sonoma, I also saw “chromedriver” can’t be opened because Apple cannot check it for malicious software. so I ran xattr -d com.apple.quarantine $(which chromedriver) (found here)Alcatraz
V
8

This error message...

SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 97 Current browser version is 100.0.4896.75 with binary path...

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

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

  • You are using chrome=100.0.4896.75
  • You are using chromedriver=97.0
  • Release Notes of chromedriver=97.0 clearly mentions the following :

Supports Chrome version 97

So there is a clear mismatch between chromedriver=97.0 and the chrome=100.0.4896.75


Solution

Ensure that:

Venita answered 6/4, 2022 at 21:9 Comment(1)
Thanks for this answer. As a sidenote, Selenium Webdriver truly is a nightmare to install and maintain. The fact that chromedriver only works with one version at a time and must constantly be kept in sync w/ Chrome's auto updates are just one of the reasons why this tech is 'advanced' as far as how difficult it is to maintain. On our team only one person's e2e tests run properly, due to webdriver install/versioning/dependency/OS/CPU issues (yes, all of those). As an Angular dev I'm glad Protractor is being deprecated and can't wait to jump to something like Cypress (does not use Webdriver).Horsefly
C
3

In case this helps others, yum install chromium installed Chromium version 102 while npm install -g chromedriver installs version 103, which requires chromium version 103.

I'm sure rolling back to older versions is not the best solution, but for me, installing the complementary version of chromedriver got things running on my system. To install the older version of chromedriver that would align with the chromium version installed by yum, I first went here https://chromedriver.chromium.org/downloads and copied the version number for 102 (in this case 102.0.5005.61)

Then, installing the "correct" version of chromedriver was accomplished by running CHROMEDRIVER_VERSION=102.0.5005.61 npm install -g chromedriver

Collum answered 13/7, 2022 at 13:23 Comment(0)
T
1

Just in case if both Chrome browser version and ChromeDriver versions are in sync, then maybe you should look for the directory from where you project is invoking it, means there could some other directory from where ChromeDriver is being executed and whose version is incompatible with the browser.

In my case, my VS Code was picking up ChromeDriver from project's directory node_modules/.bin/ChromeDriver, so i replaced this with the latest and it worked.

Tremble answered 12/4, 2022 at 17:2 Comment(0)
W
1

For Mac users, I ran into the same problem. My Chrome got auto updated to version 118 (main). And Selenium was reporting

  Selenium::WebDriver::Error::SessionNotCreatedError:
    session not created: This version of ChromeDriver only supports Chrome version 116
    Current browser version is 118.0.5993.70 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

I had to brew update my system with the following command and it was all fine.

 brew -v update; brew upgrade --force-bottle; brew upgrade --cask; brew doctor; brew cleanup

This command updated the Chromedriver.

Wooldridge answered 17/10, 2023 at 10:12 Comment(0)
E
0

For me the problem was that i updated the chromedriver to the newest chrome version via:

npm run e2e:update-webdriver which executes: webdriver-manager update --gecko false

Therefore, the chromedriver version was higher than the chrome browser version. To fix this discrepancy I had to run:

sudo apt-get update and then sudo apt-get --only-upgrade install google-chrome-stable

Hope this helps someone!

Especial answered 2/1, 2023 at 9:45 Comment(0)
M
0

Ran into a similar problem. Usually, I'd fix this by changing the version number in my package.json file to match my chrome browser version. This worked until chromedriver v115 came out. For chromedriver v115, it still worked even though the browser version didn't match. That is I could put in my package.json:

 "webdriver:update": "webdriver-manager update --versions.chrome=114.0.5735.248",

While my browser was 115.0.5790.170. The end to end tests still worked.

Now that chromedriver v116 came out and my browser updated to v116.0.5845.96, the above doesn't work anymore. My workaround was to download the chromedriver-win64.zip and put it in C:\your project\node_modules\webdriver-manager\selenium and extract it. Then you'll have a chromedriver-win64 folder with the chromedrive.exe file. Next is update the update-config.json file to make it point to the latest chromedriver. Update the last like so:

{
  "gecko": {
    ...
  },
  "chrome": {
    "last": "C:\\your project\\node_modules\\webdriver-manager\\selenium\\chromedriver-win64\\chromedriver.exe",
    "all": [
      "C:\\your project\\node_modules\\webdriver-manager\\selenium\\chromedriver_83.0.4103.39.exe",
      "C:\\your project\\node_modules\\webdriver-manager\\selenium\\chromedriver_114.0.5735.248.exe",
      "C:\\your project\\node_modules\\webdriver-manager\\selenium\\chromedriver_114.0.5735.16.exe"
    ]
  },
  "standalone": {
    '''
  }
}

After this, the end to end tests worked again.

Monophagous answered 17/8, 2023 at 13:46 Comment(0)
K
0

You can use version_main argument as follows:

import undetected_chromedriver as uc
driver = uc.Chrome(version_main=116)

(116 is the my current installed chrome main version)

see https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/572

But if the your browser is updated you should change the version_main to the new chrome version So I am using this method to get the current chrome version and pass it as the version_main value:

  1. Install Webdriver Manager for Python: pip install webdriver-manager

  2. Use this code:

    import undetected_chromedriver as uc

    from webdriver_manager.core.os_manager import OperationSystemManager,ChromeType
    br_ver = OperationSystemManager().get_browser_version_from_os(ChromeType.GOOGLE)
    version_main=int(br_ver.split('.')[0]) options = uc.ChromeOptions()
    driver = uc.Chrome(version_main=version_main)

Killie answered 19/9, 2023 at 1:40 Comment(0)
A
0

Ensure that Chromdriver version and chrome version should be same.

Please check latest chrome driver version updates here and download it

https://googlechromelabs.github.io/chrome-for-testing/#stable

Airlike answered 26/7, 2024 at 14:27 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.