无法启动WebDriverAgent,因为xcodebuild失败:“xcodebuild failed with code 65”Iphone6模拟器

qnyhuwrf  于 2023-03-31  发布在  其他
关注(0)|答案(2)|浏览(203)

I am trying to run the Amazon app on an iPhone 6 simulator using Xcode.
The app is getting installed in the iPhone Simulator, but not able to interact with its elements.
Appium version - 1.7.2
Xcode Version 9.2
Platform Mac- 10.12.6
Downloaded the app - i.e. xxx.app.ipa
Logs:
[Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242] Error Domain=IDEFoundationErrorDomain Code=1 "Cannot launch simulated executable: no file found at /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app} [Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242]
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] 2018-02-13 21:23:08.010 xcodebuild[9868:75259] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled
[Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] 2018-02-13 21:23:08.011 xcodebuild[9868:75318] Error saving test log:
Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSFilePath=/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog, NSLocalizedDescription=No such file or directory} | User info: { [Xcode] NSFilePath = "/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog"; [Xcode] NSLocalizedDescription = "No such file or directory"; [Xcode] } [Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null' [BaseDriver] Event 'wdaStartFailed' logged at 1518585788035 (21:23:08 GMT-0800 (PST)) [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] 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.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/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 (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/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 (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on. [XCUITest] Killing running processes 'xcodebuild.B720A212-489B-4A48-BBDB-7119C9763406, B720A212-489B-4A48-BBDB-7119C9763406.*XCTRunner' for the device B720A212-489B-4A48-BBDB-7119C9763406... [XCUITest] 'pgrep -nif xcodebuild.*B720A212-489B-4A48-BBDB-7119C9763406' didn't detect any matching processes. Return code: 1 [XCUITest] 'pgrep -nif B720A212-489B-4A48-BBDB-7119C9763406.XCTRunner' didn't detect any matching processes. Return code: 1 [XCUITest] Deleting simulator created for this run (udid: 'B720A212-489B-4A48-BBDB-7119C9763406') [iOSLog] Stopping iOS log capture

kpbpu008

kpbpu0081#

它说它找不到WebDriver应用程序。你能确认它在/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/中的存在吗?
如果它不存在,那么Appium安装有问题,所以我建议重新安装npm uninstall -g appiumnpm install -g appium。无论如何,这样做可能是安全的。
此外,请确保重新启动设备并卸载设备上任何现有的WebDriver应用程序。

nimxete2

nimxete22#

错误清除显示-- /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
Webdriver代理需要在设备上成功运行尝试配置Webdriver代理和Developer ID::
1.打开现有的WebDriver代理(双击WebDriverAgent.xcodeproj)
1.在Xcode的顶部你文件〉新建〉文件,然后你会弹出这样的东西
1.选择OSX-〉.Other-〉Select Configuration settings file。
1.将以下内容粘贴到新建文件中。
开发团队= xxxxxxxxx
CODE_SIGN_IDENTITY = iPhone开发人员
开发团队是开发人员应该能够提供的团队ID。不要更改CODE_SIGN_IDENTITY。
在设备.属性文件中添加以下内容
xcodeConfigFile=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig
在ConfigCapa.java文件中添加以下内容
setCapability(“xcodeConfigFile”,emulatorProp.getProperty(“xcodeConfigFile”));
打开终端转到
$ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
$ mkdir -p资源/网络驱动程序代理包
sh ./Scripts/bootstrap.sh-d
转到终端类型
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=DeviceID' test上述命令的构建输出的最后一行应该是Listening on USB。那么就万事俱备了!
brew install libimobiledevice -HEAD
要运行appium类型appium &
要查找版本,请键入appium - v

相关问题