No profiles for 'com.facebook.WebDriverAgentRunner' were found

Hey Everyone,

So I am trying to move my tests over to start using the new XCUITest Driver, when I follow the documentation to install the WebDriverAgentRunner I am having issues that appear to be related to the code signing. I have searched and not finding anyone with the same issue so far, so I am reaching out for a bit of guidance on what I am doing wrong.

I have followed all the steps in this document - https://github.com/appium/appium-xcuitest-driver/blob/master/README.md

It appears to be successful when I run this on a simulator, however when running this on a REAL device, it gives me issues.

This is the output when I run xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=ae69b635db6e40c3f7719eb8f81c24e200028564' test

=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
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.0'
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.0'
No profiles for 'com.facebook.WebDriverAgentRunner' were found:  Xcode couldn't find a provisioning profile matching 'com.facebook.WebDriverAgentRunner'.
2016-10-19 09:15:07.930 xcodebuild[98516:8284369] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/trent/Library/Developer/Xcode/DerivedData/WebDriverAgent-gvltwgknevnwclanwpylmjozekma/Logs/Test/880BC4BB-80AD-4D0B-8D9A-52368970AEB8/Session-WebDriverAgentRunner-2016-10-19_091503-rg0a32.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/trent/Library/Developer/Xcode/DerivedData/WebDriverAgent-gvltwgknevnwclanwpylmjozekma/Logs/Test/880BC4BB-80AD-4D0B-8D9A-52368970AEB8/Session-WebDriverAgentRunner-2016-10-19_091503-rg0a32.log}
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0'
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0'


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.0'
** TEST FAILED **

The step up procedure is mentioned at Xcodebuild failed with code 65 (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 32.63 seconds

Thanks for the link @pavanbachu
I tried the steps outlined in that but not having much luck still.

I am still getting the following error when running …

[Xcode] 
Testing failed:
        No profiles for 'com.facebook.WebDriverAgentRunner' were found:  Xcode couldn't find a provisioning profile matching 'com.facebook.WebDriverAgentRunner'.

[Xcode]         Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0'
** TEST FAILED **


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

[XCUITest] xcodebuild exited with code '0' and signal 'null'

Do you have a provisioning profile set for this?

@Mayuresh_Shirodkar Thats correct I do.

Try building the app through the Xcode 8 GUI, if it is successful.You shouldn’t be getting this error.

I have tried that actually and I was successful in building this in the XCode 8 GUI. So its really confusing why I am seeing this error when running this though CLI or thought Appium.

Open the Xcode project , try giving the developer account and push it into the device

@pavanbachu I was able to build the IntegrationApp and push it to the device thought XCode. However I am still not able to do it via my Appium script.

It seems like progress has been made but now when I run my appium tests this is what I am seeing …

[BaseDriver] The following capabilities were provided, but are not recognized by appium: xcodeConfigfile.
[BaseDriver] Session created with session id: 7477b82d-be38-4a85-9f4a-6699391d8c3c
[XCUITest] Determining device to run tests on: udid: 'ae69b635db6e40c3f7719eb8f81c24e200028564', real device: true
[BaseDriver] Using local app '/Users/trent/Documents/Stash/appium-master/native-functional-testing/bin/Dev5/LeadCapture-3.4-305.ipa'
[BaseDriver] Unzipped local app to '/var/folders/kl/qbnh6b_15jq_8_cq0szyl7mr0000gp/T/2016920-94500-fg07j9.2m5v8nz5mi/Payload/LeadCapture.app'
[XCUITest] Setting up real device
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Waiting for WebDriverAgent to start on device
[XCUITest] Unable to start WebDriverAgent: Error: spawn EACCES
[XCUITest] Unable to start WebDriverAgent: Error: spawn EACCES
[MJSONWP] Encountered internal error running command: undefined
[HTTP] <-- POST /wd/hub/session 500 2006 ms - 188

Can you share the capabilities that are passed and also share the complete appium log in form of link so that it is feasible to read.

Sure …

   def app = new File(System.getProperty("ios.app.binary"))
    def capabilities = new DesiredCapabilities()
    capabilities.setCapability("platformName","iOS")
    capabilities.setCapability("deviceName","iPad Air")
    capabilities.setCapability("platformVersion","10.0.2")
    capabilities.setCapability("app", app.getAbsolutePath())
    capabilities.setCapability("udid","ae69b635db6e40c3f7719eb8f81c24e200028564")
    capabilities.setCapability("automationName","XCUITest")
    capabilities.setCapability("realDeviceLogger","/usr/local/lib/node_modules/deviceconsole")
    capabilities.setCapability("noReset", true)
    capabilities.setCapability("xcodeConfigfile","/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/xcodeConfigFile.xcconfig")
    driver = { new IOSDriver(new URL("http://127.0.0.1:4725/wd/hub"), capabilities) }

And here are the Appium logs …

http://pastebin.com/vUATYBfR

Have you manually set the provisioning profile ?

Yes, I have. I have tried this on a few machines now as well and all are stuck at this same point. :frowning:

Dont do anything manually …

  1. Reinstall appium
  2. Point to WebDriver folder (Make sure the carthage is installed)
    mkdir -p Resources/WebDriverAgent.bundle
  3. Create Xcodeconfig file
  4. Give the Xcode Config file as the capability

Ok, I will give that a try @pavanbachu
One question, for Carthage. Should it install under?

/usr/local/lib/node_modules/appium-xcuitest-driver/Carthage

or

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage

I found that when I run

brew install carthage

That it only installs it under /usr/local/lib/node_modules/appium-xcuitest-driver/Carthage

Thx again

Just do a global install ; brew install -g carthage

So just had an opportunity to try this again. Removed Appium and reinstalled everything from scratch and it looks like I am no further ahead …

[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/Docum...
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium]   app: '/Users/Documents/Stash/appium-master/native-functional-testing/bin/Dev5/LC-3.4-308.ipa'
[Appium]   noReset: true
[Appium]   xcodeConfigfile: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/xcodeConfigFile.xcconfig'
[Appium]   realDeviceLogger: '/usr/local/lib/node_modules/deviceconsole'
[Appium]   platformVersion: '10.0.2'
[Appium]   automationName: 'XCUITest'
[Appium]   platformName: 'iOS'
[Appium]   udid: 'ae69b635db6e40c3f7719eb8f81c24e200028564'
[Appium]   deviceName: 'iPad Air'
[BaseDriver] The following capabilities were provided, but are not recognized by appium: xcodeConfigfile.
[BaseDriver] Session created with session id: dfdde451-eefa-415d-bdfa-20ec86e1b2ec
[XCUITest] Determining device to run tests on: udid: 'ae69b635db6e40c3f7719eb8f81c24e200028564', real device: true
[BaseDriver] Using local app '/Users/Documents/Stash/appium-master/native-functional-testing/bin/Dev5/LC-3.4-308.ipa'
[BaseDriver] Unzipped local app to '/var/folders/kl/qbnh6b_15jq_8_cq0szyl7mr0000gp/T/2016925-5966-i9xme3.knuii442t9/Payload/LC.app'
[XCUITest] Setting up real device
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Waiting for WebDriverAgent to start on device
[XCUITest] Unable to start WebDriverAgent: Error: spawn EACCES
[XCUITest] Unable to start WebDriverAgent: Error: spawn EACCES
[MJSONWP] Encountered internal error running command: undefined

However one thing I did notice that was interesting was this line …

[BaseDriver] The following capabilities were provided, but are not recognized by appium: xcodeConfigfile.

Its in my config as you can see and the path is accurate. Stumped

*** EDIT ***
Fixed my issue with the XCode Config File, looks like a minor case sensitivity issue. Not sure why it worked before but its fixed.
The same EACCES issue still exists however.

[XCUITest] Unable to start WebDriverAgent: Error: spawn EACCES
[MJSONWP] Encountered internal error running command: undefined

I have made a bit of progress now but seem to be having some code signing issues now.

Whats confusing about this is, if I run it though Appium and its failing …

[Xcode] 
Testing failed:
        No signing certificate "iOS Development" found:  No "iOS Development" signing certificate matching team ID "XXXXX" with a private key was found.
        Provisioning profile "YYYYY" belongs to team "XXXXX", which does not match the selected team "XXXXX".
        Code signing is required for product type 'Application' in SDK 'iOS 10.0'
** TEST FAILED **


The following build commands failed:
        Check dependencies
        Check dependencies
(2 failures)

[XCUITest] xcodebuild exited with code '0' and signal 'null'

Yet if I run this same config though the XCode CLI, it builds and runs …

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=ae69b635db6e40c3f7719eb8f81c24e200028564’ test

Test Suite 'All tests' started at 2016-10-25 15:28:15.377
Test Suite 'WebDriverAgentRunner.xctest' started at 2016-10-25 15:28:15.378
Test Suite 'UITestingUITests' started at 2016-10-25 15:28:15.379
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2016-10-25 15:28:15.381
    t =     0.00s     Set Up
2016-10-25 15:28:15.386584 XCTRunner[1188:1591893] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1700f2200> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only
2016-10-25 15:28:15.387788 XCTRunner[1188:1591879] Built at Oct 25 2016 15:28:05
2016-10-25 15:28:15.417059 XCTRunner[1188:1591879] ServerURLHere->http://192.168.1.114:8100<-ServerURLHere
2016-10-25 15:28:15.417757 XCTRunner[1188:1591879] Listening on USB

Hi Folks,

I am also getting same error "no profile matching ‘provisioning profile’ found: Xcode couldn’t find a profile matching “provisioning profile”, however I have created provisioning profile with the same account used to build the app. Can anyone help on this? following is the error trace:

[Appium] Welcome to Appium v1.6.0 (REV b134e1af00e0aa83f686e31c020c9b2b4ce53b18)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“iPhone 6s”,“udid”:“cfc28f7a68b714e7f0e188bbb802e5316b7643cb”,“app”:"/Users/nagarro/Desktop/Melody_app/home-owner-app.app",“autoWebview”:true,“realDeviceLogger”:"/usr/local/lib/node_modules/deviceconsole/deviceconsole",“sendKeyStrategy”:“setValue”,“newCommandTimeout”:9000,“platformVersion”:“10.0”,“platformName”:“iOS”,“automationName”:“XCUITest”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“iPhone 6s”,…
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] deviceName: ‘iPhone 6s’
[Appium] udid: ‘cfc28f7a68b714e7f0e188bbb802e5316b7643cb’
[Appium] app: ‘/Users/nagarro/Desktop/Melody_app/home-owner-app.app’
[Appium] autoWebview: true
[Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’
[Appium] sendKeyStrategy: ‘setValue’
[Appium] newCommandTimeout: 9000
[Appium] platformVersion: ‘10.0’
[Appium] platformName: ‘iOS’
[Appium] automationName: ‘XCUITest’
[debug] [XCUITest] XCUITestDriver version: 2.0.26
[BaseDriver] Session created with session id: e70a45bc-37ab-4ed0-a912-e35c7e0d03d3
[debug] [XCUITest] Xcode version set to ‘8.0’
[debug] [XCUITest] iOS SDK Version set to ‘10.0’
[debug] [XCUITest] Available devices: cfc28f7a68b714e7f0e188bbb802e5316b7643cb
[debug] [XCUITest] Creating iDevice object with udid cfc28f7a68b714e7f0e188bbb802e5316b7643cb
[XCUITest] Determining device to run tests on: udid: ‘cfc28f7a68b714e7f0e188bbb802e5316b7643cb’, real device: true
[BaseDriver] Using local app ‘/Users/nagarro/Desktop/Melody_app/home-owner-app.app’
[debug] [XCUITest] Checking whether app is actually present
[debug] [ios-app-utils] Getting bundle ID from app
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[XCUITest] Setting up real device
[debug] [XCUITest] Stdout from app isInstalled check: […] Waiting for iOS device to be connected
[…] Using iPhone 6s ‘iPhone 6s’ (cfc28f7a68b714e7f0e188bbb802e5316b7643cb).
true

[debug] [XCUITest] App is installed.
[debug] [XCUITest] Full reset not requested. No need to install.
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=cfc28f7a68b714e7f0e188bbb802e5316b7643cb’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/318A84BD-02C5-498E-805F-F9EAB25EFADF/Session-WebDriverAgentRunner-2016-10-28_085527-JH4uT8.log
[Xcode] 2016-10-28 08:55:32.583 xcodebuild[26587:405987] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/318A84BD-02C5-498E-805F-F9EAB25EFADF/Session-WebDriverAgentRunner-2016-10-28_085527-JH4uT8.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/318A84BD-02C5-498E-805F-F9EAB25EFADF/Session-WebDriverAgentRunner-2016-10-28_085527-JH4uT8.log}

