[š Bug]: unknown error: net::ERR_CONNECTION_CLOSED probably related to macOS Ventura 13.0
See original GitHub issueWhat happened?
To whom it will concern:
This is a very simple code snippet of a headless driver.get(url) request. And the unchanged code runs into such trouble since Iāve updated my macbook from [macOS Monterey 12.6] to [macOS Ventura 13.0] yesterday, for now this can be reproduced regardless of which router or ip I use.
How can we reproduce the issue?
OS: macOS Ventura 13.0
Chips: Apple M1 Max
selenium: 4.5.0
Python: 3.9.13
chromedriver: mac_arm64/107.0.5304
options = webdriver.ChromeOptions()
options.add_argument("headless")
options.add_argument('--disable-gpu')
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
driver.implicitly_wait(10)
driver.get(ANY_URL_HERE)
Relevant log output
https: (No matter which url im trying to visit, the following content will be shown)
Message: unknown error: net::ERR_CONNECTION_CLOSED
(Session info: headless chrome=107.0.5304.87)
Stacktrace:
0 chromedriver 0x0000000104cdaa88 chromedriver + 4123272
1 chromedriver 0x0000000104c66778 chromedriver + 3647352
2 chromedriver 0x0000000104928ac4 chromedriver + 248516
3 chromedriver 0x000000010492190c chromedriver + 219404
4 chromedriver 0x0000000104915300 chromedriver + 168704
5 chromedriver 0x000000010491641c chromedriver + 173084
6 chromedriver 0x00000001049155f0 chromedriver + 169456
7 chromedriver 0x000000010491497c chromedriver + 166268
8 chromedriver 0x0000000104914814 chromedriver + 165908
9 chromedriver 0x000000010491384c chromedriver + 161868
10 chromedriver 0x0000000104913bc8 chromedriver + 162760
11 chromedriver 0x000000010492a730 chromedriver + 255792
12 chromedriver 0x00000001049916e0 chromedriver + 677600
13 chromedriver 0x0000000104991020 chromedriver + 675872
14 chromedriver 0x0000000104952b10 chromedriver + 420624
15 chromedriver 0x0000000104953c30 chromedriver + 425008
16 chromedriver 0x0000000104cacae4 chromedriver + 3934948
17 chromedriver 0x0000000104caff24 chromedriver + 3948324
18 chromedriver 0x0000000104cb0508 chromedriver + 3949832
19 chromedriver 0x0000000104cb6b30 chromedriver + 3975984
20 chromedriver 0x0000000104cb0b24 chromedriver + 3951396
21 chromedriver 0x0000000104c8b71c chromedriver + 3798812
22 chromedriver 0x0000000104ccd2f0 chromedriver + 4068080
23 chromedriver 0x0000000104ccd444 chromedriver + 4068420
24 chromedriver 0x0000000104ce1450 chromedriver + 4150352
25 libsystem_pthread.dylib 0x0000000196ebe06c _pthread_start + 148
26 libsystem_pthread.dylib 0x0000000196eb8e2c thread_start + 8
Operating System
13.0 (22A380)
Selenium version
4.5.0
What are the browser(s) and version(s) where you see this issue?
Version 107.0.5304.87 (Official Build) (arm64)
What are the browser driver(s) and version(s) where you see this issue?
107.0.5304
Are you using Selenium Grid?
No
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
About the security content of macOS Ventura 13.0.1
This document describes the security content of macOS Ventura 13.0.1. About Apple security updates. For our customers' protection, Apple doesn'tĀ ...
Read more >macOS Ventura problems and how to fix them - MacPaw
The most obvious solution is often the correct one. Plug your MacBook Pro or MacBook Air into mains power if it's not already...
Read more >How to fix common macOS Ventura issues - Setapp
We explore the top 10 Ventura problems and best ways to fix them, from installation issues to Mac running slow on Ventura.
Read more >macOS 13 Ventura Ā· Issue #1297 Ā· koekeishiya/yabai - GitHub
The scripting-addition won't inject on macOS Ventura because the code requires a versioning change to use the Mach API:
Read more >7 Ways to Fix macOS 13 Ventura Update Failed [Solved]
macOS 13 Ventura upgrade failed and keeps poping out error messages. Don't worry, you will learn seven effective ways to the Mac won't...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

