Appium appium1.7.1 版本 第一次运行 WDA 装上之后 然后第二次启动的时候会把 WDA 给删掉了 然后会出现以下的报错

王智强 · December 29, 2017 · Last by ruirui replied at October 23, 2018 · 3097 hits

appium 命令行版本:1.6.3
appium 桌面版本:1.7.1
xcode 版本:9.2
Mac 版本:10.12.6
第一次运行代码会装上WDA然后第二次启动的时候又会把WDA直接给删除掉了 然后报下面的错误,大家给看一下是否是appium版本和code的版本不兼容导致的
报错信息如下:

[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1514516419934 (11:00:19 GMT+0800 (CST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 47225)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/ex-wangzhiqiang004/Documents/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 23060 ms - 470

共收到 7 条回复 时间 点赞

大神帮忙看一下!!
这是什么原因引起的、谢谢!!
用10.3.3版本的iPad 可以调起来 可以进入到登录页面 但是设置了指纹解锁 到了指纹解锁界面不会点击取消
报错信息如下:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot get '(null)' source of the current application (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 565 milliseconds

Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'C02NP148G5RN.local', ip: '169.254.148.58', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{networkConnectionEnabled=false, bundleId=com.pingan.lanke, databaseEnabled=false, deviceName=ipad, platform=MAC, newCommandTimeout=120, platformVersion=10.3, webStorageEnabled=false, locationContextEnabled=false, automationName=XCUITest, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=iOS, udid=85988fb4f590f311730672a217b112a1f8b50a0f}]
Session ID: bf6ae59c-7840-4cf5-8986-bc8f45033126

这个问题多半处在wda上面,分析过程
手工运行wda,看能否把wda安装到测试设备并启动被测试App
如果wda安装失败,检查:
a. ideviceinstaller工具单独能否正常安装卸载app
b. wda签名是否设置正确

sruru 回复

现在问题是可以通过xcode-->product-->Test 直接把WebDriverAgent安装到被测试的设备中 而且运行代码也可以把APP调起来 就是获取不到页面元素
不会自动定位到输入框进行输入账号密码等。。

全部搞定了
appium 1.7.1版本是不能支持xcode9以上版本的
最终原因是需要用appium 桌面版本:1.7.1 + xcode 版本:8.3.3 xcode下载地址http://www.swift51.com/xcode/8.33.html 百度网盘下载
Mac 版本:10.12.6
然后WebDriverAgent被删掉是因为没有在iOS设置里面的描述文件里面点击信任 点击信任就不会被删掉了
如果需要进行验证码识别需要下载一个tesseract验证码识别工具 在终端输入brew install tesseract就可以了

王智强 回复

你确定Appium 1.7.1不支持Xcode9 ?似乎从1.7.0开始就支持Xcode9了呢。https://github.com/appium/appium/releases

我遇到地问题和你这个类似,用xcode运行webdriveragent代码可以正常装在手机上,但执行用例时appium报错 “MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65”。会把手机上已安装webdriveragent删除,请问什么原因?

guoweigang 回复

遇到了同样的原因 有大神帮忙解决一下么

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up