[Xcode] No profile matching ‘MelodyTeamExamples’ found: Xcode couldn’t find a profile matching ‘MelodyTeamExamples’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor.

[Xcode] Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’

[Xcode] No profile matching ‘MelodyTeamExamples’ found: Xcode couldn’t find a profile matching ‘MelodyTeamExamples’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’
No profile matching ‘MelodyTeamExamples’ found: Xcode couldn’t find a profile matching ‘MelodyTeamExamples’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’

[Xcode] Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’

[Xcode]
Testing failed:

[Xcode] No profile matching ‘MelodyTeamExamples’ found: Xcode couldn’t find a profile matching ‘MelodyTeamExamples’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’
** TEST FAILED **

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

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[debug] [XCUITest] xcodebuild failure warrants retry. Retrying…
[XCUITest] Shutting down WebDriverAgent
[XCUITest] System log exited with code ‘null’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=cfc28f7a68b714e7f0e188bbb802e5316b7643cb’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/4342F2A0-7795-4EA1-B0B5-D869B55F0DE2/Session-WebDriverAgentRunner-2016-10-28_085539-4VouJP.log
[Xcode] 2016-10-28 08:55:44.619 xcodebuild[26827:406402] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/4342F2A0-7795-4EA1-B0B5-D869B55F0DE2/Session-WebDriverAgentRunner-2016-10-28_085539-4VouJP.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/4342F2A0-7795-4EA1-B0B5-D869B55F0DE2/Session-WebDriverAgentRunner-2016-10-28_085539-4VouJP.log}

[Xcode] No profile matching ‘MelodyTeamExamples’ found: Xcode couldn’t find a profile matching ‘MelodyTeamExamples’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor.

[Xcode] Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’

[Xcode] Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’

[Xcode]
Testing failed:

[Xcode] No profile matching ‘MelodyTeamExamples’ found: Xcode couldn’t find a profile matching ‘MelodyTeamExamples’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.0’
** 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. (lib/webdriveragent.js:294:25)
at emitTwo (events.js:87:13)
at SubProcess.emit (events.js:172:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
[Error: xcodebuild failed with code 65]
[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. (lib/webdriveragent.js:294:25)
at emitTwo (events.js:87:13)
at SubProcess.emit (events.js:172:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
[HTTP] <-- POST /wd/hub/session 500 25119 ms - 167

@arun.sharma Not sure if you saw this link or not, might be helpful based on the last error in your post.