AirtestProject / Poco

A cross-engine test automation framework based on UI inspection
http://airtest.netease.com/
Apache License 2.0
1.74k stars 315 forks source link

[pocoservice.apk] instrumentation test server process is no longer alive #583

Open HTai01 opened 1 year ago

HTai01 commented 1 year ago

(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。否则直接关闭。)

(重要!问题分类)

描述问题bug 使用Pycharm,透過appium webdriver連線到雲端手機裝置,在手機執行poco腳本時,手機出現poco service is running訊息,但沒有繼續執行腳本內容,以下為pycharm報錯內容。

已試過此文方式pocoservice无限重启的解决办法,尚未解決報錯問題。

UserWarning: [pocoservice.apk] instrumentation test server process is no longer alive
  warnings.warn("[pocoservice.apk] instrumentation test server process is no longer alive")
[pocoservice.apk] stdout: b'\r\ncom.netease.open.pocoservice.InstrumentedTestAsLauncher:\r\nError in launch(com.netease.open.pocoservice.InstrumentedTestAsLauncher):\r\njava.lang.IllegalStateException: UiAutomationService android.accessibilityservice.IAccessibilityServiceClient$Stub$Proxy@64231cfalready registered!\r\n\tat android.os.Parcel.createExceptionOrNull(Parcel.java:2445)\r\n\tat android.os.Parcel.createException(Parcel.java:2421)\r\n\tat android.os.Parcel.readException(Parcel.java:2404)\r\n\tat android.os.Parcel.readException(Parcel.java:2346)\r\n\tat android.app.IUiAutomationConnection$Stub$Proxy.connect(IUiAutomationConnection.java:514)\r\n\tat android.app.UiAutomation.connectWithTimeout(UiAutomation.java:324)\r\n\tat android.app.UiAutomation.connect(UiAutomation.java:289)\r\n\tat android.app.Instrumentation.getUiAutomation(Instrumentation.java:2224)\r\n\tat android.app.Instrumentation.getUiAutomation(Instrumentation.java:2173)\r\n\tat com.netease.open.pocoservice.UiAutomationConnection.get(UiAutomationConnection.java:19)\r\n\tat com.netease.open.pocoservice.ServerForHierarchyViewer.<init>(ServerForHierarchyViewer.java:52)\r\n\tat com.netease.open.pocoservice.InstrumentedTestAsLauncher.launch(InstrumentedTestAsLauncher.java:35)\r\nINSTRUMENTATION_RESULT: shortMsg=Process crashed.\r\nINSTRUMENTATION_CODE: 0\r\n'
[pocoservice.apk] stderr: b''
[10:36:41][DEBUG]<airtest.core.android.adb> C:\Users\sandy_ho\AppData\Roaming\Python\Python39\site-packages\airtest\core\android\static\adb\windows\adb.exe -s R5CT4183PZJ shell am start -n com.netease.open.pocoservice/.TestActivity
still waiting for uiautomation ready.
[pocoservice.apk] stdout: b''
[pocoservice.apk] stderr: b''
still waiting for uiautomation ready.
[10:36:44][DEBUG]<airtest.core.android.adb> C:\Users\sandy_ho\AppData\Roaming\Python\Python39\site-packages\airtest\core\android\static\adb\windows\adb.exe -s R5CT4183PZJ shell am start -n com.netease.open.pocoservice/.TestActivity
[pocoservice.apk] stdout: b''
[pocoservice.apk] stderr: b''
still waiting for uiautomation ready.

复现步骤

  1. Pycharm執行程式
  2. 連線到雲端手機,顯示poco service is running訊息
  3. poco腳本沒有正常執行

预期效果 透過appium webdriver在雲端手機裝置上成功執行poco腳本

python 版本: python3.9 poco 版本: 1.0.89

设备:

其他相关环境信息