0

I have google-chrome and chromedriver installed on EC2, and they both have the same version.

$ google-chrome-stable -version
Google Chrome 109.0.5414.74 
$ chromedriver -v
ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414@{#1172})

But once I run a Selenium script, it fails with the following error:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:47871
from session not created: This version of ChromeDriver only supports Chrome version 110
Current browser version is 109.0.5414.74

How is it possible since I have a single version of chromedriver which is installed in /usr/bin?

import undetected_chromedriver as uc
uc.Chrome(options=options, executable_path='/usr/bin/chromedriver')
Mike
  • 347
  • 1
  • 2
  • 15
  • Did you try specifying the chromediver-path explicitly (https://stackoverflow.com/a/29858817/20443541) – kaliiiiiiiii Feb 08 '23 at 19:03
  • yes, I did: `import undetected_chromedriver as uc` `uc.Chrome(options=options, executable_path='/usr/bin/chromedriver')` – Mike Feb 09 '23 at 10:30

1 Answers1

0

From the console though it seems you are using ChromeDriver 109.0.5414.74:

$ chromedriver -v
ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414@{#1172})

But somewhere in your program or within the framework settings ChromeDriver v110.0.5481.77 is/gets downloaded and is being used to initiate the ChromeDriver / session.

As per the Release Notes of ChromeDriver 110.0.5481.77 (2023-02-08):

Supports Chrome version 110

Where as you are still using Version 109.0.5414.120. Hence the mismatch and the error.

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