Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

huawei nova 10\uiautomator 3.2.6运行脚本经常偶先报错,元素存在也会报错不存在 #1065

Open
jinchuolin opened this issue Dec 26, 2024 · 0 comments

Comments

@jinchuolin
Copy link

in uiautomator_connect File "$SCP_HOME\commons\python\bin\Lib\site-packages\uiautomator2_init_.py", line 960, in unlock if not self.info['screenOn']: ^^^^^^^^^ File "$SCP_HOME\commons\python\bin\Lib\site-packages\uiautomator2_init_.py", line 145, in info return self.jsonrpc.deviceInfo(http_timeout=10) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "$SCP_HOME\commons\python\bin\Lib\site-packages\uiautomator2_init_.py", line 185, in call return self.server.jsonrpc_call(self.method, params, http_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "$SCP_HOME\commons\python\bin\Lib\site-packages\uiautomator2\core.py", line 270, in jsonrpc_call return _jsonrpc_call(self._dev, method, params, timeout, self._debug) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "$SCP_HOME\commons\python\bin\Lib\site-packages\uiautomator2\core.py", line 153, in _jsonrpc_call raise RPCUnknownError(f"Unknown RPC error: {code} {message}", params, stacktrace)uiautomator2.exceptions.RPCUnknownError: ('Unknown RPC error: -32001 java.lang.RuntimeException', {}, 'java.lang.RuntimeException: android.os.DeadSystemException\n\tat android.hardware.display.DisplayManagerGlobal$1.recompute(DisplayManagerGlobal.java:146)\n\tat android.hardware.display.DisplayManagerGlobal$1.recompute(DisplayManagerGlobal.java:140)\n\tat android.app.PropertyInvalidatedCache.query(PropertyInvalidatedCache.java:562)\n\tat android.hardware.display.DisplayManagerGlobal.getDisplayInfoLocked(DisplayManagerGlobal.java:201)\n\tat android.hardware.display.DisplayManagerGlobal.getDisplayInfo(DisplayManagerGlobal.java:190)\n\tat android.view.Display.updateDisplayInfoLocked(Display.java:1828)\n\tat android.view.Display.isValid(Display.java:605)\n\tat android.hardware.display.DisplayManager.getOrCreateDisplayLocked(DisplayManager.java:647)\n\tat android.hardware.display.DisplayManager.getDisplay(DisplayManager.java:502)\n\tat androidx.test.uiautomator.UiDevice.getDisplayById(UiDevice.java:1376)\n\tat androidx.test.uiautomator.UiDevice.getDisplaySize(UiDevice.java:1388)\n\tat androidx.test.uiautomator.UiDevice.getDisplayWidth(UiDevice.java:573)\n\tat androidx.test.uiautomator.UiDevice.getDisplayWidth(UiDevice.java:561)\n\tat com.wetest.uia2.stub.DeviceInfo.(DeviceInfo.java:53)\n\tat com.wetest.uia2.stub.DeviceInfo.getDeviceInfo(DeviceInfo.java:45)\n\tat com.wetest.uia2.stub.AutomatorServiceImpl.deviceInfo(AutomatorServiceImpl.java:151)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.invoke(JsonRpcBasicServer.java:467)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleObject(JsonRpcBasicServer.java:352)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleJsonNodeRequest(JsonRpcBasicServer.java:283)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleRequest(JsonRpcBasicServer.java:251)\n\tat com.wetest.uia2.stub.AutomatorHttpServer.serve(AutomatorHttpServer.java:101)\n\tat fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)\n\tat fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)\n\tat fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)\n\tat java.lang.Thread.run(Thread.java:933)\nCaused by: android.os.DeadSystemException\n\t... 26 more\n')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant