Appium appium-desktop-1.0.0 启动真机总是自动把真机上的 wda (我这个 wda 是安装的 appium1.6.4 的那个,appium1.6.4 可用,desktop 不能用) 删除,然后就起不来了,求助大神啊!!!下面上图:

JasonChang · 2017年05月05日 · 最后由 jade685 回复于 2019年01月29日 · 4618 次阅读

首先说明:使用 iOS 模拟器可以正常使用 appium-desktop,但是使用真机就起不来啊:
wda 是安装的 appium1.6.4 的那个,appium1.6.4 可以正常跑通,但是运行 appium-desktop 的时候他会自动把真机上的这个 wda 删除,我想问有没有 appium 专用的 wda 呢?
先看我的参数设置啊:

以下是 appium-desktop 的报错信息:请看这句:[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

[Appium] Welcome to Appium v1.6.4
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"XCUITest","bundleId":"com.jason.Tes","deviceName":"iPhone 5s","platformName":"iOS","platformVersion":"10.3","udid":"2bdxxxxxxxxxxxxxxxxxxdd56fe12fb","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"XCUITest","bundleId":"com.jason.Tes","deviceName":"iPhone 5s","platformName":"iOS","platformVersion":"10.3","udid":"2bdxxxxxxxxxxxxxxxxxxxd56fe12fb","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null,null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1494235274963 (17:21:14 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.27.2) session
[Appium] Capabilities:
[Appium] automationName: 'XCUITest'
[Appium] bundleId: 'com.jason.Tes'
[Appium] deviceName: 'iPhone 5s'
[Appium] platformName: 'iOS'
[Appium] platformVersion: '10.3'
[Appium] udid: '2bdxxxxxxxxxxxxxxxxxxxd56fe12fb'
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.27.2
[BaseDriver] Session created with session id: 03c54d36-2729-4604-ada7-5da4b40b936f
[XCUITest] Xcode version set to '8.3.2'
[XCUITest] iOS SDK Version set to '10.3'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1494235276598 (17:21:16 GMT+0800 (CST))
[XCUITest] Available devices: 2bdxxxxxxxxxxxxxxxxxxxd56fe12fb
[XCUITest] Creating iDevice object with udid '2bdxxxxxxxxxxxxxxxxxxxd6fe12fb'
[XCUITest] Determining device to run tests on: udid: '2bdxxxxxxxxxxxxxxxxxxxd56fe12fb', real device: true
[BaseDriver] Event 'appConfigured' logged at 1494235276851 (17:21:16 GMT+0800 (CST))
[BaseDriver] Event 'resetStarted' logged at 1494235276852 (17:21:16 GMT+0800 (CST))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1494235276852 (17:21:16 GMT+0800 (CST))
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[BaseDriver] Event 'logCaptureStarted' logged at 1494235277004 (17:21:17 GMT+0800 (CST))
[XCUITest] Setting up real device
[BaseDriver] Event 'wdaStartAttempted' logged at 1494235277005 (17:21:17 GMT+0800 (CST))
[XCUITest] Using WDA path: '/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=2bd72ee528ece44d91bf8317fad3820d56fe12fb -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3' in directory '/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Log file for xcodebuild test: /Users/yuanmj/Library/Developer/Xcode/DerivedData/WebDriverAgent-folfazwwukpzfkegdblpnfuwlvfn/Logs/Test/21E68DE7-6BE7-4236-B00D-6858816C6444/Session-WebDriverAgentRunner-2017-05-08_172125-y24Xg6.log
[Xcode] 2017-05-08 17:21:25.154 xcodebuild[6711:1499963] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/yuanmj/Library/Developer/Xcode/DerivedData/WebDriverAgent-folfazwwukpzfkegdblpnfuwlvfn/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fb9bf01eb00 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2017-05-08 17:21:25.154 xcodebuild[6711:1499963] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1494235285168 (17:21:25 GMT+0800 (CST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 6708)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaStartAttempted' logged at 1494235295800 (17:21:35 GMT+0800 (CST))
[XCUITest] Using WDA path: '/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=2bd72ee528ece44d91bf8317fad3820d56fe12fb -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3' in directory '/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Log file for xcodebuild test: /Users/yuanmj/Library/Developer/Xcode/DerivedData/WebDriverAgent-folfazwwukpzfkegdblpnfuwlvfn/Logs/Test/66E109F2-BAFA-424B-8AE9-6782184554B3/Session-WebDriverAgentRunner-2017-05-08_172142-BCE2Il.log
[Xcode] 2017-05-08 17:21:42.118 xcodebuild[6741:1500757] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/yuanmj/Library/Developer/Xcode/DerivedData/WebDriverAgent-folfazwwukpzfkegdblpnfuwlvfn/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fb8b0f4a1d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode] 2017-05-08 17:21:42.118 xcodebuild[6741:1500757] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1494235302132 (17:21:42 GMT+0800 (CST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 6739)
[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
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:374:15)
at tryCatch (/Applications/Appium 2.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 (/Applications/Appium 2.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
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:374:15)
at tryCatch (/Applications/Appium 2.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 (/Applications/Appium 2.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
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:374:15)
at tryCatch (/Applications/Appium 2.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 (/Applications/Appium 2.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 37455 ms - 230

请问大神们的是怎么启动真机的呢?
欢迎大神指教,小弟不胜感激。。。。。。。

共收到 21 条回复 时间 点赞

遇到 Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 的解决方法 · TesterHome
https://testerhome.com/topics/8074

我遇到的是重复安装一两次后就启动成功

渐次消逝 回复

恩,我恍然大悟,谢谢您的回复,思密达!😂

19楼 已删除
fdeferf 回复

谢谢您的指点,我找到问题的症结了,谢谢!

怎么处理的啊,我也是遇到了这个问题。

石小朵 回复

我遇到的问题的是 wda 自动删除后没有自动重装,原因是被删除的 wda 是我之前 appium1.6.4 中的 wda,所以 appium-desktop 会把这个 “异己分子” 删除,安装自己的 wda。其实报错日志已经说的很清楚了(请检查自己的报错日志)。我的 appium-desktop 的 wda 路径是:/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/ 用 xcode 打开这个路径中的 wda 重新编译成功后就可以了。

JasonChang 回复

我的 appium_desktop 的 wda 在一个外挂盘上,我打开说是 unlock,我怎么改变 appiu_desktop 的路径呢?

石小朵 回复

问题已解决:我的安装方式不对

石小朵 回复

我也遇到这个问题了,敢问大神是怎么解决的?请指教,感谢🙏

石小朵 回复

怎么解决的呢?跟你一样的问题哎

JasonChang 回复

牛逼了,解决了两天的问题,在你这里得到了答案

JasonChang 回复


我装了你说的 desktop 版本的 wda 了,但是 app 还是启动不起来。一直停留在这个页面不动

能不能加你 qq 咨询一下

我遇到 “ Could not remove app: 'Command 'ios-deploy --uninstall_only --id 90fc50c58632c80e75122f7a70f6b45961bec2b2 --bundle_id com.apple.test.WebDriverAgentRunner-Runner' exited with code 253'” 的错误,有没有哪位同学可以指导我一下

回复

我遇到和你一样的情况,请问你是怎么解决的?

没解决。。

遇到楼主一样的问题 现在解决了吗?

楼主问题解决了吗?我也遇到同样的问题

JasonChang 回复

卡了好几天的问题,终于解决了。感谢!

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