As the newest version of the chrome for macOS seems to be 107.0.5304.62 ,which is the one I produced this bug. Then I close the version checking, downgrade my local chrome and have tried the history Version 106.0.5249.91 (Official Build) (arm64), also the 105.0.5195.127. The bug seems the same has shown (content has been attached at the tail). As my dev env and code are not changed recently, and chrome for mac seems not to be updated these days, the only variable here might be the upgraded macOS.
Besides, my dev env is not able to check the edgedriver, but as to the firefox geckodriver with version macos-aarch64/0.32, I get the following exception while testing (Iām not sure if this info is helpful to understand the bug of ChromeDriver, as I do not know if this bug of geckodriver is produced due to the new OS version, cuz I got nothing to make a comparison before and after)
geckodriver print:
https: ANY_URL_HERE Message: Reached error page: about:neterror?e=nssFailure2&u=https%3A//ANY_URL_HERE&c=UTF-8&d=The%20connection%20to%20http%20was%20interrupted%20while%20the%20page%20was%20loading. Stacktrace: RemoteError@chrome://remote/content/shared/RemoteError.jsm:12:1 WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:192:5 UnknownError@chrome://remote/content/shared/webdriver/Errors.jsm:519:5 checkReadyState@chrome://remote/content/marionette/navigate.js:66:24 onNavigation@chrome://remote/content/marionette/navigate.js:334:39 emit@resource://gre/modules/EventEmitter.jsm:160:20 receiveMessage@chrome://remote/content/marionette/actors/MarionetteEventsParent.jsm:44:25
ChromeDriver print:
https: ANY_URL_HERE Message: unknown error: net::ERR_CONNECTION_RESET (Session info: headless chrome=106.0.5249.91) Stacktrace: 0 chromedriver 0x0000000104e22f44 chromedriver + 3813188 1 chromedriver 0x0000000104db4ae0 chromedriver + 3361504 2 chromedriver 0x0000000104ab8c5c chromedriver + 232540 3 chromedriver 0x0000000104ab3334 chromedriver + 209716 4 chromedriver 0x0000000104aa7800 chromedriver + 161792 5 chromedriver 0x0000000104aa8814 chromedriver + 165908 6 chromedriver 0x0000000104aa7a90 chromedriver + 162448 7 chromedriver 0x0000000104aa6fe0 chromedriver + 159712 8 chromedriver 0x0000000104aa6e8c chromedriver + 159372 9 chromedriver 0x0000000104aa5fec chromedriver + 155628 10 chromedriver 0x0000000104aa6338 chromedriver + 156472 11 chromedriver 0x0000000104aba694 chromedriver + 239252 12 chromedriver 0x0000000104b18574 chromedriver + 623988 13 chromedriver 0x0000000104b17f44 chromedriver + 622404 14 chromedriver 0x0000000104adf358 chromedriver + 389976 15 chromedriver 0x0000000104ae0284 chromedriver + 393860 16 chromedriver 0x0000000104df6e18 chromedriver + 3632664 17 chromedriver 0x0000000104dfa97c chromedriver + 3647868 18 chromedriver 0x0000000104e00b58 chromedriver + 3672920 19 chromedriver 0x0000000104dfb350 chromedriver + 3650384 20 chromedriver 0x0000000104dd88dc chromedriver + 3508444 21 chromedriver 0x0000000104e15914 chromedriver + 3758356 22 chromedriver 0x0000000104e15a78 chromedriver + 3758712 23 chromedriver 0x0000000104e296cc chromedriver + 3839692 24 libsystem_pthread.dylib 0x0000000196ebe06c _pthread_start + 148 25 libsystem_pthread.dylib 0x0000000196eb8e2c thread_start + 8
IĀ have a similar and possibly related issue when running this code on Raspberry Pi 3 (aarch64), so IĀ thought to comment in this issue. No MacOS involved on my end, but docker containers running a parent image of Alpine.
That same code works fine when the container and code run on a regular x86_64 platform (Linux).
On the raspPi, when IĀ hit the first .get, I/O blocks on it, my load average spikes through the roof. Not so on the other platform. Ultimately, after some timeout or something, IĀ get
net::ERR_NAME_NOT_RESOLVED.Worth noting that DNS works fine otherwise; Itās only when selenium makes the request, there is no DNS issue within the container (e.g. when making
curlrequests, or within python usingrequestsproperly resolve and fetch whatever iād need).