minium版本:v1.2.2 android 手机系统: 11
日志:
2022-03-15 10:13:25 [INFO] ['bad053a4'] (adbwrap.py:152)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell pm path com.tencent.mm.atstub.test (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell ls /data/app/~~HOXm_oGc4g4PZdds_Xf6fQ==/com.tencent.mm.atstub.test-98vJ-05ZRMFXryX9vX9_eA==/base.apk (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 pull /data/app/~~HOXm_oGc4g4PZdds_Xf6fQ==/com.tencent.mm.atstub.test-98vJ-05ZRMFXryX9vX9_eA==/base.apk /var/folders/yt/jpd32549509g18s4fb0nxqbh0000gn/T/temp.apk (adbwrap.py:219)
2022-03-15 10:13:25 [INFO] com.tencent.mm.atstub.test check result:True (adbwrap.py:1238)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell pm path com.tencent.mm.atstub (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell ls /data/app/~~Idav1lhsZNcFlT6fqMoO5g==/com.tencent.mm.atstub-ZQQZ3bkaT05St6h4Vpc2Eg==/base.apk (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 pull /data/app/~~Idav1lhsZNcFlT6fqMoO5g==/com.tencent.mm.atstub-ZQQZ3bkaT05St6h4Vpc2Eg==/base.apk /var/folders/yt/jpd32549509g18s4fb0nxqbh0000gn/T/temp.apk (adbwrap.py:219)
2022-03-15 10:13:25 [INFO] com.tencent.mm.atstub check result:True (adbwrap.py:1238)
2022-03-15 10:13:25 [INFO] 环境检查OK! (command_line.py:23)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell pm list packages (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell pm list packages (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 forward tcp:63258 tcp:9999 (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] true_or_false:False (basedriver.py:83)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell ps (adbwrap.py:219)
2022-03-15 10:13:25 [DEBUG] adb -s bad053a4 shell ps -A (adbwrap.py:219)
2022-03-15 10:13:26 [INFO] adb -s bad053a4 shell am instrument -w -r -e class 'com.tencent.mm.atstub.atserver.StubRunner#testStartServer' com.tencent.mm.atstub.test/androidx.test.runner.AndroidJUnitRunner (javadriver.py:236)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS: class=com.tencent.mm.atstub.atserver.StubRunner (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS: current=1 (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS: id=AndroidJUnitRunner (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS: numtests=1 (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS: stream= (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] java print:com.tencent.mm.atstub.atserver.StubRunner: (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] true_or_false:True (basedriver.py:83)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS: test=testStartServer (javadriver.py:283)
2022-03-15 10:13:27 [DEBUG] java print:INSTRUMENTATION_STATUS_CODE: 1 (javadriver.py:283)
2022-03-15 10:13:29 [DEBUG] adb -s bad053a4 shell am start -W -n com.tencent.mm.atstub/.ui.LauncherUI (adbwrap.py:219)
2022-03-15 10:13:29 [DEBUG] Starting: Intent { cmp=com.tencent.mm.atstub/.ui.LauncherUI }
Status: ok
LaunchState: WARM
Activity: com.tencent.mm.atstub/.ui.LauncherUI
TotalTime: 641
WaitTime: 706
Complete
(adbwrap.py:765)
2022-03-15 10:13:29 [DEBUG] wait_for_ui_ready start (javadriver.py:206)
2022-03-15 10:13:29 [DEBUG] id=140411163892656, http://127.0.0.1:63258/ping, params:None (basedriver.py:168)
here here here here here here here
2022-03-15 10:13:29 [DEBUG] {"ret":0,"msg":"pong","data":{"result":true,"value":"pong"}}, java request costs 25ms (basedriver.py:124)
2022-03-15 10:13:29 [DEBUG] id=140411163892656, http://127.0.0.1:63258/hasReady, params:None (basedriver.py:168)
here here here here here here here
2022-03-15 10:13:30 [DEBUG] {"ret":0,"msg":"","data":{"result":true}}, java request costs 502ms (basedriver.py:124)
2022-03-15 10:13:30 [INFO] At init completed (javadriver.py:233)
2022-03-15 10:13:31 [DEBUG] adb -s bad053a4 shell ps (adbwrap.py:219)
2022-03-15 10:13:31 [DEBUG] adb -s bad053a4 shell am force-stop com.tencent.mm (adbwrap.py:219)
2022-03-15 10:13:31 [DEBUG] adb -s bad053a4 shell am start -W -n com.tencent.mm/.ui.LauncherUI (adbwrap.py:219)
2022-03-15 10:13:32 [DEBUG] Starting: Intent { cmp=com.tencent.mm/.ui.LauncherUI }
Status: ok
LaunchState: COLD
Activity: com.tencent.mm/.ui.LauncherUI
TotalTime: 1082
WaitTime: 1118
Complete
(adbwrap.py:765)
ReLaunch(/pages/index/index) but(/pages/home/home)
到这里访问http://127.0.0.1:63258/ping都可以拿到正确结果,后面的代码开始执行 enable_remote_debug。后面再开始访问ping,就拿不到内容了,网页访问这个url一直转圈。发现的原因是,使用allow_get_user_phone去点击弹窗button,报错说connection error,然后代码做了判断说尝试3次后还是失败,要做一个reconnect操作,reconnect之后就可以了。我想问这种情况下,尝试都是没用的。请问是code本身有问题,还是默认就是这样的机制。谢谢