seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.45k stars 908 forks source link

New Chrome break the remote_debug? #2853

Closed guocity closed 2 weeks ago

guocity commented 2 weeks ago

After update to chrome Version 126.0.6478.62, remote_debug in seleniumbase is broken, with WARNING: Unable to get screenshot!

image
mdmintz commented 2 weeks ago

I didn't encounter any issues when I used it. Make sure port 9222 is free.

Screenshot 2024-06-14 at 4 27 15 PM
guocity commented 1 week ago

interesting, the new chrome driver sometimes work, sometimes not, that's really weird, not sure where the issue is

guocity commented 1 week ago

before it will always use existing chrome process with port 9222, with new chrome update, it will start a new chrome process, instead of using existing chrome process

mdmintz commented 1 week ago

Make sure there isn't an existing process using port 9222. remote_debug is for debugging a browser that is spun up with remote_debug enabled at launch.

guocity commented 1 week ago

yea it work perfectly well, not a single issue, until chrome v126, I have remote session started at /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 with version 126, chrome driver sometimes use this session, but most of the time it will launch a new chrome process, I can see this remote session started and ended, and same new process in activity monitor, since it does not use existing remote session, my code breaks

mdmintz commented 1 week ago

Maybe an issue with Chrome 126. Nothing changed there on the SeleniumBase side.

guocity commented 1 week ago

Yea, I can see change history, just really hate this annoying chrome driver bug,

image
guocity commented 1 week ago

is there anyway to downgrade chromedriver?

sbase get chromedriver 125.0.6422.141

but when I run the sb it will automatically upgrade

`Warning: chromedriver update needed. Getting it now:

*** chromedriver to download = 126.0.6478.63 (Latest Stable)

Downloading chromedriver-mac-arm64.zip from: https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.63/mac-arm64/chromedriver-mac-arm64.zip ... Download Complete!

Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ... Unzip Complete!`

mdmintz commented 1 week ago

https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md#-changing-the-default-driver-version

https://github.com/seleniumbase/SeleniumBase/blob/3bb813fe039448b0c6bb2ff043266295cb40220a/seleniumbase/plugins/sb_manager.py#L77

guocity commented 1 week ago

I reset the chrome setting, seems like problem solved