在mate50E/鸿蒙3.0系统上调app_stop_all方法频繁出现:atx-agent has something wrong, auto recovering。有时虽然能恢复,但是依然会有大概率恢复不了,猜测是因为app_stop_all方法kill的某些系统服务引起atx服务出错,修改为只kill掉所有的第三方应用/服务就正常了
[W 230216 16:35:32 __init__:207] atx-agent has something wrong, auto recovering
[D 230216 16:35:32 __init__:291] device MHR0222B18000469 is online
[I 230216 16:35:32 init:156] uiautomator2 version: 2.16.0
[W 230216 16:35:33 __init__:207] atx-agent has something wrong, auto recovering
[D 230216 16:35:33 __init__:291] device MHR0222B18000469 is online
[D 230216 16:35:33 __init__:709] kill atx-agent
[I 230216 16:35:33 init:156] uiautomator2 version: 2.16.0
[W 230216 16:35:34 __init__:467] jsonrpc call got: -32001 Jsonrpc error: <java.lang.NullPointerException> data: java.lang.NullPointerException: Attempt to read from field 'int android.accessibilityservice.AccessibilityServiceInfo.flags' on a null object reference
at androidx.test.uiautomator.UiDevice.setCompressedLayoutHeirarchy(UiDevice.java:234)
at com.github.uiautomator.stub.AutomatorServiceImpl.dumpWindowHierarchy(AutomatorServiceImpl.java:295)
at com.github.uiautomator.stub.AutomatorServiceImpl.dumpWindowHierarchy(AutomatorServiceImpl.java:284)
at java.lang.reflect.Method.invoke(Native Method)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.invoke(JsonRpcBasicServer.java:467)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleObject(JsonRpcBasicServer.java:352)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleJsonNodeRequest(JsonRpcBasicServer.java:283)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleRequest(JsonRpcBasicServer.java:251)
at com.github.uiautomator.stub.AutomatorHttpServer.serve(AutomatorHttpServer.java:100)
at fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
at java.lang.Thread.run(Thread.java:930)
, method: dumpWindowHierarchy
Exception in thread watcher:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/site-packages/uiautomator2/watcher.py", line 225, in _watch_forever
triggered = self.run()
File "/usr/local/lib/python3.7/site-packages/uiautomator2/watcher.py", line 237, in run
return self._run_watchers(source=source)
File "/usr/local/lib/python3.7/site-packages/uiautomator2/watcher.py", line 244, in _run_watchers
source = source or self._dump_hierarchy()
File "/usr/local/lib/python3.7/site-packages/uiautomator2/watcher.py", line 173, in _dump_hierarchy
return self._d.dump_hierarchy()
File "</usr/local/lib/python3.7/site-packages/decorator.py:decorator-gen-12>", line 2, in dump_hierarchy
File "/usr/local/lib/python3.7/site-packages/retry/api.py", line 74, in retry_decorator
logger)
File "/usr/local/lib/python3.7/site-packages/retry/api.py", line 33, in __retry_internal
return f()
File "/usr/local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 932, in dump_hierarchy
content = self.jsonrpc.dumpWindowHierarchy(compressed, None)
File "/usr/local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 453, in __call__
http_timeout)
File "/usr/local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 468, in _jsonrpc_retry_call
return self._jsonrpc_call(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 531, in _jsonrpc_call
raise err
uiautomator2.exceptions.NullPointerExceptionError: -32001 Jsonrpc error: <java.lang.NullPointerException> data: java.lang.NullPointerException: Attempt to read from field 'int android.accessibilityservice.AccessibilityServiceInfo.flags' on a null object reference
at androidx.test.uiautomator.UiDevice.setCompressedLayoutHeirarchy(UiDevice.java:234)
at com.github.uiautomator.stub.AutomatorServiceImpl.dumpWindowHierarchy(AutomatorServiceImpl.java:295)
at com.github.uiautomator.stub.AutomatorServiceImpl.dumpWindowHierarchy(AutomatorServiceImpl.java:284)
at java.lang.reflect.Method.invoke(Native Method)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.invoke(JsonRpcBasicServer.java:467)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleObject(JsonRpcBasicServer.java:352)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleJsonNodeRequest(JsonRpcBasicServer.java:283)
at com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleRequest(JsonRpcBasicServer.java:251)
at com.github.uiautomator.stub.AutomatorHttpServer.serve(AutomatorHttpServer.java:100)
at fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
at java.lang.Thread.run(Thread.java:930)
, method: dumpWindowHierarchy
在mate50E/鸿蒙3.0系统上调app_stop_all方法频繁出现:atx-agent has something wrong, auto recovering。有时虽然能恢复,但是依然会有大概率恢复不了,猜测是因为app_stop_all方法kill的某些系统服务引起atx服务出错,修改为只kill掉所有的第三方应用/服务就正常了