Appium 错误 Xcode 找不到与“com.facebook.WebDriverAgentRunner”匹配的配置文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40484957/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Appium error Xcode couldn't find a provisioning profile matching 'com.facebook.WebDriverAgentRunner'
提问by Hezi Israeli
I have problem executing automation on real iOS device system configuration: appium 1.6.0 device iPhone 5c (ios 10.1) xCode 8.2
我在真正的 iOS 设备系统配置上执行自动化时遇到问题:appium 1.6.0 device iPhone 5c (ios 10.1) xCode 8.2
the exception is:
例外是:
[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)
In xCode it seems that when I tried to sign WebDriverAgentRunner it failed to create provisioning profile and No profiles for 'com.facebook.WebDriverAgentRunner' were found
在 xCode 中,当我尝试对 WebDriverAgentRunner 进行签名时,它似乎无法创建配置文件并且未找到“com.facebook.WebDriverAgentRunner”的配置文件
-----Edit-------
- - -编辑 - - - -
After trying to sign WebDriverAgentRunner with my free developer account I get the following error in xcode
尝试使用我的免费开发者帐户签署 WebDriverAgentRunner 后,我在 xcode 中收到以下错误
Please assist.
请协助。
采纳答案by crujzo
I am facing the same issue While signing "WebDriverAgentRunner" as it does not have any Target Application to select the corresponding field shows "None".
I found this link while searching for the solution:
https://github.com/appium/appium/issues/7086
我在签署“WebDriverAgentRunner”时面临同样的问题,因为它没有任何目标应用程序来选择相应的字段显示“无”。我在搜索解决方案时发现了这个链接:https:
//github.com/appium/appium/issues/7086
It says
它说
WebDriverAgent project has to be signed as well by the same developer signature as the main application under test.
WebDriverAgent 项目也必须由与被测主应用程序相同的开发人员签名进行签名。
Maybe it can help you, although I haven't tried it yet. But if you get any resolution, please share it here also.
也许它可以帮助你,虽然我还没有尝试过。但是,如果您得到任何解决方案,也请在此处分享。
回答by Aman Gupta
- Make sure you are signed in with developer account in Xcode.
- Navidate to the folder
</path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
- Open the
WebDriverAgent.xcodeproj
project in Xcode. - Change the bunlder identifier for
WebDriverAgentLib, WebDriverAgentRunner from com.facebook.Webdriver** to your choice
so you can sign it with your provisioning profile. - Build the project for WebDriverAgentLib, WebDriverAgentRunner and IntegrationApp targets.
- On the terminal, navigate to
</path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
and runxcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<device udid>' test
- Last line in the logs should read
Listening on USB
. - Now run your appium scripts.
- 确保您在 Xcode 中使用开发者帐户登录。
- 导航到文件夹
</path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
WebDriverAgent.xcodeproj
在 Xcode 中打开项目。- 更改 bunlder 标识符,
WebDriverAgentLib, WebDriverAgentRunner from com.facebook.Webdriver** to your choice
以便您可以使用您的配置文件对其进行签名。 - 为 WebDriverAgentLib、WebDriverAgentRunner 和 IntegrationApp 目标构建项目。
- 在终端上,导航到
</path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
并运行xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<device udid>' test
- 日志中的最后一行应为
Listening on USB
. - 现在运行你的 appium 脚本。
回答by Kristaps Me?avilks
Maybe your .ipa
file is not developer signed. All application artefacts must be signed by developer identity in iOS for Appium to use it.
也许您的.ipa
文件没有开发人员签名。所有应用程序工件都必须由 iOS 中的开发人员身份签名,Appium 才能使用它。
You need to pass Appium .ipa
file that is signed with valid Developer identity.
您需要传递.ipa
使用有效开发人员身份签名的Appium文件。
回答by JaysonP
Within the folder ~/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
there is an xcode project called WebDriverAgent.xcodeproj
在文件夹中~/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
有一个名为的 xcode 项目WebDriverAgent.xcodeproj
Open this and under project -> general
there are 2 targets you need to add your profile to. Add it to the Targets labels WebDriverAgentLib
and WebDriverAgentRunner
打开它,在下面project -> general
有 2 个目标,您需要将您的个人资料添加到其中。将其添加到目标标签WebDriverAgentLib
并WebDriverAgentRunner
Now run the project on your device (I used a real device)
现在在您的设备上运行该项目(我使用的是真实设备)
That is how I solved the issue when it occurred for me
这就是我解决问题时的方法