Appium 错误 Xcode 找不到匹配 'com.facebook.WebDriverAgentRunner' 的配置文件

Appium error Xcode couldn't find a provisioning profile matching 'com.facebook.WebDriverAgentRunner'

我在真实 iOS 设备上执行自动化时遇到问题 系统配置: appium 1.6.0 设备 iPhone 5c (ios 10.1) xCode8.2

例外情况是:

[Xcode] 
Testing failed:
    No profiles for 'com.facebook.WebDriverAgentRunner' were found:  Xcode couldn't find a provisioning profile matching 'com.facebook.WebDriverAgentRunner'.
    Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.1'
** TEST FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

[XCUITest] xcodebuild exited with code '65' and signal 'null'
[XCUITest] Error: xcodebuild failed with code 65
    at SubProcess.<anonymous> (lib/webdriveragent.js:294:25)
    at emitTwo (events.js:106:13)
    at SubProcess.emit (events.js:191:7)
    at ChildProcess.<anonymous> (lib/teen_process.js:191:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
 Error: xcodebuild failed with code 65
    at SubProcess.<anonymous> (lib/webdriveragent.js:294:25)
    at emitTwo (events.js:106:13)
    at SubProcess.emit (events.js:191:7)
    at ChildProcess.<anonymous> (lib/teen_process.js:191:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[debug] [XCUITest] Running ios real device reset flow
[debug] [XCUITest] Resetting simulator
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65
    at SubProcess.<anonymous> (lib/webdriveragent.js:294:25)
    at emitTwo (events.js:106:13)
    at SubProcess.emit (events.js:191:7)
    at ChildProcess.<anonymous> (lib/teen_process.js:191:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

在 xCode 中,当我尝试签署 WebDriverAgentRunner 时,它似乎无法创建配置文件并且 找不到 'com.facebook.WebDriverAgentRunner' 的配置文件

-----编辑------

尝试使用我的免费开发者帐户签署 WebDriverAgentRunner 后,我得到 xcode

中出现以下错误

请协助。

可能您的 .ipa 文件没有开发人员签名。所有应用程序工件都必须由 iOS 中的开发人员身份签名,Appium 才能使用它。

您需要传递使用有效开发者身份签名的 Appium .ipa 文件。

文件夹 ~/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/ 中有一个名为 WebDriverAgent.xcodeproj

的 xcode 项目

打开它,在 project -> general 下有 2 个目标需要添加您的个人资料。将其添加到目标标签 WebDriverAgentLibWebDriverAgentRunner

现在运行您设备上的项目(我使用的是真实设备)

当我遇到问题时,我就是这样解决的

我在签署 "WebDriverAgentRunner" 时面临同样的问题,因为它没有任何针对 select 的目标应用程序,相应的字段显示 "None"。 我在搜索解决方案时发现了这个 link:
https://github.com/appium/appium/issues/7086

它说

WebDriverAgent project has to be signed as well by the same developer signature as the main application under test.

也许它可以帮助你,虽然我还没有尝试过。但是,如果您有任何解决方案,也请在这里分享。

  1. 确保您已在 Xcode.
  2. 中使用开发者帐户登录
  3. 导航到文件夹 </path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
  4. 打开 Xcode 中的 WebDriverAgent.xcodeproj 项目。
  5. 更改 WebDriverAgentLib, WebDriverAgentRunner from com.facebook.Webdriver** to your choice 的 bunlder 标识符,以便您可以使用您的配置文件对其进行签名。
  6. 为 WebDriverAgentLib、WebDriverAgentRunner 和 IntegrationApp 目标构建项目。
  7. 在终端上,导航至 </path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/ 和 运行 xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<device udid>' test
  8. 日志中的最后一行应显示为 Listening on USB
  9. 现在 运行 你的 appium 脚本。