Appium Appium 执行中报错,adb 服务被杀掉

大浪 · 2017年05月09日 · 最后由 WwuTT 回复于 2020年03月17日 · 2970 次阅读
[Logcat] Logcat terminated with code 0, signal null
[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [AndroidDriver] Shutting down Android driver
[Appium] Closing session, cause was 'UiAUtomator shut down unexpectedly'
[Appium] Removing session 6ba02a58-410d-42b6-af05-9999781f3bc3 from our master session list
[debug] [ADB] Getting connected devices...
[MJSONWP] Encountered internal error running command: Error: UiAUtomator shut down unexpectedly
    at AndroidBootstrap.callee$2$0$ (../../lib/bootstrap.js:76:44)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:100:21)
    at invoke (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:185:17)
    at Promise.exports.(anonymous function).target.(anonymous function).function.target.(anonymous function).F (/usr/local/lib/node_modules/appium/node_modules/._core-js@1.2.7@core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:100:21)
    at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/._babel-runtime@5.8.24@babel-runtime/regenerator/runtime.js:209:12)
    at UiAutomator.callee$2$0 (../../lib/bootstrap.js:73:64)
    at emitOne (events.js:96:13)
    at UiAutomator.emit (events.js:188:7)
    at UiAutomator.changeState (../../lib/uiautomator.js:85:10)
    at SubProcess.<anonymous> (../../lib/uiautomator.js:47:14)
    at emitTwo (events.js:106:13)
    at SubProcess.emit (events.js:191:7)
    at ChildProcess.<anonymous> (../../lib/teen_process.js:205:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

执行一段时间后设备 adb 服务中断,多次拔插数据线才能再连上,换了多个 appium 版本都有同样的问题

* daemon not running. starting it now on port 5037 *
adb E 43518 809114 usb_osx.cpp:322] Could not open interface: e00002c5
adb E 43518 809114 usb_osx.cpp:284] Could not find device interface
* daemon started successfully *
error: no devices/emulators found
共收到 8 条回复 时间 点赞

跟我我的了解, adb 的问题可能是受其他软件影响了, 你电脑上有没有其他工具? 手机助手之类的, 或者换一个干净的环境。数据线问题? Appium 版本多少?

应该是别的手机管理的软件的 adb 影响了,解决方法 :把所有的换成同一个版本的 adb 的

感谢你们的回答,换了 adb 版本解决了

大浪 回复

问一下,是哪里更换的 adb 版本啊,我也遇到这个问题了

张小川 回复

Android Debug Bridge version 1.0.39

大浪 回复

我的 adb 版本就是 39 Android Debug Bridge version 1.0.39

我的 adb 版本就是 39 Android Debug Bridge version 1.0.39,但是也出现 Appium 执行中报错,adb 服务被杀掉

wulikanhua 回复

问题解决了吗 我也碰到了这个问题 想问一下解决办法

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