openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.66k stars 1.42k forks source link

Obj.exists正常,但是obj.info 超时 #696

Closed githuuu closed 6 months ago

githuuu commented 3 years ago

obj.info() 17:46:25.421 $ curl -X POST -d '{"jsonrpc": "2.0", "id": "4ba759d3c8259107bf8705a520a0ede4", "method": "objInfo", "params": [{"mask": 1, "childOrSibling": [], "childOrSiblingSelector": [], "text": "\u6e38\u620f"}]}' 'http://127.0.0.1:1 2285/jsonrpc/0' 17:47:25.451 $ curl -X POST -d '{"jsonrpc": "2.0", "id": 1, "method": "deviceInfo"}' 'http://127.0.0.1:12285/jsonrpc/0' 17:47:25.523 Response (71 ms) >>> {"jsonrpc":"2.0","id":1,"result":{"currentPackageName":"com.zhuoyi.market","displayHeight":1570,"displayRotation":0,"displaySizeDpX":360,"displaySizeDpY":820,"displayWidth":720,"productName":"小辣椒50","screenOn":true,"sdkInt":28,"natu ralOrientation":true}} <<< END 17:47:25.529 $ curl -X POST -d '{"jsonrpc": "2.0", "id": "d5a04ed2454fdfff26e70a8773c4c62b", "method": "objInfo", "params": [{"mask": 1, "childOrSibling": [], "childOrSiblingSelector": [], "text": "\u6e38\u620f"}]}' 'http://127.0.0.1:1 2285/jsonrpc/0' Traceback (most recent call last): File "D:\installer\conda\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "D:\installer\conda\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "D:\installer\conda\lib\http\client.py", line 1347, in getresponse response.begin() File "D:\installer\conda\lib\http\client.py", line 307, in begin version, status, reason = self._read_status() File "D:\installer\conda\lib\http\client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "D:\installer\conda\lib\socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\installer\conda\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "D:\installer\conda\lib\site-packages\urllib3\connectionpool.py", line 726, in urlopen retries = retries.increment( File "D:\installer\conda\lib\site-packages\urllib3\util\retry.py", line 410, in increment raise six.reraise(type(error), error, _stacktrace) File "D:\installer\conda\lib\site-packages\urllib3\packages\six.py", line 735, in reraise raise value File "D:\installer\conda\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "D:\installer\conda\lib\site-packages\urllib3\connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "D:\installer\conda\lib\site-packages\urllib3\connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='127.0.0.1', port=12285): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "", line 2, in info File "D:\installer\conda\lib\site-packages\retry\api.py", line 73, in retry_decorator return retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File "D:\installer\conda\lib\site-packages\retry\api.py", line 33, in retry_internal return f() File "D:\installer\conda\lib\site-packages\uiautomator2_selector.py", line 130, in info return self.jsonrpc.objInfo(self.selector) File "D:\installer\conda\lib\site-packages\uiautomator2__init.py", line 435, in call return self.server._jsonrpc_retry_call(self.method, params, File "D:\installer\conda\lib\site-packages\uiautomator2__init__.py", line 451, in _jsonrpc_retry_call return self._jsonrpc_call(*args, **kwargs) File "D:\installer\conda\lib\site-packages\uiautomator2\init.py", line 471, in _jsonrpc_call res = self.http.post("/jsonrpc/0", File "D:\installer\conda\lib\site-packages\requests\sessions.py", line 578, in post return self.request('POST', url, data=data, json=json, **kwargs) File "D:\installer\conda\lib\site-packages\uiautomator2\init.py", line 188, in request return super().request(method, url, **kwargs) File "D:\installer\conda\lib\site-packages\uiautomator2\init__.py", line 108, in request resp = super(TimeoutRequestsSession, File "D:\installer\conda\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, send_kwargs) File "D:\installer\conda\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, kwargs) File "D:\installer\conda\lib\site-packages\requests\adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='127.0.0.1', port=12285): Read timed out. (read timeout=60)

codeskyblue commented 3 years ago

什么应用,哪个控件,方不方便截个图?

githuuu commented 3 years ago

微信图片 应用是卓易市场,控件是所有控件都一样,外面的控件都正常,进到APP里面就会有问题,不经常打开网页,回复比较慢,不好意思

codeskyblue commented 6 months ago

复现不了,有问题再重新open