2

I am having some issue getting my undetected_chromedriver to be on version Chromium: 116.0.5845.96. This issue just started today I have tried nearly everything I can think of, from reinstalling the module, to reinstalling the browsers, and even tested with the version_main=116 paramater which should have fixed it, but it seems that version_main only goes to 114.

Here's my code.

import undetected_chromedriver as uc

driver = uc.Chrome()
driver.get('https://www.example.com')

This is being launched on Chrome Version : Version 116.0.5845.97 (Official Build) (64-bit), returns this error in the console. from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97

Michael Mintz
  • 9,007
  • 6
  • 31
  • 48
Vin
  • 69
  • 6

2 Answers2

2

There's an open ticket on it here: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477


Until the fix is available, you can use SeleniumBase's UC Mode as an alternative, which has a slightly modified version of undetected-chromedriver.

First pip install seleniumbase, and then run the following script with python:

from seleniumbase import Driver
import time

driver = Driver(uc=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(6)
driver.quit()

SeleniumBase also has other formats with its own API:

from seleniumbase import SB

with SB(uc=True) as sb:
    sb.open("https://nowsecure.nl/#relax")
    sb.sleep(3)
    if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
        sb.get_new_driver(undetectable=True)
        sb.open("https://nowsecure.nl/#relax")
        sb.sleep(3)
    sb.assert_text("OH YEAH, you passed!", "h1", timeout=3)
Michael Mintz
  • 9,007
  • 6
  • 31
  • 48
  • Worked fine for me on windows, but I can't seem to get seleniumbase working on linux with google-chrome 116. Getting error `selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:9222` using Python 3.7 – Carlos Herrera Aug 22 '23 at 21:52
0

This worked for me:

pip uninstall undetected_chromedriver
pip install undetected_chromedriver
Mr Ibrahim
  • 11
  • 1