ChromeDriver Not Updated?

I'm getting an error message that the wrong ChromeDriver version is installed. Is there a solution for this? The run ID is 1kRoKIMf7ld1UVQgf and the message from the log is :
2023-04-05T16:16:49.544Z selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:51597
2023-04-05T16:16:49.545Z from session not created: This version of ChromeDriver only supports Chrome version 112
2023-04-05T16:16:49.546Z Current browser version is 111.0.5563.64
2023-04-05T16:16:49.544Z selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:51597
2023-04-05T16:16:49.545Z from session not created: This version of ChromeDriver only supports Chrome version 112
2023-04-05T16:16:49.546Z Current browser version is 111.0.5563.64
6 Replies
correct-apricot
correct-apricot3y ago
Thanks for the report, passed it to our Python devs, will get back to you once there's some information.
flat-fuchsia
flat-fuchsiaOP3y ago
thank you!
correct-apricot
correct-apricot3y ago
So I got the response from the team: It's that undetected-chromedriver you're using, which expects that you have a latest version of Chrome installed by default. You have to do something like this:
driver = undetected_chromedriver.Chrome(options=chrome_options, version_main=111)
driver = undetected_chromedriver.Chrome(options=chrome_options, version_main=111)
https://github.com/ultrafunkamsterdam/undetected-chromedriver#words-of-wisdom
GitHub
GitHub - ultrafunkamsterdam/undetected-chromedriver: Custom Seleniu...
Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM) - GitHub - ultrafunkamsterdam/undetected-chromedriver: Custom Se...
correct-apricot
correct-apricot3y ago
This will break every time we update the base image with a new Chrome version though, so ideally you'll have to detect the version dynamically:
driver = webdriver.Chrome(options=chrome_options)
installed_chrome_version = driver.capabilities['browserVersion'].split('.')[0]
driver.quit()

driver = undetected_chromedriver.Chrome(options=chrome_options, version_main=installed_chrome_version)
driver = webdriver.Chrome(options=chrome_options)
installed_chrome_version = driver.capabilities['browserVersion'].split('.')[0]
driver.quit()

driver = undetected_chromedriver.Chrome(options=chrome_options, version_main=installed_chrome_version)
flat-fuchsia
flat-fuchsiaOP3y ago
thank you, i will give this a try it works! thanks again
correct-apricot
correct-apricot3y ago
Perfect, happy to help!

Did you find this page helpful?