SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 96 Current browser version is 98.0
Asked Answered
S

8

23

Error tracelogs:

DevTools listening on ws://127.0.0.1:54791/devtools/browser/6f264bcc-d44a-40d9-b6cf- 
8b1655c97ccd
Traceback (most recent call last):
File "c:\Users\alsgn\OneDrive\desktop\mypython\getselenium\dc\findbulletins.py", line 11, in 
<module>
browser = webdriver.Chrome()
File "C:\Users\alsgn\AppData\Local\Programs\Python\Python39\lib\site- 
packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\alsgn\AppData\Local\Programs\Python\Python39\lib\site- 
packages\selenium\webdriver\chromium\webdriver.py", line 93, in __init__
RemoteWebDriver.__init__(
File "C:\Users\alsgn\AppData\Local\Programs\Python\Python39\lib\site- 
packages\selenium\webdriver\remote\webdriver.py", line 268, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\alsgn\AppData\Local\Programs\Python\Python39\lib\site- 
packages\selenium\webdriver\remote\webdriver.py", line 359, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\alsgn\AppData\Local\Programs\Python\Python39\lib\site- 
packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "C:\Users\alsgn\AppData\Local\Programs\Python\Python39\lib\site- 
packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This 
version of ChromeDriver only supports Chrome version 96
Current browser version is 98.0.4758.82 with binary path C:\Program 
Files\Google\Chrome\Application\chrome.exe
Stacktrace:
Backtrace:
    Ordinal0 [0x00FF6903+2517251]
    Ordinal0 [0x00F8F8E1+2095329]
    Ordinal0 [0x00E92848+1058888]
    Ordinal0 [0x00EB0B9D+1182621]
    Ordinal0 [0x00EACA60+1165920]
    Ordinal0 [0x00EAA2CF+1155791]
    Ordinal0 [0x00EDAAAF+1354415]
    Ordinal0 [0x00EDA71A+1353498]
    Ordinal0 [0x00ED639B+1336219]
    Ordinal0 [0x00EB27A7+1189799]
    Ordinal0 [0x00EB3609+1193481]
    GetHandleVerifier [0x01185904+1577972]
    GetHandleVerifier [0x01230B97+2279047]
    GetHandleVerifier [0x01086D09+534521]
    GetHandleVerifier [0x01085DB9+530601]
    Ordinal0 [0x00F94FF9+2117625]
    Ordinal0 [0x00F998A8+2136232]
    Ordinal0 [0x00F999E2+2136546]
    Ordinal0 [0x00FA3541+2176321]
    BaseThreadInitThunk [0x755AFA29+25]
    RtlGetAppContainerNamedObjectPath [0x775C7A9E+286]
    RtlGetAppContainerNamedObjectPath [0x775C7A6E+238]

The code that I ran was okay in 2 days ago, but now, the code have been showed this error. Please say how to solve this problem. I wonder why it ran well before.

Segura answered 11/2, 2022 at 15:31 Comment(2)
The error is clear selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 96 Current browser version is 98.0.4758.82 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe It's a version compatibility issue. Your Chrome browser is updated to version 98 but your driver is still inversion 96. Download the updated chromedriver (chromedriver 98) and it should workCupronickel
seems like below link is more useful. googlechromelabs.github.io/chrome-for-testingRawdin
L
9

I had same problem, what you should do is to just head on to https://chromedriver.chromium.org/downloads and see the version of your browser and download accordingly, just replace the chromedriver.exe (old) with the new downloaded, it will work fine.

Luciferin answered 6/7, 2022 at 7:56 Comment(0)
E
7

This error message...

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 96
Current browser version is 98.0.4758.82 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

...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:

Supports Chrome version 98

Supports Chrome version 96

So there is a clear mismatch between chromedriver=96.0 and the chrome=96.0.4664.45


Solution

Ensure that:

Es answered 11/2, 2022 at 21:50 Comment(0)
B
4

I also get this error message cause I forgot to turn of chrome updates. I used chromedriver 98.0.4758.80 but now my chrome is 98.0.4758.82. So you'll receive this or a samebased message even if you update to the latest chromedriver 98.0.4758.80 which I use.

For me there are two solutions and first of all turn chrome update services off.

  • wait for new chromedriver update supporting 98.0.4758.82
  • downgrade chrome to version 98.0.4758.80 - I am still struggling performing the downgrade.

Maybe somebody can explain how to downgrade chrome to an earlier version. Otherwise we need to wait for the update of the chromedriver.

Bejarano answered 13/2, 2022 at 10:46 Comment(0)
D
3

In my case just by upgrading chromedriver autoinstaller the problem got solved.

pip install --upgrade chromedriver-autoinstaller

Run the above command as Administrator.

Dayton answered 1/3, 2023 at 8:4 Comment(0)
A
2

Your output log states:

This version of ChromeDriver only supports Chrome version 96
Current browser version is 98.0.4758.82 with binary path

You have two options:

  1. Use chromedriver for Chrome 98
  2. Install Chrome 96
Asyllabic answered 11/2, 2022 at 15:34 Comment(0)
T
1

For C# users, the following does the update automatically for you, if required:

IWebDriver driver;
try
{
    driver = new ChromeDriver(chromeOptions);
} 
catch(System.InvalidOperationException ex)
{
    // Update the chromedriver, then retry.
    new WebDriverManager.DriverManager().SetUpDriver(new ChromeConfig(), VersionResolveStrategy.MatchingBrowser);
    driver = new ChromeDriver(chromeOptions);
}

If an older version is found, the exception is caught, an update is run, and the error disappears.

Timorous answered 5/4, 2023 at 17:24 Comment(0)
R
1

This is the solution I have come up with recently. I am using macOS and Python 3.11 for UI automation.

You may use the below pip command to install the correct version of chromedriver.

brew install --cask chromedriver

If you see, the chromedriver is already installed in your system, do a re-install from the below command.

brew reinstall --cask chromedriver
Reichenberg answered 24/4, 2023 at 6:0 Comment(0)
B
0

@Ssproutt, Chromedriver is updated to version 98.0.4758.102.

  1. Update Chrome Browser to Version 98.0.4758.102
  2. download the newest Chromedriver https://chromedriver.storage.googleapis.com/index.html?path=98.0.4758.102/

Take care of your version missmatches. You can make sure not to update your chrome browser by rename the chrome update file (GoogleUpdate.exe) located in C:\Program Files (x86)\Google\Update\

Bejarano answered 15/2, 2022 at 9:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.