SeleniumHQ / seleniumhq.github.io

Official Selenium website and documentation
https://selenium.dev
Apache License 2.0
1.09k stars 1.28k forks source link

[🐛 Bug]: Webdriver timeout when instantiating with chrome version 127 #1878

Closed AlexWhitham closed 3 weeks ago

AlexWhitham commented 3 weeks ago

What happened?

Running in a docker container on python:3-slim. After the Chrome version changed from major 126 to 127 webdriver wouldn't instantiate. If I change the version back to 126, all goes well.

Chrome and Chrome driver versions are 127.0.6533.119 Screenshot 2024-08-20 at 14 29 58

Main code: Screenshot 2024-08-20 at 14 27 20

Log: 7.355 ChromeDriver 127.0.6533.119 (bdef6783a05f0b3f885591e7d2c7b2aec1a89dea-refs/branch-heads/6533@{#1999}) 7.383 Google Chrome 127.0.6533.119 7.386 Creating driver instance 7.387 Selenium version 4 7.605 Starting ChromeDriver 127.0.6533.119 (bdef6783a05f0b3f885591e7d2c7b2aec1a89dea-refs/branch-heads/6533@{#1999}) on port 58889 7.605 Only local connections are allowed. 7.605 Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. 7.618 ChromeDriver was started successfully. 7.680 [1724161347.412][INFO]: [44c4b3b1eb309c0ded7c60af221eeb9c] COMMAND InitSession { 7.680 "capabilities": { 7.680 "alwaysMatch": { 7.680 "browserName": "chrome", 7.680 "browserVersion": null, 7.680 "goog:chromeOptions": { 7.680 "args": [ "--headless", "--no-sandbox", "--disable-dev-shm-usage", "--window-size=1920,1080" ], 7.680 "binary": "/usr/bin/google-chrome-stable", 7.680 "extensions": [ ] 7.680 }, 7.680 "pageLoadStrategy": "normal" 7.680 }, 7.680 "firstMatch": [ { 7.680 } ] 7.680 } 7.680 } 7.681 [1724161347.413][INFO]: Populating Preferences file: { 7.681 "alternate_error_pages": { 7.681 "enabled": false 7.681 }, 7.681 "autofill": { 7.681 "enabled": false 7.681 }, 7.681 "browser": { 7.681 "check_default_browser": false 7.681 }, 7.681 "distribution": { 7.681 "import_bookmarks": false, 7.681 "import_history": false, 7.681 "import_search_engine": false, 7.681 "make_chrome_default_for_user": false, 7.681 "skip_first_run_ui": true 7.681 }, 7.681 "dns_prefetching": { 7.681 "enabled": false 7.681 }, 7.681 "profile": { 7.681 "content_settings": { 7.681 "pattern_pairs": { 7.681 "https://,": { 7.681 "media-stream": { 7.681 "audio": "Default", 7.681 "video": "Default" 7.681 } 7.681 } 7.681 } 7.681 }, 7.681 "default_content_setting_values": { 7.681 "geolocation": 1 7.681 }, 7.681 "default_content_settings": { 7.681 "geolocation": 1, 7.681 "mouselock": 1, 7.681 "notifications": 1, 7.681 "popups": 1, 7.681 "ppapi-broker": 1 7.681 }, 7.681 "password_manager_enabled": false 7.681 }, 7.681 "safebrowsing": { 7.681 "enabled": false 7.681 }, 7.681 "search": { 7.681 "suggest_enabled": false 7.681 }, 7.681 "translate": { 7.681 "enabled": false 7.681 } 7.681 } 7.681 [1724161347.413][INFO]: Populating Local State file: { 7.681 "background_mode": { 7.681 "enabled": false 7.681 }, 7.681 "ssl": { 7.681 "rev_checking": { 7.681 "enabled": false 7.681 } 7.681 } 7.681 } 7.682 [1724161347.414][INFO]: ChromeDriver supports communication with Chrome via pipes. This is more reliable and more secure. 7.682 [1724161347.414][INFO]: Use the --remote-debugging-pipe Chrome switch instead of the default --remote-debugging-port to enable this communication mode. 7.682 [1724161347.414][INFO]: Launching chrome: /usr/bin/google-chrome-stable --allow-pre-commit-input --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-automation --enable-logging --headless --log-level=0 --no-first-run --no-sandbox --no-service-autorun --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.vdJffZ --window-size=1920,1080 data:, 7.918 [1724161347.650][INFO]: resolved localhost to ["::1","127.0.0.1"] 17.20 timeout: sending signal TERM to command ‘python3’

What browsers and operating systems are you seeing the problem on?

Docker container: Linux, python Chrome and Chrome driver versions: 127.0.6533.119 Both, selenium 3 and 4 major versions

github-actions[bot] commented 3 weeks ago

@AlexWhitham, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 3 weeks ago

Maybe this helps you: https://www.selenium.dev/blog/2024/chrome-browser-woes/

This is the repository for the Selenium documentation. If you have a Selenium-related issue, please open it at https://github.com/SeleniumHQ/selenium.

This issue seems to be related to Chrome itself.

github-actions[bot] commented 3 weeks ago

💬 Please ask questions at: