Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:65490 from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97 #1477

Closed
mominurr opened this issue Aug 16, 2023 · 99 comments

Comments

@mominurr
Copy link

Traceback (most recent call last):
File "D:\Testing_all_project\test.py", line 27, in
driver = uc.Chrome(options=options)
File "D:\Testing_all_project\env\lib\site-packages\undetected_chromedriver_init_.py", line 466, in init
super(Chrome, self).init(
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 49, in init
super().init(
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 54, in init
super().init(
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in init
self.start_session(capabilities)
File "D:\Testing_all_project\env\lib\site-packages\undetected_chromedriver_init_.py", line 724, in start_session
super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 291, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute
self.error_handler.check_response(response)
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:65490
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97
Stacktrace:
Backtrace:
GetHandleVerifier [0x00E0A813+48355]
(No symbol) [0x00D9C4B1]
(No symbol) [0x00CA5358]
(No symbol) [0x00CC61AC]
(No symbol) [0x00CC06B4]
(No symbol) [0x00CC0491]
(No symbol) [0x00CF0C55]
(No symbol) [0x00CF093C]
(No symbol) [0x00CEA536]
(No symbol) [0x00CC82DC]
(No symbol) [0x00CC93DD]
GetHandleVerifier [0x0106AABD+2539405]
GetHandleVerifier [0x010AA78F+2800735]
GetHandleVerifier [0x010A456C+2775612]
GetHandleVerifier [0x00E951E0+616112]
(No symbol) [0x00DA5F8C]
(No symbol) [0x00DA2328]
(No symbol) [0x00DA240B]
(No symbol) [0x00D94FF7]
BaseThreadInitThunk [0x762600C9+25]
RtlGetAppContainerNamedObjectPath [0x77B07B1E+286]
RtlGetAppContainerNamedObjectPath [0x77B07AEE+238]

@binstc
Copy link

binstc commented Aug 16, 2023

driver = uc.Chrome(driver_executable_path='/usr/local/bin/chromedriver')

@Matt10233
Copy link

Same

@mominurr
Copy link
Author

driver = uc.Chrome(driver_executable_path='/usr/local/bin/chromedriver')

chrome open and automatic close. Not working. I am use this code:
chromedriver_path = r"D:\Testing_all_project\chromedriver.exe"
driver = uc.Chrome(driver_executable_path=chromedriver_path,options=options)

@362227
Copy link

362227 commented Aug 16, 2023

driver = uc.Chrome(driver_executable_path='/usr/local/bin/chromedriver')

chrome open and automatic close. Not working. I am use this code: chromedriver_path = r"D:\Testing_all_project\chromedriver.exe" driver = uc.Chrome(driver_executable_path=chromedriver_path,options=options)

The Same, Not working

@jdholtz
Copy link
Contributor

jdholtz commented Aug 16, 2023

Would you be able to try the attached PR to see if the fix is working for you?

@mominurr
Copy link
Author

Would you be able to try the attached PR to see if the fix is working for you?

what is PR? Please describe?

@h656
Copy link

h656 commented Aug 16, 2023

I am facing the same issue.

@jdholtz
Copy link
Contributor

jdholtz commented Aug 16, 2023

what is PR? Please describe?

@mominurr #1478, the one right above my comment (unfortunately, it didn't attach to the issue)

@h656
Copy link

h656 commented Aug 16, 2023

How do we use it @jdholtz
If I am using 116, then it crashes with 404 not found

@h656
Copy link

h656 commented Aug 16, 2023

    chrome_options1 = ChromeOptions()
    chrome_options1.add_argument("--incognito")
    chrome_options1.add_argument('--disable-popup-blocking')
    chrome_options1.add_argument("--force-device-scale-factor=0.8")
    driver = Chrome(options=chrome_options1, version_main=116)

@h656
Copy link

h656 commented Aug 16, 2023

This is what when i use.

@jdholtz
Copy link
Contributor

jdholtz commented Aug 16, 2023

@h656 what happens if you don’t specify the version_main? Also, are you sure you are using my changes on the correct branch?

To use my PR, you’ll need to clone my fork and checkout to 115-compatibility. Then, you can import it through the Python terminal or run setup.py to install it (I haven’t used this approach but it should allow you to use my fork instead)

@h656
Copy link

h656 commented Aug 16, 2023

@h656 what happens if you don’t specify the version_main? Also, are you sure you are using my changes on the correct branch?

from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97

@h656
Copy link

h656 commented Aug 16, 2023

This is the error that I face. No, I am actually using the pip undetected chromedriver

@stevenbaum18
Copy link

I'm getting this error using the patcher.py from your PR
KeyError: "There is no item named 'chromedriver-win32\\chromedriver.exe' in the archive"

@Matt10233
Copy link

I'm getting this error using the patcher.py from your PR

KeyError: "There is no item named 'chromedriver-win32\\chromedriver.exe' in the archive"

Yeah same

@jdholtz
Copy link
Contributor

jdholtz commented Aug 16, 2023

@stevenbaum18 thanks for testing. I haven’t tested on Windows yet, so I’ll fix that in a few hours

@h656
Copy link

h656 commented Aug 16, 2023

Easiest Hack or Wordaround That I have right now is
Install pip install webdriver_manager

Use
from webdriver_manager.chrome import ChromeDriverManager

latestchromedriver = ChromeDriverManager().install()

#set options
driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)

@h656
Copy link

h656 commented Aug 16, 2023

This works perfectly.

@mominurr
Copy link
Author

Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager

Use from webdriver_manager.chrome import ChromeDriverManager

latestchromedriver = ChromeDriverManager().install()

#set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)

I am trying this code but not working.

@h656
Copy link

h656 commented Aug 16, 2023

Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager
Use from webdriver_manager.chrome import ChromeDriverManager
latestchromedriver = ChromeDriverManager().install()
#set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)

I am trying this code but not working.

Whats the error?

@stevenbaum18
Copy link

Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager

Use from webdriver_manager.chrome import ChromeDriverManager

latestchromedriver = ChromeDriverManager().install()

#set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)

I got your code working with the following code added

from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import urllib.request

try:
service = Service(ChromeDriverManager().install())
except ValueError:
latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8')
service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())
driver_executable_path = service.path

@mominurr
Copy link
Author

Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager
Use from webdriver_manager.chrome import ChromeDriverManager
latestchromedriver = ChromeDriverManager().install()
#set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)

I am trying this code but not working.

Whats the error?

driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)

