Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80

when i go to command prompt and type chromedriver -v:

ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614})

but when i try to run this code :

from selenium import webdriver 
class InstaBot:
    def __init__(self):
        self.driver=webdriver.Chrome()
        self.driver.get("www.instagram.com")
InstaBot()

it gives me error like this: raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80

why this is happening i tried to remove selenium as well as chromedriver and reinstall of version 79.0.3945 but when i run it ,it show this can only be run on version 80 my chrome version is 79.0.3945 which is lastest ,and version 80 chrome is chrome beta

like image 370
HARSH SINGH Avatar asked Oct 19 '25 09:10

HARSH SINGH


1 Answers

This error message...

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80

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


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

  • You mentioned about using chromedriver=79.0.3945.36 and the release notes of chromedriver=79.0 clearly mentions the following :

Supports Chrome v79

  • Presumably you are using chrome v79.0 browser.
  • So, it's quite evident your have chromedriver=80.0 present within your system which is also within the system PATH variable and is invoked while you:

    self.driver=webdriver.Chrome()
    

Solution

There are two solutions:

  • Either you upgrade chrome to Chrome Version 80.0 level. (as per ChromeDriver v80.0 release notes)
  • Or you can override the default chromedriver v80.0 binary location with chromedriver v79.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/')
    

You can find a detailed discussion in Ubuntu: selenium.common.exceptions: session not created: This version of ChromeDriver only supports Chrome version 79


Additional Considerations

Ensure to:

  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test as non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

Reference

You can find a relevant detailed discussion in:

  • How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
like image 66
undetected Selenium Avatar answered Oct 21 '25 23:10

undetected Selenium



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!