xcodebuild 退出并显示代码“65”和信号“null”

问题描述 投票:0回答:2

您好,我在启动 ios 真实设备进行测试时遇到问题。

我的Xcode版本:11.2.1(11B500) Appium版本:1.13.0(1.13.0.20190505.6)

这些是我的能力:

    deviceSerialNumber:         F71SVVQ2HG7F
[Xcode]         identifier:                 bfda036179b938524f01eff8c673de3388a07fcc
[Xcode]         deviceClass:                iPhone
[Xcode]         deviceName:                 iPhone 7
[Xcode]         deviceIdentifier:           bfda036179b938524f01eff8c673de3388a07fcc
[Xcode]         productVersion:             13.1.1
[Xcode]         buildVersion:               17A854
[Xcode]         deviceSoftwareVersion:      13.1.1 (17A854)
[Xcode]         deviceArchitecture:         arm64
[Xcode]         deviceTotalCapacity:        26495004672
[Xcode]         deviceAvailableCapacity:    9949319168
[Xcode]         deviceIsTransient:          NO
[Xcode]         ignored:                    NO
[Xcode]         deviceIsBusy:               NO
[Xcode]         deviceIsPaired:             YES
[Xcode]         deviceIsActivated:          YES
[Xcode]         deviceActivationState:      Activated
[Xcode]         isPasscodeLocked:           NO
[Xcode]         deviceType:                 
[Xcode]         supportedDeviceFamilies:    (
[Xcode]     1
[Xcode] )
[Xcode]         applications:              (null)
[Xcode]         provisioningProfiles:      (null)
[Xcode]         hasInternalSupport:        NO
[Xcode]         hasWritableSystem:         NO
[Xcode]         isSupportedOS:             YES
[Xcode]         bootArgs:                  (null)
[Xcode]         nextBootArgs:              (null)
[Xcode]         connected:                 YES
[Xcode]         isWirelessEnabled:         NO
[Xcode]         connectionType:            direct
[Xcode]         hostname:                  iPhone-7.local.
[Xcode]         bonjourServiceName:        d0:c5:f3:d7:01:46@fe80::d2c5:f3ff:fed7:146._apple-mobdev2._tcp.local.
[Xcode]         activeProxiedDevice:       (null)
[Xcode]         } (13.1.1 (17A854))

这表示 xcode 需要配置文件,而我已经在 xode 中设置了证书和配置文件...

[Xcode] Testing failed:
[Xcode]     "WebDriverAgentRunner" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor.
[Xcode]     No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "BNL4VQ2576" with a private key was found.
[Xcode]     WebDriverAgentRunner:
[Xcode]         WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))




[Xcode] ** TEST EXECUTE FAILED **
[Xcode] 
[Xcode] 
[Xcode] Testing started on 'iPhone 7'
[Xcode] 
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.*bfda036179b938524f01eff8c673de3388a07fcc, iproxy 8100' for the device bfda036179b938524f01eff8c673de3388a07fcc...
[XCUITest] 'pgrep -nif xcodebuild.*bfda036179b938524f01eff8c673de3388a07fcc' didn't detect any matching processes. Return code: 1

这表示该文件夹不存在。我手动打开该目录,里面没有文件夹。我不知道如何获取该文件夹。

[Xcode] 2019-11-22 16:17:12.722 xcodebuild[37042:259128] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/ahmsam/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fdfc6b5e4c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
selenium applet appium xcuitest
2个回答
0
投票
  1. 您需要按照文档中的完整手动配置来设置 WDA (如果您跳过任何步骤,WDA 将不起作用)
  2. 使用您添加的自定义标识符更新产品捆绑包标识符
    com.companyName.WebDriverAgentRunner
  3. 在 Xcode 中从
    /path/where/installed/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
    打开 WebDriverAgent.xcodeproj
  4. 项目 -> 构建

0
投票

就我而言,我在appium 2.0,xcode 14中修复了这个问题

  • 关闭所有 xcode 项目并重新启动 WDA 并重建
  • 使用 >> appium --allow-cors 启动 appium
  • 在 Appium 检查器集中: 远程主机 - 0.0.0.0 远程端口 - 4723 和远程路径 - /(仅 /) 签入允许未经授权的证书
    并增加了功能 “appium:路径”:“/”, “showXcodeLog”:true

我希望这会起作用。

© www.soinside.com 2019 - 2024. All rights reserved.