Traceback (most recent call last):
File "D:\Testing_all_project\test.py", line 50, in
driver = selenium_chromedriver()
File "D:\Testing_all_project\test.py", line 44, in selenium_chromedriver
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
TypeError: WebDriver.init() got multiple values for argument 'options'

@stevenbaum18
Copy link

try this with my code above
driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)

@mominurr
Copy link
Author

try this with my code above driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)

can you please provide full code?

@stevenbaum18
Copy link

from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import urllib.request

try:
        service = Service(ChromeDriverManager().install())
except ValueError:
        latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
        latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8')
        service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())
driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)
driver_executable_path = service.path

@mominurr
Copy link
Author

from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import urllib.request

try:
        service = Service(ChromeDriverManager().install())
except ValueError:
        latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
        latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8')
        service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())
driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)
driver_executable_path = service.path

try:
service = Service(ChromeDriverManager().install())
except ValueError:
latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8')
service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())

Configure Chrome options

options = webdriver.ChromeOptions()
options.add_argument("--enable-automation")
options.add_argument("--enable-logging")
options.add_argument('--incognito')
driver_executable_path = service.path
driver = webdriver.Chrome(options=options, driver_executable_path=driver_executable_path)

Traceback (most recent call last):
File "D:\Testing_all_project\test.py", line 69, in
driver = webdriver.Chrome(options=options, driver_executable_path=driver_executable_path)
TypeError: WebDriver.init() got an unexpected keyword argument 'driver_executable_path'

@h656
Copy link

h656 commented Aug 16, 2023 via email

@mdmintz
Copy link

mdmintz commented Aug 16, 2023

Until the fix is available here, 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)

One of the main reasons I get fixes out earlier in SeleniumBase (my repo), is because I'm also a maintainer of Selenium, (https://github.com/SeleniumHQ/selenium/pulls?q=is%3Apr+author%3Amdmintz+is%3Aclosed+), and so I hear about breaking changes before most maintainers of projects that use Selenium do. The issue from this ticket was actually initiated by the Chromium Team when they restructured driver downloads for the new Chrome-for-Testing, (see https://googlechromelabs.github.io/chrome-for-testing/).

@martinpolu
Copy link

This code works better than any other

Download this first:

list Chromedriver

download version 116 Chromedriver for win64

Chromedriver 116

options = uc.ChromeOptions() options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage')

enable browser logging

d = DesiredCapabilities.CHROME d["goog:loggingPrefs"] = {"browser": "INFO"}

