【问题标题】:Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65" Iphone6 Simulator由于 xcodebuild 失败,无法启动 WebDriverAgent:“xcodebuild failed with code 65”Iphone6 Simulator
【发布时间】:2018-07-25 12:04:40
【问题描述】:

我正在尝试使用 Xcode 在 iPhone 6 模拟器上运行亚马逊应用程序。

应用程序正在 iPhone 模拟器中安装,但无法与其元素交互。

Appium 版本 - 1.7.2
Xcode 9.2 版
平台 Mac- 10.12.6
下载了应用程序 - 即 xxx.app.ipa

日志:

[Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242] 错误域=IDEFoundationErrorDomain Code=1“无法启动模拟可执行文件:在 /Applications/Xcode.app/Contents/Developer/ 找不到文件Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" UserInfo={NSLocalizedDescription=无法启动模拟可执行文件:在 /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 "早期意外退出,操作从未完成引导 - 不会尝试重新启动" UserInfo={NSLocalizedDescription=早期意外退出,操作从未完成引导 - 不会尝试重新启动} [Xcode] [ Xcode] 2018-02-13 21:23:08.010 xcodebuild[9868:75259] 连接对等方拒绝了“dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”的通道请求;频道已取消

[Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] 2018-02-13 21:23:08.011 xcodebuild[9868:75318] 保存测试日志时出错:

错误域=NSPOSIXErrorDomain Code=2“没有这样的文件或目录”UserInfo={NSFilePath=/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994 -9443-F73DDE5FBD4D.xcactivitylog, NSLocalizedDescription=没有这样的文件或目录} |用户信息:{ [Xcode] NSFilePath = "/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog"; [Xcode] NSLocalizedDescription = "没有这样的文件或目录"; [Xcode] } [Xcode]

[XCUITest] xcodebuild 退出,代码 '65' 和信号 'null' [BaseDriver] 事件 'wdaStartFailed' 记录于 1518585788035(21:23:08 GMT-0800 (PST)) xcodebuild 失败:“xcodebuild 失败,代码为 65”。 [XCUITest] 退出并卸载 WebDriverAgent,然后重试 [XCUITest] 关闭子进程 [XCUITest] 从设备中删除 WDA 应用程序 [XCUITest] 错误:由于 xcodebuild 失败,无法启动 WebDriverAgent:“xcodebuild 失败,代码为 65”。在 XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) 在 tryCatch (/Applications/Appium.app /Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)在 GeneratorFunctionPrototype.invoke 作为 _invoke 在 GeneratorFunctionPrototype.prototype.(匿名函数)作为 GeneratorFunctionPrototype.invoke 的下一个(/ Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)在错误:由于xcodebuild失败无法启动WebDriverAgent:“xcodebuild失败,代码65 ”。在 XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) 在 tryCatch (/Applications/Appium.app /Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)在 GeneratorFunctionPrototype.invoke 作为 _invoke 在 GeneratorFunctionPrototype.prototype.(匿名函数)作为 GeneratorFunctionPrototype.invoke 的下一个(/ Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) 在 [XCUITest] 不清除日志文件。使用 clearSystemFiles 功能打开。 [XCUITest] 为设备 B720A212-489B-4A48-BBDB-7119C976340 杀死正在运行的进程 'xcodebuild.B720A212-489B-4A48-BBDB-7119C9763406, B720A212-489B-4A48-BBDB-7119C9763406.*XCTRunner' ... [XCUITest] 'pgrep -nif xcodebuild.*B720A212-489B-4A48-BBDB-7119C9763406' 没有检测到任何匹配的进程。返回码:1 [XCUITest] 'pgrep -nif B720A212-489B-4A48-BBDB-7119C9763406.XCTRunner' 没有检测到任何匹配的进程。返回代码:1 [XCUITest] 删除为此运行创建的模拟器(udid:'B720A212-489B-4A48-BBDB-7119C9763406')[iOSLog] 停止 iOS 日志捕获

【问题讨论】:

    标签: xcode appium ui-automation appium-ios


    【解决方案1】:

    错误清除显示 -- /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}

    Webdriver 代理需要在设备上成功运行 尝试配置Webdriver代理和开发者ID ::

    1. 打开已有的WebDriver Agent(双击WebDriverAgent.xcodeproj)

    2. 在 Xcode 之上你的 File > New> File ,然后你会弹出这样的东西

    3. 选择 OSX->.Other-> 选择配置设置文件。

    4. 将以下内容粘贴到新创建的文件中。

    开发团队 = xxxxxxxxx

    CODE_SIGN_IDENTITY = iPhone 开发者

    开发团队是您的开发人员应该能够提供的团队 ID。不要更改 CODE_SIGN_IDENTITY。

    在 device.propoerties 文件中添加这个

    xcodeConfigFile=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig

    在 ConfigCapa.java 文件中添加这个

    capabilities.setCapability(“xcodeConfigFile”,emulatorProp.getProperty(“xcodeConfigFile”));

    打开终端转到

    $ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/

    $ mkdir -p 资源/WebDriverAgent.bundle

    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

    【讨论】:

      【解决方案2】:

      它说它找不到 WebDriver 应用程序。你能在/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/中确认它的存在吗?

      如果它不存在,那么你的 Appium 安装有问题,所以我建议重新安装 npm uninstall -g appiumnpm install -g appium。无论如何,这样做可能是安全的。

      同时确保您重新启动设备并卸载设备上所有现有的 WebDriver 应用。

      【讨论】:

        猜你喜欢
        • 2019-03-06
        • 2017-10-24
        • 2020-10-24
        • 2020-10-01
        • 2019-07-13
        • 2021-10-06
        • 2021-02-18
        • 2020-03-11
        • 2018-08-21
        相关资源
        最近更新 更多