Appium 求助:appium 启动报 UiAutomator quit before it successfully launched

cywin · 2015年03月31日 · 最后由 落叶秋心 回复于 2017年02月22日 · 1981 次阅读

info: [debug] executing cmd: D:\software\adt-bundle-windows-x86_64\sdk\platform-tools\adb.exe -s fdd3bacc shell "echo 'ping'"
error: UiAutomator quit before it successfully launched
error: Failed to start an Appium session, err was: Error: UiAutomator quit before it successfully launched
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: UiAutomator quit before it successfully launched
at null. (D:\software\python\Appium\node_modules\appium\lib\devices\android\android.js:204:23)
at Object.async.eachSeries (D:\software\python\Appium\node_modules\appium\node_modules\async\lib\async.js:145:20)
at androidHybrid.stopChromedriverProxies (D:\software\python\Appium\node_modules\appium\lib\devices\android\android-hybrid.js:234:9)
at null. (D:\software\python\Appium\node_modules\appium\lib\devices\android\android.js:199:10)
at null. (D:\software\python\Appium\node_modules\appium\lib\devices\android\android.js:221:9)
at androidCommon.uninstallApp (D:\software\python\Appium\node_modules\appium\lib\devices\android\android-common.js:479:5)
at null. (D:\software\python\Appium\node_modules\appium\lib\devices\android\android.js:219:12)
at null. (D:\software\python\Appium\node_modules\appium\lib\devices\android\android.js:228:11)
at D:\software\python\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:890:7
at null. (D:\software\python\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:172:9)

搜索了一下站内,也有同学遇到过这个问题:
http://testerhome.com/topics/715
但其解决办法,删除 AppiumBootstrap.jar,不过后面跑测试用例又报错了:
info: [debug] Error: Could not find AppiumBootstrap.jar; please run 'grunt buildAndroidBootstrap'
at null. (D:\software\python\Appium\node_modules\appium\lib\devices\android\android.js:358:10)
at Object.oncomplete (fs.js:107:15)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find AppiumBootstrap.jar; please run 'grunt buildAndroidBootstrap')","origValue":"Could not find AppiumBootstrap.jar; please run 'grunt buildAndroidBootstrap'"},"sessionId":null}

求各位大神指点。

共收到 3 条回复 时间 点赞

代码块不要用引用格式……有代码块的格式的,请看页面底部的 markdown 说明。

你删了还得再编译个 jar 文件给它啊。
话说你那个帖子是 1.0.0 的了,现在不一定适用了。

2楼 已删除

#1 楼 @chenhengjie123 谢谢,现在更新到用 AppiumForWindows-1.3.7.1 的版本,报错还是一模一样。排查了一下,appium 没什么问题,应该是我 sdk 下的 UiAutomator 有问题,我先看看,不行再来请教。

请问解决了吗?我也遇到了同样的问题,谢谢!

二月 22, 2017 5:07:17 下午 org.openqa.selenium.remote.ProtocolHandshake createSession
信息: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: UiAutomator quit before it successfully launched) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'PC201403181853', ip: '113.250.156.78', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
Driver info: driver.version: AndroidDriver
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册