【问题标题】:xcodebuild failure: "xcodebuild failed with code 65 is displaying when tried to start session with Appium Desktopxcodebuild 失败:“xcodebuild 失败,在尝试与 Appium Desktop 启动会话时显示代码 65
【发布时间】:2018-04-08 21:53:43
【问题描述】:

当我尝试使用 appium 桌面启动会话时,出现以下错误:

处理命令时发生未知的服务器端错误。原始错误:由于 xcodebuild 失败,无法启动 WebDriverAgent:“xcodebuild failed with code 65”。确保您遵循https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md 上的教程。如果已安装 WebDriverAgentRunner 应用程序,请尝试从设备中删除并重新启动设备。

Appium Desktop 中使用的所需功能:

{
  "platformName": "iOS",
  "deviceName": "iPhone 7",
  "udid": "93551a7d721b790b0188642402f1ada96892b816",
  "app": "/Users/globalit/Desktop/IntegrationApp.app",
  "automationName": "XCUITest",
  "noReset": true
}

配置: IOS 11、OSX 10.12、Xcode 8.1、Appium 桌面 1.2.5

错误日志:

[Xcode] 2017-10-27 15:27:28.943 xcodebuild[871:24036] Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.WebDriverAgentRunner-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner, NSUnderlyingError=0x7fd602a29400 {Error Domain=DTXMessage Code=1 "(null)" UserInfo={DTXExceptionKey=The operation couldn’t be completed. Unable to launch com.apple.test.WebDriverAgentRunner-Runner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier 'com.apple.test.WebDriverAgentRunner-Runner'}}}
[Xcode] 2017-10-27 15:27:28.943 xcodebuild[871:24036] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "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] ** TEST EXECUTE FAILED **
[Xcode] 
[Xcode] 
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1509098248985 (15:27:28 GMT+0530 (IST))
[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 870)
[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$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381: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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
 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$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381: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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[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$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381: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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 29571 ms - 470 
[HTTP] --> DELETE /wd/hub/session {}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- DELETE /wd/hub/session 404 13 ms - 57 

【问题讨论】:

    标签: appium appium-ios


    【解决方案1】:

    请在您的设备上运行一次位于此处的 Xcode 项目:/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj

    如果您遇到任何问题,请告诉我。

    【讨论】:

      【解决方案2】:

      WebdriverAgent 未在您的移动设备中构建和测试。我遇到了同样的问题,并通过让 Webdriver 代理在我的移动设备中打开来解决它。

      【讨论】:

      • 您能否详细说明您的答案。提供构建 WebdriverAgent 或如何将其添加到 xcode 构建的链接或文档。
      【解决方案3】:

      升级到 Xcode 12.4 并尝试在 ios 14.4 上运行后,我遇到了与 Appium-desktop 相同的问题,添加以下功能后它对我有用: { "xcodeOrgId": "组织ID", "xcodeSigningId": "SignId", }

      我正在使用 appium-desktop 1.18.3

      【讨论】:

        【解决方案4】:

        来自 Ashraf 答案的配置对我有用。我面对这个问题超过 24 小时。我有类似的配置,iOS 14.4 和 Appium 桌面 1.20.2 版本的 iPad,以及 12.4 版本的 XCode。

        【讨论】:

          【解决方案5】:

          你可以在终端上使用这个命令:

          cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
          xcodebuild -allowProvisioningUpdates -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=Your Device UDID' test
          

          【讨论】:

            【解决方案6】:

            我更新了我的 appium 服务器,并且我的旧测试开始工作了。

            【讨论】:

              猜你喜欢
              • 2018-09-13
              • 1970-01-01
              • 2020-01-25
              • 2020-07-30
              • 2019-03-06
              • 1970-01-01
              • 2018-07-25
              • 2020-10-24
              • 2017-10-24
              相关资源
              最近更新 更多