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

Viewed 12471

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

4 Answers

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:

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

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.

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

Related