Skip to content

uiautomator2.exceptions.HTTPError: HTTP request failed: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) #1119

@chuju320

Description

@chuju320

在使用screenshot()方法时会偶遇这个问题:
File "/usr/local/lib/python3.10/site-packages/uiautomator2/init.py", line 77, in screenshot
base64_data = self.jsonrpc.takeScreenshot(1, 80)
File "/usr/local/lib/python3.10/site-packages/uiautomator2/base.py", line 158, in call
return self.server.jsonrpc_call(self.method, params, http_timeout)
File "/usr/local/lib/python3.10/site-packages/uiautomator2/core.py", line 284, in jsonrpc_call
return _jsonrpc_call(self._dev, method, params, timeout, self._debug)
File "/usr/local/lib/python3.10/site-packages/uiautomator2/core.py", line 141, in _jsonrpc_call
r = _http_request(dev, "POST", "/jsonrpc/0", payload, timeout=timeout, print_request=print_request)
File "/usr/local/lib/python3.10/site-packages/uiautomator2/core.py", line 126, in _http_request
raise HTTPError(f"HTTP request failed: {e}") from e
uiautomator2.exceptions.HTTPError: HTTP request failed: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions