fysh711426 / UndetectedChromeDriver

GNU General Public License v3.0
166 stars 60 forks source link

chromedriver version not found for chrome version 115.0.579 #58

Open deltamen opened 11 months ago

deltamen commented 11 months ago

does not update the driver, as far as I understand, Google has changed the driver repository, so you can install it manually, but I would like it automatically

websmartcentral commented 11 months ago

I also am having this issue now my chrome has updated to 115 on the host machine.

I'm also using the automatic method to handle the different OS that users have.

               using var ucdriver = UndetectedChromeDriver.Create(driverExecutablePath:
                                              await new ChromeDriverInstaller().Auto());
websmartcentral commented 11 months ago
        httpClient.BaseAddress = new Uri("https://chromedriver.storage.googleapis.com/");

I'm not sure this URL has v115 available???

websmartcentral commented 11 months ago

I guess you are right and we could download and hardcode from here

https://googlechromelabs.github.io/chrome-for-testing/#stable

But would be good to work this out

websmartcentral commented 11 months ago

https://github.com/ultrafunkamsterdam/undetected-chromedriver/pull/1427

90th commented 11 months ago
        static async void Bot() {
            using (var driver = UndetectedChromeDriver.Create(driverExecutablePath: $"{Environment.CurrentDirectory}/chromedriver.exe")) {
                driver.GoToUrl("https://nowsecure.nl");
            }
        }

you can get the chromedriver from here https://googlechromelabs.github.io/chrome-for-testing/ but its currently patched rn needs an update sadly.

hathuchung96 commented 11 months ago

Just focus into 1 version of chrome like: using (var driver = UndetectedChromeDriver.Create( driverExecutablePath: await new ChromeDriverInstaller().Install("114.0.5735.16")))

websmartcentral commented 11 months ago

thanks @hathuchung96 - works great - still allows installation - without the autodetection

90th commented 11 months ago

This repo is quite out of date, 99% of bot detection i come across now gets triggered

jenokizm commented 10 months ago

@hathuchung96 Just focus into 1 version of chrome like:

using (var driver = UndetectedChromeDriver.Create(
driverExecutablePath:
await new ChromeDriverInstaller().Install("114.0.5735.16")))

i get the following error:

OpenQA.Selenium.WebDriverException: 'unknown error: cannot connect to chrome at 127.0.0.1:58313
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97'
hathuchung96 commented 10 months ago

@fysh711426 can you checkout my pull ?, just my way to get latest version from chrome. https://github.com/fysh711426/UndetectedChromeDriver/pull/62

hathuchung96 commented 10 months ago

@hathuchung96 Just focus into 1 version of chrome like:

using (var driver = UndetectedChromeDriver.Create(
driverExecutablePath:
await new ChromeDriverInstaller().Install("114.0.5735.16")))

i get the following error:

OpenQA.Selenium.WebDriverException: 'unknown error: cannot connect to chrome at 127.0.0.1:58313
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97'

just wait a little bit bro.

Sytehel-1337 commented 10 months ago

I'm getting the same error, when do you think it will be fixed?

@hathuchung96 Just focus into 1 version of chrome like:

using (var driver = UndetectedChromeDriver.Create(
driverExecutablePath:
await new ChromeDriverInstaller().Install("114.0.5735.16")))

i get the following error:

OpenQA.Selenium.WebDriverException: 'unknown error: cannot connect to chrome at 127.0.0.1:58313
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97'

just wait a little bit bro.

I'm getting the same error, when do you think it will be fixed?

hathuchung96 commented 10 months ago

I'm getting the same error, when do you think it will be fixed?

@hathuchung96 Just focus into 1 version of chrome like:

using (var driver = UndetectedChromeDriver.Create(
driverExecutablePath:
await new ChromeDriverInstaller().Install("114.0.5735.16")))

i get the following error:

OpenQA.Selenium.WebDriverException: 'unknown error: cannot connect to chrome at 127.0.0.1:58313
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97'

just wait a little bit bro.

I'm getting the same error, when do you think it will be fixed?

Already fix it bro, im just create merge request, you should wait little bit more.

deltamen commented 10 months ago

public static string ConfigurationDriverChrome() { var chromeDriverService = ChromeDriverService.CreateDefaultService(); chromeDriverService.HideCommandPromptWindow = true; var options = new ChromeOptions(); options.AddArguments("headless"); var driver = new ChromeDriver(chromeDriverService,options); string path = ""; Process[] chromeDriverProcesses = Process.GetProcessesByName("chromedriver"); foreach (Process process in chromeDriverProcesses) { path = process.MainModule.FileName; } driver.Quit(); chromeDriverProcesses = Process.GetProcessesByName("chromedriver"); foreach (Process process in chromeDriverProcesses) { process.Kill(); } return path; }

string path = Utils.ConfigurationDriverChrome(); using (IWebDriver driver = UndetectedChromeDriver.Create(driverExecutablePath: path, headless: false, hideCommandPromptWindow: true)) { ... }

fysh711426 commented 10 months ago

Try it.

PM> Install-Package Selenium.UndetectedChromeDriver -Version 1.1.2-alpha
Logi1215 commented 9 months ago

Did this end up getting fixed? I'm still getting this error

hkrsmk commented 5 months ago

For anyone still facing this issue, the easiest way I found to fix this was to:

  1. Update to the 1.1.2-alpha version
  2. Download a fresh copy of chrome from the official website
  3. Let the package automatically the correct chromedriver version
  4. Update related selenium packages to the same version as this latest chrome

In my case, I'm ok to work on the latest stable version and don't care as much about testing old versions.