wkeeling / selenium-wire

Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
MIT License
1.9k stars 254 forks source link

ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine #544

Open steeljardas opened 2 years ago

steeljardas commented 2 years ago

I know you can get rid of this error by using options = { 'mitm_http2': False, } However, when doing so my selenium isn't working properly with clicking the "People also ask" section in Google.

Another issue is that I believe this error is causing my script to skip keywords, is there any other way to fully disable this error logging from showing up in console & how can I run an exception on it to avoid it skipping my keywords.

steeljardas commented 2 years ago

This is the error I get by the way: During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\server.py", line 113, in handle root_layer() File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\modes\http_proxy.py", line 23, in call layer() File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\tls.py", line 285, in call layer() File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http1.py", line 100, in call layer() File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 205, in call if not self._process_flow(flow): File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 308, in _process_flow return self.handle_upstream_connect(f) File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 250, in handle_upstream_connect self.send_response(f.response) File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 53, in send_response self.send_response_body(response, [response.data.content]) File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http1.py", line 72, in send_response_body self.client_conn.wfile.write(chunk) File "C:\Python\lib\site-packages\seleniumwire\thirdparty\mitmproxy\net\tcp.py", line 98, in write raise exceptions.TcpDisconnect(str(e)) seleniumwire.thirdparty.mitmproxy.exceptions.TcpDisconnect: [WinError 10053] An established connection was aborted by the software in your host machine

it causes the threads to completely hang permanently and happens way too often without the "mitm_http2"