Open csushiye opened 7 months ago
iOS:///http://127.0.0.1:{port}/?udid={device_id} 加上设备ID试试
iOS:///http://127.0.0.1:{port}/?udid={device_id} 加上设备ID试试
应该还是有问题的,看IOS的建立连接逻辑是默认使用8100端口,如果port采用非8100端口,调用start_recording录屏时还是会报如下错误: During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 980, in send self.connect() File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/wda/requests_usbmux.py", line 54, in connect conn = _device.create_inner_connection(int(port)) File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/wda/usbmux.py", line 238, in create_inner_connection raise MuxConnectError( wda.exceptions.MuxConnectError: device port:8100 is not ready
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 980, in send self.connect() File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/wda/requests_usbmux.py", line 54, in connect conn = _device.create_inner_connection(int(port)) File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/wda/usbmux.py", line 238, in create_inner_connection raise MuxConnectError( 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 "/Users/bigo/mat/uibrick/tests/ios_uibrick_unittest.py", line 54, in test_tap_debugtool
airtest_device.start_recording()
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/ios.py", line 51, in wrapper
return func(self, *args, kwargs)
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/ios.py", line 1304, in start_recording
self.recorder = ScreenRecorder(
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/aircv/screen_recorder.py", line 113, in init
self.tmp_frame = self.get_frame_func()
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/ios.py", line 1297, in get_frame
data = self.get_frame_from_stream()
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/ios.py", line 51, in wrapper
return func(self, *args, *kwargs)
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/ios.py", line 659, in get_frame_from_stream
return self.mjpegcap.get_frame_from_stream()
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/utils/snippet.py", line 127, in ready_func
return func(inst, args, kwargs)
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/mjpeg_cap.py", line 103, in get_frame_from_stream
return self.get_blank_screen()
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/mjpeg_cap.py", line 145, in get_blank_screen
display_info = self.ori_function()
File "/Users/bigo/.local/share/virtualenvs/uibrick-iYraLzmP/lib/python3.9/site-packages/airtest/core/ios/ios.py", line 336, in
请问你们连接ios 机器的时候, 有没有遇到这个报错 currently only supports port forwarding for locally connected iOS devices
请问你们连接ios 机器的时候, 有没有遇到这个报错 currently only supports port forwarding for locally connected iOS devices
你是不是当时还连了其他设备,而其他设备没有把wda正常启动,然后是会报这个错的;这个堆栈的中调用函数逻辑是会有个遍历当前连接的所有设备,然后调用wda的包和每个设备进行连接,获取设备的udid和你目的的udid比较,如果和某个设备建立连接失败,就会报这个错误
现在airtest脚本api:connect_device连接ios设备时只能给定127.0.0.1:8100,无法连接多台ios设备?通过tidevice -u uuid wdaproxy启动多台ios设备的wda后,每个设备wda的端口映射到macOs机器不同端口,connect_device参数给定127.0.0.1:不同的端口,实际都是连接的127.0.0.1:8100的设备,无法连接多台设备