alibaba / alibaba/tidevice

wda+UNtest+htmltestrunner运行的自动化脚本的时候老是出现'device port:8100 is not ready'

Open
#79 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.6k
Forks
469
PR merge metrics
No merged PRs in 30d

Description


ft10_1: Traceback (most recent call last):
File "D:\python3\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
chunked=chunked,
File "D:\python3\lib\site-packages\urllib3\connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "D:\python3\lib\http\client.py", line 1277, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\python3\lib\http\client.py", line 1323, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\python3\lib\http\client.py", line 1272, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\python3\lib\http\client.py", line 1032, in _send_output
self.send(msg)
File "D:\python3\lib\http\client.py", line 972, in send
self.connect()
File "D:\python3\lib\site-packages\wda\requests_usbmux.py", line 54, in connect
conn = _device.create_inner_connection(int(port))
File "D:\python3\lib\site-packages\wda\usbmux.py", line 239, in create_inner_connection
"device port:{} is not ready".format(_original_port))
wda.exceptions.MuxConnectError: device port:8100 is not ready

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\python3\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "D:\python3\lib\site-packages\urllib3\connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "D:\python3\lib\site-packages\urllib3\util\retry.py", line 410, in increment
raise six.reraise(type(error), error, _stacktrace)
File "D:\python3\lib\site-packages\urllib3\packages\six.py", line 734, in reraise
raise value.with_traceback(tb)
File "D:\python3\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
chunked=chunked,
File "D:\python3\lib\site-packages\urllib3\connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "D:\python3\lib\http\client.py", line 1277, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\python3\lib\http\client.py", line 1323, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\python3\lib\http\client.py", line 1272, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\python3\lib\http\client.py", line 1032, in _send_output
self.send(msg)
File "D:\python3\lib\http\client.py", line 972, in send
self.connect()
File "D:\python3\lib\site-packages\wda\requests_usbmux.py", line 54, in connect
conn = _device.create_inner_connection(int(port))
File "D:\python3\lib\site-packages\wda\usbmux.py", line 239, in create_inner_connection
"device port:{} is not ready".format(_original_port))
urllib3.exceptions.ProtocolError: ('Connection aborted.', MuxConnectError('device port:8100 is not ready'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\app_test_ios\scripts\sgapp_home_userdefine_click.py", line 25, in setUp
cold_startapp(client)
File "D:\app_test_ios\base\sg_action.py", line 47, in cold_startapp
client(name="跳过").click_exists(timeout=0.5)
File "D:\python3\lib\site-packages\wda\__init__.py", line 1529, in click_exists
e = self.get(timeout=timeout, raise_error=False)
File "D:\python3\lib\site-packages\wda\__init__.py", line 1469, in get
elems = self.find_elements()
File "D:\python3\lib\site-packages\wda\__init__.py", line 1444, in find_elements
for element_id in self.find_element_ids():
File "", line 2, in find_element_ids
File "D:\python3\lib\site-packages\retry\api.py", line 74, in retry_decorator
logger)
File "D:\python3\lib\site-packages\retry\api.py", line 33, in __retry_internal
return f()
File "D:\python3\lib\site-packages\wda\__init__.py", line 1436, in find_element_ids
return self._wdasearch('class chain', chain)
File "D:\python3\lib\site-packages\wda\__init__.py", line 1384, in _wdasearch
'value': value
File "D:\python3\lib\site-packages\wda\utils.py", line 47, in _inner
return fn(*args, **kwargs)
File "D:\python3\lib\site-packages\wda\__init__.py", line 454, in _fetch
response = httpdo(url, method, data, timeout)
File "D:\python3\lib\site-packages\wda\__init__.py", line 124, in httpdo
return _unsafe_httpdo(url, method, data, timeout)
File "D:\python3\lib\site-packages\wda\__init__.py", line 154, in _unsafe_httpdo
timeout=timeout)
File "D:\python3\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "D:\python3\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "D:\python3\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', MuxConnectError('device port:8100 is not ready'))

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the failing call in scripts/sgapp_home_userdefine_click.py and base/sg_action.py, then trace the connection through wda/requests_usbmux.py and wda/usbmux.py at the reported lines. Reproduce the WDA automation run and determine why device port 8100 is not ready; done means the setup reaches the WDA action without this connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, python
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.