5

I have problem executing automation on real iOS device system configuration: 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

-----Edit-------

After trying to sign WebDriverAgentRunner with my free developer account I get the following error in xcode

xCode error

Please assist.

Hezi Israeli
  • 389
  • 1
  • 2
  • 14
  • You can fix it as follows: [code signing certificate error in appium xcuitest](http://stackoverflow.com/questions/39646676/code-signing-certificate-error-in-appium-xcuitest/39730091#39730091) – WiLdErCs Nov 08 '16 at 22:08
  • Hi! Did you find the way to fix this problem? I'd appreciate it so much! – Nadia Castelli Feb 23 '17 at 20:11

4 Answers4

5
  1. Make sure you are signed in with developer account in Xcode.
  2. Navidate to the folder </path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
  3. Open the WebDriverAgent.xcodeproj project in Xcode.
  4. Change the bunlder identifier for WebDriverAgentLib, WebDriverAgentRunner from com.facebook.Webdriver** to your choice so you can sign it with your provisioning profile.
  5. Build the project for WebDriverAgentLib, WebDriverAgentRunner and IntegrationApp targets.
  6. On the terminal, navigate to </path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/ and run xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<device udid>' test
  7. Last line in the logs should read Listening on USB.
  8. Now run your appium scripts.
Aman Gupta
  • 71
  • 1
  • 10
0

Maybe your .ipa file is not developer signed. All application artefacts must be signed by developer identity in iOS for Appium to use it.

You need to pass Appium .ipa file that is signed with valid Developer identity.

0

Within the folder ~/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/there is an xcode project called 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

Now run the project on your device (I used a real device)

That is how I solved the issue when it occurred for me

JaysonP
  • 164
  • 1
  • 10
  • The only reason why I think this could occur is if you do not have access to the WebDriverAgent project within your own directory. Perhaps perform a `chmod` operation on it? – JaysonP Nov 09 '16 at 15:33
0

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

It says

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

Maybe it can help you, although I haven't tried it yet. But if you get any resolution, please share it here also.

Pang
  • 9,564
  • 146
  • 81
  • 122
Rohit
  • 3,314
  • 1
  • 13
  • 15