adb server version (31) doesn't match this client (41); killing...
daemon started successfully
Process ScritpThread-1:
Traceback (most recent call last):
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 1377, in getresponse
response.begin()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 320, in begin
version, status, reason = self._read_status()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "D:\Program Files\anaconda3\envs\ais\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\util\retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
raise value.with_traceback(tb)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 1377, in getresponse
response.begin()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 320, in begin
version, status, reason = self._read_status()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "D:\Program Files\anaconda3\envs\ais\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 203, in request
return super().request(method, url, **kwargs)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init__.py", line 119, in request
resp = super(TimeoutRequestsSession,
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, send_kwargs)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, kwargs)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Program Files\anaconda3\envs\ais\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "D:\Project\Python\AIS\threads\thread_script.py", line 57, in run
self.err_handle()
File "D:\Project\Python\AIS\threads\thread_script.py", line 462, in err_handle
if self.ui2(text='EXIT').exists:
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\utils.py", line 105, in bool
return self.nonzero()
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\utils.py", line 101, in nonzero
return self.uiobject.jsonrpc.exist(self.uiobject.selector)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 479, in call
return self.server._jsonrpc_retry_call(self.method, params,
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 486, in _jsonrpc_retry_call
return self._jsonrpc_call(*args, kwargs)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init__.py", line 512, in _jsonrpc_call
res = self.http.post("/jsonrpc/0",
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, kwargs)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 210, in request
self.client._is_agent_alive():
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init.py", line 585, in _is_agent_alive
return bool(self._get_agent_version())
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init__.py", line 569, in _get_agent_version
url = self.path2url("/version")
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init.py", line 301, in path2url
return urlparse.urljoin(self._get_atx_agent_url(), path)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init__.py", line 282, in _get_atx_agent_url
lport = self._adb_device.forward_port(
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_device.py", line 249, in forward_port
self.forward("tcp:" + str(local_port), remote)
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_device.py", line 239, in forward
self.open_transport(":".join(args))
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_device.py", line 90, in open_transport
c.check_okay()
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_adb.py", line 134, in check_okay
raise AdbError(self.read_string_block())
adbutils.errors.AdbError
uiautomator2 2.16.22 雷电模拟器 9.0.36
首先是一台雷电模拟器9开启一个子进程通过connect_adb_wifi(127.0.0.1:5557)连接上后 能正常自动调试,但是在调试过程中,我手动再打开一个新的模拟器,等新的模拟器启动完进到桌面后,在调试的那个程序就会报错,想请问下有没办法解决?能不能实现两台雷电模拟器同时调试?
######### 启动时信息
connect start 127.0.0.1:5557 adb server version (31) doesn't match this client (41); killing...
daemon started successfully connected to 127.0.0.1:5557 [W 230321 02:29:59 init:218] [pid:8868] atx-agent has something wrong, auto recovering [D 230321 02:29:59 init:317] [pid:8868] [127.0.0.1:5557] device 127.0.0.1:5557 is online [I 230321 02:29:59 init:156] uiautomator2 version: 2.16.22 [D 230321 02:29:59 init:167] Shell: ('/data/local/tmp/atx-agent', 'server', '--stop') [D 230321 02:29:59 init:295] Real version: [0, 10, 0], Expect version: [0, 10, 0] [D 230321 02:29:59 init:167] Shell: ('/data/local/tmp/atx-agent', 'server', '--nouia', '-d', '--addr', '127.0.0.1:7912') [I 230321 02:29:59 init:350] Check atx-agent version [D 230321 02:29:59 init:359] Forward: local:tcp:54472 -> remote:tcp:7912 [D 230321 02:30:00 init:359] Forward: local:tcp:54472 -> remote:tcp:7912 [D 230321 02:30:00 init:362] atx-agent version 0.10.0 [D 230321 02:30:00 init:366] device wlan ip: 172.16.1.49 [I 230321 02:30:00 init:878] [pid:8868] [127.0.0.1:5557] newCommandTimeout updated to 9m0s connect end 540 960 进程:1 - adb:127.0.0.1:5557 [D 230321 02:30:00 init:660] [pid:8868] [127.0.0.1:5557] kill process(ps): uiautomator [D 230321 02:30:00 init:391] [pid:8868] [127.0.0.1:5557] Install app-uiautomator.apk [D 230321 02:30:00 init:391] [pid:8868] [127.0.0.1:5557] Install app-uiautomator-test.apk [D 230321 02:30:01 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 40.0s [D 230321 02:30:02 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 39.0s [D 230321 02:30:03 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 38.0s [D 230321 02:30:04 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 37.0s [D 230321 02:30:05 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 36.0s [D 230321 02:30:06 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 35.0s [D 230321 02:30:07 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 34.0s [D 230321 02:30:07 init:695] [pid:8868] [127.0.0.1:5557] show float window [D 230321 02:30:08 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 32.9s [D 230321 02:30:09 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 31.9s [D 230321 02:30:10 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 30.9s [D 230321 02:30:11 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 29.8s [D 230321 02:30:12 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 28.8s [D 230321 02:30:13 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 27.8s [D 230321 02:30:14 init:681] [pid:8868] [127.0.0.1:5557] uiautomator-v2 is starting ... left: 26.8s [I 230321 02:30:14 init:642] [pid:8868] [127.0.0.1:5557] uiautomator back to normal
######### 打开第二个模拟器进入到模拟器桌面后,第一个在调试中的程序就报下面这些错误
adb server version (31) doesn't match this client (41); killing...
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\adapters.py", line 489, in send resp = conn.urlopen( File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\packages\six.py", line 769, in reraise raise value.with_traceback(tb) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from
File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 1377, in getresponse
response.begin()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 320, in begin
version, status, reason = self._read_status()
File "D:\Program Files\anaconda3\envs\ais\lib\http\client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "D:\Program Files\anaconda3\envs\ais\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 203, in request return super().request(method, url, **kwargs) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init__.py", line 119, in request resp = super(TimeoutRequestsSession, File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, kwargs) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Program Files\anaconda3\envs\ais\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "D:\Project\Python\AIS\threads\thread_script.py", line 57, in run self.err_handle() File "D:\Project\Python\AIS\threads\thread_script.py", line 462, in err_handle if self.ui2(text='EXIT').exists: File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\utils.py", line 105, in bool return self.nonzero() File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\utils.py", line 101, in nonzero return self.uiobject.jsonrpc.exist(self.uiobject.selector) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 479, in call return self.server._jsonrpc_retry_call(self.method, params, File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 486, in _jsonrpc_retry_call return self._jsonrpc_call(*args, kwargs) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init__.py", line 512, in _jsonrpc_call res = self.http.post("/jsonrpc/0", File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\requests\sessions.py", line 635, in post return self.request("POST", url, data=data, json=json, kwargs) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2__init.py", line 210, in request self.client._is_agent_alive(): File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init.py", line 585, in _is_agent_alive return bool(self._get_agent_version()) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init__.py", line 569, in _get_agent_version url = self.path2url("/version") File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init.py", line 301, in path2url return urlparse.urljoin(self._get_atx_agent_url(), path) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\uiautomator2\init__.py", line 282, in _get_atx_agent_url lport = self._adb_device.forward_port( File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_device.py", line 249, in forward_port self.forward("tcp:" + str(local_port), remote) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_device.py", line 239, in forward self.open_transport(":".join(args)) File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_device.py", line 90, in open_transport c.check_okay() File "D:\Program Files\anaconda3\envs\ais\lib\site-packages\adbutils_adb.py", line 134, in check_okay raise AdbError(self.read_string_block()) adbutils.errors.AdbError
Process finished with exit code -1