Appium appium1.6.3 启动 uiautomator2 server 超时失败 (但是同样的环境偶尔会成功),有没有碰到同样的问题解决的啊?

小王子的玫瑰花 · 2017年10月06日 · 最后由 zengshuai 回复于 2020年03月31日 · 2071 次阅读

[debug] [ADB] App is installed
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'D:\android\adt-bundle-windows-x86_64-20140702\sdk\platfor
m-tools\adb.exe' with args: ["-P",5037,"-s","28d14384","shell","am","force-stop"
,"io.appium.uiautomator2.server"]
[UiAutomator2] Starting uiautomator2 server v0.1.8
[UiAutomator2] Running command: 'adb -s 28d14384 shell am instrument -w io.appiu
m.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online...
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body

共收到 12 条回复 时间 点赞

我也碰到,主要是在华为和小米的手机上发生,很头疼,
当发生这个异常的时候,可以执行一下 adb -s 28d14384 shell 看看,有没有反应
目前我也只是重启 appium 服务,再重新安装 uiautomator2 的服务或重启手机的

这个问题有解决办法么。。。。。

bauul 回复

这个时候 adb shell 根本就没有任何反应啊。。。。请问这个问题你后来解决了吗?

donly 回复

没解决,我也不知道怎么搞,可以 tskill adb 杀掉 adb 进程,再重新连接设备

楼主,你好,请问你这个问题是怎么解决的啊,我这边每次都是这个提示,不知道怎么解决,希望楼主帮助解决下,谢谢拉

楼主,请问下这个问题解决了么?我这边在 iOS 上也出现这个问题,一直在打印 [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body,超时然后脚本执行失败了,求告知解决方法,网上都没有找到解决方法

重启手机

我解决这个问题的方法就是每次重新启动 appium 之前,把应用先杀死。这个问题就不会出现了。

小米 之类的目测是因为为(神隐模式 + 电量控制 阻止 appium 的 http socket 对外通讯了

南十字 回复

请问怎么可以联系到您,我想请教一下您哦~

huipei 回复

感觉这个应该和手机的操作系统有关。操作系统高一点就不会出现这个问题。

请问有解决办法了没?我被这个问题困扰甚苦

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册