chromedriver_path = r"D:\chromedriver.exe" driver = uc.Chrome(driver_executable_path=chromedriver_path, use_subprocess=True, options=options, desired_capabilities=d)

Hi! What should I include in the line:

d = DesiredCapabilities.CHROME

Thanks!

@YanisFallet
Copy link

so who achieved to fix the problem ?

@jdholtz
Copy link
Contributor

jdholtz commented Aug 20, 2023

@YanisFallet you can use my fork (see #1478) to fix the issue until it is merged

@FerCipriani
Copy link

@FerCipriani you can download my fork for now which contains the fix. The pip command can be found in the comments of PR #1478.

Hello, yes, I used it and it really works.
I have a case where it doesn't and I'm working on it.
Thanks a lot!

@YanisFallet
Copy link

it seems that undetected chromedriver doesn't work anymore for ARM

@JaberHaisan
Copy link

It works for me pip uninstall undetected_chromedriver pip install undetected_chromedriver

You can do it in one line with: pip install --upgrade undetected_chromedriver

@ultrafunkamsterdam
Copy link
Owner

Correct pip name is with dash not underscore

@EarendeIl
Copy link

EarendeIl commented Aug 21, 2023

回溯(最近一次调用最后一次): 文件“D:\Testing_all_project\test.py”,第 27 行,在 driver = uc.Chrome(options=options) 文件“D:\Testing_all_project\env\lib\site-packages\unDetected_chromedriver_ init .py”,第 466 行,在init super(Chrome, self) 中。init ( 文件 "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\chrome\webdriver.py",第 49 行,在 init super( ) 中。init ( 文件 "D:\Testing_all_project\env\lib\ site-packages\selenium\webdriver\chromium\webdriver.py",第 54 行,在init super() 中。init ( 文件“D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py”,第 206 行,在 init self.start_session (功能)中 文件“D:\Testing_all_project\env\lib\site- packages\unDetected_chromedriver init _.py",第 724 行,在 start_session super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session( File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\ Remote\webdriver.py",第 291 行,在 start_session 响应 = self.execute(Command.NEW_SESSION, caps)["value"] 文件 "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\ webdriver.py”,第 346 行,执行 self.error_handler.check_response(response) 文件“D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\errorhandler.py”,第 245 行,在 check_response 中 引发异常_类(消息、屏幕、堆栈跟踪) selenium.common.exceptions.WebDriverException:消息:未知错误:无法从未创建的会话连接到 127.0.0.1:65490 的 chrome :此版本的 ChromeDriver 仅支持 Chrome 版本 114 当前浏览器版本为 116.0.5845.97 Stacktrace: Backtrace: GetHandleVerifier [0x00E0A813+48355] (无符号)[0x00D9C4B1 ] (无符号) [0x00CA5358] (无符号) [0x00CC61AC] (无符号) [0x00CC06B4] (无符号) [0x00CC0491] (无符号) [0x00CF0C55] (无符号) [0x00CF093C] (无符号) [0x00CEA536] (无符号) [0x00CC82DC] (无符号) [0x00CC93DD] GetHandleVerifier [0x0106AABD+2539405] GetHandleVerifier [ 0x010AA78F+2800735] GetHandleVerifier [0x010A456C+2775612] GetHandle验证器[0x00E951E0+616112] (无符号)[ 0x00DA5F8C] (无符号)[0x00DA2328] (无符号)[0x00DA240B] (无符号)[0x00D94FF7] BaseThreadInitThunk [0x762600C9+25] RtlGetAppContainerNamedObjectPath [0x77B07B1E+286] RtlGetAppContainerNamedObjectPath [0x77B07AEE+ 238]

because your chromedriver is no longer suitable for the current version,Downloading a new driver solves the problem,https://googlechromelabs.github.io/chrome-for-testing/

@JeffJna
Copy link

JeffJna commented Aug 21, 2023

Step 1: Download ChromeDriver

Download ChromeDriver from the official downloads page. Make sure to choose the appropriate version for your operating system.

Step 2: Extract ChromeDriver

After downloading, extract the zip file to a location of your choice. For example, you can extract it to the root of your C:\ drive.

Step 3: Configure PATH

Step 4: Open Git Bash terminal or your preferred terminal and add the path to ChromeDriver to your PATH.

Make sure to use forward slashes ("/") in the path to ChromeDriver on Windows. Replace "/c" with the drive where you extracted ChromeDriver:

export PATH=$PATH:/c/chromedriver-win32

Step 5: Check if ChromeDriver is configured correctly by running the following command:

chromedriver --version

You should see the ChromeDriver version returned, e.g., "116.0.5845.96."

Step 6: In your automated testing project, configure WebDriverManager to use the specific version of ChromeDriver you installed. For example:

WebDriverManager.chromedriver().driverVersion("116.0.5845.96").setup();
WebDriver driver = new ChromeDriver();

Obs. my pom.xml

    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>5.4.1</version>
        <scope>test</scope>
    </dependency>

I followed these steps, and it worked perfectly for me.

@CameronJGrant
Copy link

CameronJGrant commented Aug 21, 2023

I'm using undetected chromedriver but it is detected by cloudflare, My browser version is 116. Was the Cloudflare upgraded?

The Chromedriver binary needs to be patched in order to be undetectable. If you are downloading the file yourself, it's not patched. May as well be using regular old selenium.

@irfanlogisly
Copy link

This code works better than any other

Download this first:

list Chromedriver

download version 116 Chromedriver for win64

Chromedriver 116
options = uc.ChromeOptions() options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage')

enable browser logging

d = DesiredCapabilities.CHROME d["goog:loggingPrefs"] = {"browser": "INFO"}
chromedriver_path = r"D:\chromedriver.exe" driver = uc.Chrome(driver_executable_path=chromedriver_path, use_subprocess=True, options=options, desired_capabilities=d)

Thanks, it works for me. Added the --disable-dev-shm-usage to the options:

ChromeOptions options = new ChromeOptions(); options .addArguments("--headless"); options .addArguments("window-size=1920x1080"); options .addArguments( "--no-sandbox"); options .addArguments("--remote-allow-origins=*"); options .addArguments("--disable-dev-shm-usage");

And add the version to the webdriver manager: WebDriverManager.chromedriver().driverVersion("116.0.5845.96").setup();

Thanks for sharing, may i know did you use dependency selenium driver that put on pom.xml or chrome driver path ?

@irfanlogisly
Copy link

WebDriverManager.chromedriver().driverVersion("116.0.5845.96").setup();

i still facing this error
Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114

this my chrome option :
WebDriverManager.chromedriver().driverVersion("116.0.5845.96").setup();
//Create a map to store preferences
Map<String, Object> prefs = new HashMap<>();
//add key and value to map as follow to switch off browser notification
//Pass the argument 1 to allow and 2 to block
prefs.put("profile.default_content_setting_values.notifications", 2);
// set ExperimentalOption - prefs
chromeOptions.setExperimentalOption("prefs", prefs);
chromeOptions.addArguments("--remote-allow-origins=*");
chromeOptions.addArguments("--incognito");
// chromeOptions.addArguments("--headless");
// chromeOptions.addArguments("--start-maximized");
chromeOptions.addArguments("window-size=1366,768");
chromeOptions.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
chromeOptions.setExperimentalOption("useAutomationExtension", false);
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--disable-dev-shm-usage");
chromeOptions.addArguments("--disable-gpu");

@irfanlogisly
Copy link

work fine on my side
if you using maven framework, update selenium and webdriver dependency to the latest version on pom.xlm

org.seleniumhq.selenium selenium-java 4.11.0 io.github.bonigarcia webdrivermanager 5.4.1

@OrianShamriz
Copy link

This one maybe can help you guys :)
https://www.youtube.com/watch?v=MWVzCuTK2bs&t=1s

@knagode
Copy link

knagode commented Aug 22, 2023

Mac: After replacing chromedriver in /usr/local/bin/, make sure that you run it first in order to allow execution from unverified developers (System Preferences -> Security)

@JeffJna
Copy link

JeffJna commented Aug 22, 2023

This code works better than any other

Download this first:

list Chromedriver

download version 116 Chromedriver for win64

Chromedriver 116
options = uc.ChromeOptions() options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage')

enable browser logging

d = DesiredCapabilities.CHROME d["goog:loggingPrefs"] = {"browser": "INFO"}
chromedriver_path = r"D:\chromedriver.exe" driver = uc.Chrome(driver_executable_path=chromedriver_path, use_subprocess=True, options=options, desired_capabilities=d)

Thanks, it works for me. Added the --disable-dev-shm-usage to the options:
ChromeOptions options = new ChromeOptions(); options .addArguments("--headless"); options .addArguments("window-size=1920x1080"); options .addArguments( "--no-sandbox"); options .addArguments("--remote-allow-origins=*"); options .addArguments("--disable-dev-shm-usage");
And add the version to the webdriver manager: WebDriverManager.chromedriver().driverVersion("116.0.5845.96").setup();

Thanks for sharing, may i know did you use dependency selenium driver that put on pom.xml or chrome driver path ?

    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>5.4.1</version>
        <scope>test</scope>
    </dependency>

@adrianhorning08
Copy link

I used homebrew to install the latest version brew install --cask chromedriver and then updated the path
driver_executable_path="/usr/local/bin/chromedriver",

@masterkikoman
Copy link

Does anyone try the lastet using JAVA and MAVEN? my code is not working via remote driver but when I add the actual path of chrome driver to my code, it's working. Do you know how can I fix this error? I already add the latest version of the chrome driver in my POM.xml in this maven repo https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver But I still encounter that error.

@fishtown
Copy link

pip install -e git+https://github.com/jdholtz/undetected-chromedriver.git@f91b7d86bc257d4cb9bfc848266e82509868e2c6#egg=undetected_chromedriver This is worked for me. Thank you everybody.

It works perfect and it seems the BKM

@jdholtz
Copy link
Contributor

jdholtz commented Aug 23, 2023

@fishtown FYI that is the first version. I’ve made a few changes (mostly related to Mac) in the most recent version. You can find the install link in the first comment of my PR (#1478)

@irfanlogisly
Copy link

Hi All, Anyone facing issue on chrome driver 116.0.5845.111 for selenium ?

@ultrafunkamsterdam
Copy link
Owner

just updated the package to 3.5.3 including @jdholtz pr

@Jmsestrada
Copy link

@h656 what happens if you don’t specify the version_main? Also, are you sure you are using my changes on the correct branch?

from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97

im getting this error

@jdholtz
Copy link
Contributor

jdholtz commented Sep 4, 2023

@Jmsestrada use version 3.5.3 of undetected chromedriver

@ericdwkim
Copy link

Adding this in case others stumble onto this. This uses a combination of selenium version 4+'s Service class and sets the executable_path to ChromeDriverManager().install() and it worked for me. This beats having to constantly update via homebrew.

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


        web_driver = webdriver.Chrome(
            service=Service(executable_path=ChromeDriverManager().install()),
            options=opts
        )

Console output

/Users/ekim/opt/anaconda3/envs/bots/bin/python -m src.app.__main__ 
2024-02-21 12:13:14,064 - INFO - Initializing ChromeDriver...
2024-02-21 12:13:14,064 - INFO - ====== WebDriver manager ======
2024-02-21 12:13:14,380 - INFO - Get LATEST chromedriver version for google-chrome
2024-02-21 12:13:14,384 - INFO - Get LATEST chromedriver version for google-chrome
2024-02-21 12:13:14,384 - INFO - There is no [mac64] chromedriver "122.0.6261.57" for browser google-chrome "122.0.6261.57" in cache
2024-02-21 12:13:14,395 - INFO - Get LATEST chromedriver version for google-chrome
2024-02-21 12:13:14,609 - INFO - WebDriver version 122.0.6261.57 selected
2024-02-21 12:13:14,610 - INFO - Modern chrome version https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.57/mac-x64/chromedriver-mac-x64.zip
2024-02-21 12:13:14,610 - INFO - About to download new driver from https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.57/mac-x64/chromedriver-mac-x64.zip
2024-02-21 12:13:14,836 - INFO - Driver downloading response is 200
2024-02-21 12:13:15,305 - INFO - Get LATEST chromedriver version for google-chrome
2024-02-21 12:13:15,430 - INFO - Driver has been saved in cache [/Users/ekim/.wdm/drivers/chromedriver/mac64/122.0.6261.57]

Process finished with exit code 0

@plexydraw
Copy link

How can you avoid selenium detection on twitch?

@plexydraw
Copy link

I have a problem with the detection of the chromedriver browser because if I do it manually it allows me to register but when the forms are completed automatically with selenium it tells me that the browser is not compatible and it does not let me finish the registration this happens to me on twitch. Does anyone know any solution?

@hikmetazimzade
Copy link

@xthomas8888
Copy link

I experienced a similar but different issue.

My error is: This version of ChromeDriver only supports Chrome version 130
Current browser version is 129.0.6668.101.

Checked Chromedriver JSON Endpoints. Looks like undeteced_chromedriver does not work for a previous version when new stablized version is released (In this case, not working for version 129 since 130 has been released) even though with configuring driver_executable_path to a downloaded previous chromedriver via Chromedrivermanager. Any thoughts on this other than manually updating Chrome browser (which I did and it worked),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests