0

WebDriverAgent 已从 iPad 上卸载,并且从未再次安装并抛出 xcode 错误:“org.openqa.selenium.SessionNotCreatedException:无法启动新会话。响应代码 500。消息:处理命令时发生未知的服务器端错误。原始错误:由于 xcodebuild 失败,无法启动 WebDriverAgent:xcodebuild failed with code 65”</p>

配置

Appium:1.22.0/1.22.2/1.22.0/1.22.0-beta

Mac 操作系统:macOS 蒙特雷 v12.1

Xcode:13.0

java-client - 8.0.0-beta

- 4.1.0

遵循以下教程:

https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

appium 服务器端错误:xcodebuild 失败,代码 65

https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/10

https://discuss.appium.io/t/wda-gets-installed-and-deleted-on-iphone-while-creating-session-using-appium-desktop/32693/1

错误日志:

org.openqa.selenium.SessionNotCreatedException:无法启动新会话。响应代码 500。消息:处理命令时发生未知的服务器端错误。原始错误:由于 xcodebuild 失败,无法启动 WebDriverAgent:xcodebuild failed with code 65 xcodebuild 错误消息:

2022-01-21 11:49:21.109 xcodebuild[96868:1671553] [MT] IDETestOperationsObserverDebug: (2B376EA3-D48B-44EE-8EE5-A14AAC6B3949) 无法进行测试运行程序会话:错误域 = com.apple.dt.xctest。 error Code=9 "Unable to connect to test manager on dfb994683be4aa90965d0836323ad4e7c0d04514" UserInfo={NSLocalizedDescription=Unable to connect to test manager on dfb994683be4aa90965d0836323ad4e7c0d04514, NSUnderlyingError=0x6000029748a0 {Error Domain=XCTMobileDeviceFramework Code=34 "The service is invalid." UserInfo={NSLocalizedDescription=服务无效。}}} 2022-01-21 11:49:21.340 xcodebuild[96868:1671553] [MT] DTDKRemoteDeviceConnection:无法在设备“dfb994683be4aa90965d0836323ad4e7c0d04514”上启动仪器守护程序:错误域=com。 apple.dtdevicekit Code=811 "无法在设备上启动远程服务。" UserInfo={NSUnderlyingError=0x60000285cbd0 {错误域=com.apple.dt.MobileDeviceErrorDomain Code=-402653150“服务无效。” UserInfo={MobileDeviceErrorCode=(0xE8000022), com.apple.dtdevicekit.stacktrace=( 0 DTDeviceKitBase 0x00000001149e781a DTDKCreateNSErrorFromAMDErrorCode + 233 1 DTDeviceKitBase 0x00000001149f9161 __63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]_block_invoke + 564 2 DTDeviceKitBase 0x00000001149f8829 __48-[DTDKRemoteDeviceConnection futureWithSession:DVT_CALLING_CLIENT_BLOCKNSLocalizedRecoverySuggestion=请检查您与设备的连接。, DVTRadarComponentKey=261622, NSLocalizedDescription=无法在设备上启动远程服务。} *** 如果您认为此错误代表错误,请将结果包附加到 /Users/rishi/Library [开发人员/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2022.01.21_11-49-21-+0530.xcresult 2022-01-21 11:49:21.342 xcodebuild[96868:1671553] IDETestOperationsObserverDebug: 0.294 elapsed -- 测试开始完成。2022-01-21 11:49:21.342 xcodebuild[96868:1671553] [MT] IDETestOperationsObserverDebug:0.000 秒,+0.000 秒——开始 2022-01-21 11:49:21.342 xcodebuild[96868:1671553] [MT] IDETestOperationsODebugbserver :0.294 秒,+0.294 秒——结束测试会话结果、代码覆盖率和日志:/Users/rishi/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2022.01.21_11-49-21-+0530.xcresult 测试失败:WebDriverAgentRunner:WebDriverAgentRunner-Runner.app 遇到错误(无法与测试运行程序建立通信。(基础错误:无法连接到 dfb994683be4aa90965d0836323ad4e7c0d04514 上的测试管理器。(基础错误:服务无效。)))** 测试执行失败 ** 在“Rishi Khanna 的 iPad”上开始测试. 确保你按照教程在 (基本错误:无法连接到 dfb994683be4aa90965d0836323ad4e7c0d04514 上的测试管理器。(基本错误:服务无效。)))**测试执行失败**测试在“Rishi Khanna 的 iPad”上开始。确保你按照教程在 (基本错误:无法连接到 dfb994683be4aa90965d0836323ad4e7c0d04514 上的测试管理器。(基本错误:服务无效。)))**测试执行失败**测试在“Rishi Khanna 的 iPad”上开始。确保你按照教程在https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. 如果已安装 WebDriverAgentRunner 应用程序,请尝试从设备中删除它并重新启动设备。构建信息:版本:'4.1.0',修订:'87802e897b' 系统信息:主机:'192.168.1.3',ip:'fe80:0:0:0:10e1:8403:814d:ca22%en0',os .name:'Mac OS X',os.arch:'x86_64',os.version:'10.16',java.version:'1.8.0_221' 驱动程序信息:io.appium.java_client.ios.IOSDriver 命令:[null , newSession {capabilities=[{appium:autoAcceptAlerts=true, appium:bundleId=com.salido.ios.v2.staging.PointOfSale, appium:deviceName=iPad Pro (12.9-inch, 2nd generation) (Model A1670), appium: newCommandTimeout=500, appium:noReset=true, platformName=iOS, appium:platformVersion=15.0, appium:toggleSoftwareKeyboard=true, appium:udid=dfb994683be4aa90965d0836323ad4e7c0d04514, appium:useNewWDA=true, appium:desiredCapabilities=Capabilities {autoAcceptAlerts: true, bundleId: com.xxx, deviceName: iPad Pro (12.9-inch, 2nd g..., newCommandTimeout: 500, noReset: true, platformName: iOS, platformVersion: 15.0, toggleSoftwareKeyboard: true, udid : xxx..., useNewWDA: true, usePrebuiltWDA: true, wdaLocalPort: 37001, xcodeOrgId:, xcodeSigningId: iPhone Developer}}] 功能{}

4

1 回答 1

0

更新到 xcode 13.2.1 解决了这个问题。

于 2022-02-08T12:45:43.767 回答