1
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from time import sleep


driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))


driver.get(input("Link: "))

I've opened my app after some months and Chromium updated version. It's tells that ChromeDriver supports only 114 version, but I've installed the 113.0.5672.63 one but it's doesn't work like before. When I try to start my Selenium app I get this error:

     
[29728:29416:0809/171603.204:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.

DevTools listening on ws://127.0.0.1:52567/devtools/browser/abc399bf-e2a2-40b8-8c14-360ebee67372
Traceback (most recent call last):
  File "main.py", line 8, in <module>
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
    super().__init__(
  File "Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 56, in __init__
    super().__init__(
  File "Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in __init__
    self.start_session(capabilities)
  File "AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 290, in start_session      
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
    self.error_handler.check_response(response)
  File "AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, 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 114        
Current browser version is 113.0.5672.0 with binary path 
AppData\Local\Chromium\Application\chrome.exe
Stacktrace:
Backtrace:
        GetHandleVerifier [0x0078A813+48355]
        (No symbol) [0x0071C4B1]
        (No symbol) [0x00625358]
        (No symbol) [0x006461AC]
        (No symbol) [0x00641EF3]
        (No symbol) [0x00640579]
        (No symbol) [0x00670C55]
        (No symbol) [0x0067093C]
        (No symbol) [0x0066A536]
        (No symbol) [0x006482DC]
        (No symbol) [0x006493DD]
        GetHandleVerifier [0x009EAABD+2539405]
        GetHandleVerifier [0x00A2A78F+2800735]
        GetHandleVerifier [0x00A2456C+2775612]
        GetHandleVerifier [0x008151E0+616112]
        (No symbol) [0x00725F8C]
        (No symbol) [0x00722328]
        (No symbol) [0x0072240B]
        (No symbol) [0x00714FF7]
        BaseThreadInitThunk [0x75B07D59+25]
        RtlInitializeExceptionChain [0x7728B79B+107]
        RtlClearBits [0x7728B71F+191]

How do I resolve this?

  • As completely different solution, you may want to use [playwright](https://playwright.dev/python/docs/intro) instead, which doesn't use webdriver but just talks directly to Chrome using the far more modern debugger api. Selenium will feel ridiculously overcomplicated once you're free of the whole webdriver nonsense. – Mike 'Pomax' Kamermans Aug 09 '23 at 15:44
  • @Gugu72 that question isn't even a question, and this question was asked first. – UpAndAdam Aug 23 '23 at 20:53
  • @UpAndAdam You're right, I should have asked for a merge since this might be the best asked question and the best answer is on the one I linked (downgrading the browser isn't a viable solution, nor downloading the last chrome driver manually, since you would need to not stay up-to-date, or to download the driver for each browser update) – Gugu72 Aug 24 '23 at 07:21
  • The problem is the same, there _is_ a question on the target question, and date is not the most important thing for determining duplicate closure order. The target is far more visible at 17 _thousand_ views to this posts' mere 183. The solutions on the target are also the same, if not _more_ varied. – TylerH Aug 24 '23 at 15:40
  • Good point @TylerH, i should have checked on meta what the way to handle that is, now i know. – UpAndAdam Aug 24 '23 at 18:19

3 Answers3

1

In the latest version of selenium, there's a driver manager that replaces ChromeDriverManager. You should no longer use ChromeDriverManager or pass in an executable_path to Chrome().

Try this after upgrading your selenium version:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
# ...
driver.quit()
Michael Mintz
  • 9,007
  • 6
  • 31
  • 48
0

Try to downgrade your webdriver to match your browser version

webdriver.Chrome(service=Service(ChromeDriverManager("113.0.5672.63").install())```
-1

This error message...

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114        
Current browser version is 113.0.5672.0 with binary path 
AppData\Local\Chromium\Application\chrome.exe

...implies that SessionNotCreatedException was raised due to ChromeDriver and version mismatch.


Details

The Google Chrome instance which you used to open your app is installed in a customized location, for which Chromium updated the version to v114.0

However the Google Chrome instance which is installed at the default location i.e. AppData\Local\Chromium\Application\chrome.exe is still at 113.0.5672.0. Hence the mismatch.


Solution

Manually open a Google Chrome instance using AppData\Local\Chromium\Application\chrome.exe binary and update the version and then execute your test. You'll be good to go.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352