openatx / facebook-wda

Facebook WebDriverAgent Python Client Library (not official)
MIT License
1.71k stars 266 forks source link

Connection aborted.', RemoteDisconnected('Remote end closed connection without response) #149

Open huangrunml opened 2 months ago

huangrunml commented 2 months ago

There is a probability of occasional errors when making consecutive requests. Increasing the delay after each request can reduce the likelihood of errors, but the connection still drops intermittently.

for example, use for i in range(30): driver.client.healthcheck()

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1428, in getresponse response.begin() File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 300, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

huangrunml commented 2 months ago

may be requests version cause the problem? requests 2.29.0 urllib3 1.26.19