Ulyssedev / Rust-undetected-chromedriver

A rust implementation of ultrafunkamsterdam's undetected-chromedriver library based on thirtyfour
https://crates.io/crates/undetected-chromedriver
MIT License
33 stars 20 forks source link

Browser boot-looping #1

Closed vlourme closed 10 months ago

vlourme commented 10 months ago

Hello,

Using the example code provided in the README.md, the browser starts and stop directly, and it loops doing the same thing. I don't have many logs, only this:

ChromeDriver already exists!
Detected patched chromedriver executable!
Starting chromedriver...
Starting ChromeDriver 114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}) on port 3949
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

Might it be the patch not working on the automatically downloaded Chrome version?

Thank you

vlourme commented 10 months ago

I solved the issue. The library download the latest ChromeDriver (for Chrome 114) but Chrome might not have the same version (in my case I had latest, v116), so it was an instant crash and restart loop.

I would avoid this would by downloading a Chromium client according to the ChromeDriver version in the project files, if the underlying library allows setting Chrome path.

Ulyssedev commented 10 months ago

Thanks for sharing your solution, a fix will be rolled out soon in the next version.

Edit: Seems like the endpoint used to fetch the latest chrome version has changed, which is why the latest version was not being used.

Ulyssedev commented 10 months ago

Hey,

The issue should be fixed in v0.1.1 with cb460553d2cca75719fcce777c707211fc00070c. Chrome introduced a completely new endpoint to fetch the new chromedriver, more info here.

Feel free to open the issue again if it persists on macOS.

vlourme commented 10 months ago

Great! Thanks :)