12

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

jason karanik
  • 143
  • 1
  • 1
  • 5

6 Answers6

8

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

mansoor.khan
  • 2,309
  • 26
  • 39
  • 1
    This worked for me, but I also had to manually kill a still-running chromedriver process before the upgrade took effect. – Nico Burns Nov 17 '22 at 00:25
6

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:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • 4
    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). – Kyle Vassella May 11 '22 at 10:35
2

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

Steve
  • 776
  • 6
  • 13
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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Karan Sharma
  • 35
  • 1
  • 10
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!

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.

jpllosa
  • 2,066
  • 1
  • 28
  • 30