AirtestProject / AirtestProject/AirtestIDE

RuntimeError: unable to launch AndroidUiautomationPoco

オープン
#975 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
236
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

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

**(重要!根据问题类型选择分类)**
* 图像识别相关问题 -> https://github.com/AirtestProject/Airtest/issues
* 控件识别、树状结构、poco库报错 -> https://github.com/AirtestProject/Poco/issues
* 测试开发环境AirtestIDE使用问题(本软件) -> 本页面

**详细描述问题bug:**
bug描述:无法启动AndroidUiautomationPoco,且poco辅助窗连接UI树失败

**复现步骤:**

**python 版本:** `python3.7`

**操作系统:** `MACos 10.15.5`

**手机设备信息:**
- 手机型号:红米note5
- Android系统版本号: [e.g. Android 9]
- (别的信息)

**其他相关信息补充**
(例如在linux ubuntu16.04上运行异常,在windows上正常等信息。)
- AirtestIDE版本号:1.2.10

**截屏**
"/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7" -u "/Applications/AirtestIDE.app/Contents/MacOS/sample/custom_launcher.py" "/Users/cc/PycharmProjects/Model-Quark/foodie_times/appstart/start_foodie_cold.air" --device android://127.0.0.1:5037/2f1186f?cap_method=JAVACAP&&ori_method=MINICAPORI&&touch_method=MINITOUCH --log "/var/folders/cg/w7t025d14yg67l8bjg00tm780000gp/T/AirtestIDE/scripts/82b53d1c6a1627358201516aacafaeee"
============================================================

[Start running..]
save log in '/var/folders/cg/w7t025d14yg67l8bjg00tm780000gp/T/AirtestIDE/scripts/82b53d1c6a1627358201516aacafaeee'
[12:37:21][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f wait-for-device
[12:37:21][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell getprop ro.build.version.sdk
custom setup
[12:37:23][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys activity top
[12:37:23][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys package com.netease.nie.yosemite
[12:37:23][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell settings get secure default_input_method
[12:37:23][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell ime list -a
[12:37:23][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys package com.netease.open.pocoservice
installed version is 41, installer version is 41. force_reinstall=False
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys package com.netease.open.pocoservice.test
installed version is 0, installer version is 0. force_reinstall=False
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f forward --no-rebind tcp:19923 tcp:10080
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f forward --no-rebind tcp:15053 tcp:10081
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell ps -A |echo $(grep -E com.github.uiautomator)
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell am force-stop com.netease.open.pocoservice
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell am start -n com.netease.open.pocoservice/.TestActivity
[12:37:24][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell am instrument -w -e debug false -e class com.netease.open.pocoservice.InstrumentedTestAsLauncher com.netease.open.pocoservice.test/android.support.test.runner.AndroidJUnitRunner
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
[12:37:37][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell ps -A |echo $(grep -E uiautomator)
[12:37:38][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell am force-stop com.netease.open.pocoservice
[12:37:38][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell am start -n com.netease.open.pocoservice/.TestActivity
[12:37:38][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell am instrument -w -e debug false -e class com.netease.open.pocoservice.InstrumentedTestAsLauncher com.netease.open.pocoservice.test/android.support.test.runner.AndroidJUnitRunner
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
still waiting for uiautomation ready.
[12:37:50][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys activity top
[12:37:50][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys package com.netease.nie.yosemite
[12:37:50][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f forward --no-rebind tcp:13358 localabstract:javacap_13358
[12:37:50][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell pm path com.netease.nie.yosemite
[12:37:50][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell CLASSPATH=/data/app/com.netease.nie.yosemite-1y8YW00aWl7-BU_su1fo5A==/base.apk exec app_process /system/bin com.netease.nie.yosemite.Capture --scale 100 --socket javacap_13358 -lazy 2>&1
[12:37:51][DEBUG] [javacap_sever]b'Capture server listening on @javacap_13358'
[12:37:51][DEBUG] (1, 3, 0, 1080, 2160, 0, 0, 0, 1)
[12:37:52][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell ls -l /data/local/tmp/rotationwatcher.jar
[12:37:52][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell rm /data/local/tmp/rotationwatcher.jar
[12:37:52][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f push /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/apks/rotationwatcher.jar /data/local/tmp/rotationwatcher.jar
[12:37:52][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell chmod 755 /data/local/tmp/rotationwatcher.jar
[12:37:52][INFO] install rotationwacher finished
[12:37:52][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell app_process -Djava.class.path=/data/local/tmp/rotationwatcher.jar /data/local/tmp com.example.rotationwatcher.Main
[12:37:54][DEBUG] [rotation_server]b'0'
[12:37:54][INFO] update orientation None->0
[12:37:54][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell ls /data/local/tmp/minicap
[12:37:54][DEBUG] update_rotation: 0
[12:37:54][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell ls /data/local/tmp/minicap.so
[12:37:54][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -v 2>&1
[12:37:54][DEBUG] version:5
[12:37:54][DEBUG] skip install minicap
[12:37:54][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -i
[12:37:54][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f shell dumpsys window displays
[12:37:55][ERROR] Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/cli/runner.py", line 70, in runTest
exec(compile(code.encode("utf-8"), pyfilepath, 'exec'), self.scope)
File "/Users/cc/PycharmProjects/Model-Quark/foodie_times/appstart/start_foodie_cold.air/start_foodie_cold.py", line 19, in
from common.perftime.record.record import Record
File "/Users/cc/PycharmProjects/Model-Quark/common/perftime/record/record.py", line 18, in
from common.common import Common
File "/Users/cc/PycharmProjects/Model-Quark/common/common.py", line 16, in
from common.lib import *
File "/Users/cc/PycharmProjects/Model-Quark/common/lib.py", line 40, in
poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=True)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/poco/drivers/android/uiautomation.py", line 202, in __init__
raise RuntimeError("unable to launch AndroidUiautomationPoco")
RuntimeError: unable to launch AndroidUiautomationPoco

custom tearDown
======================================================================
ERROR: runTest (__main__.CustomCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/cli/runner.py", line 73, in runTest
six.reraise(*sys.exc_info())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/six.py", line 703, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/cli/runner.py", line 70, in runTest
exec(compile(code.encode("utf-8"), pyfilepath, 'exec'), self.scope)
File "/Users/cc/PycharmProjects/Model-Quark/foodie_times/appstart/start_foodie_cold.air/start_foodie_cold.py", line 19, in
from common.perftime.record.record import Record
File "/Users/cc/PycharmProjects/Model-Quark/common/perftime/record/record.py", line 18, in
from common.common import Common
File "/Users/cc/PycharmProjects/Model-Quark/common/common.py", line 16, in
from common.lib import *
File "/Users/cc/PycharmProjects/Model-Quark/common/lib.py", line 40, in
poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=True)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/poco/drivers/android/uiautomation.py", line 202, in __init__
raise RuntimeError("unable to launch AndroidUiautomationPoco")
RuntimeError: unable to launch AndroidUiautomationPoco

----------------------------------------------------------------------
Ran 1 test in 33.689s

FAILED (errors=1)
[12:37:55][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f forward --remove tcp:19923
[12:37:55][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f forward --remove tcp:15053
[12:37:55][DEBUG] /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airtest/core/android/static/adb/mac/adb -P 5037 -s 2f1186f forward --remove tcp:13358
[Finished]

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。