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

王智强 · 2017年12月29日 · 最后由 Forkey 回复于 2021年01月04日 · 3658 次阅读

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

共收到 9 条回复 时间 点赞

大神帮忙看一下!!
这是什么原因引起的、谢谢!!
用 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 回复

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

ruirui 回复

请问你这个问题解决了么?我在这里卡了好几天了

这个问题有人解决了吗?

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