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

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
Output ->
=== 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 **

Related

jenkins provisioning profile issue

Check dependencies
No iOS profile matching 'Nitin xxxxxxx/xyzCAppStore' found: Xcode couldn't find a profile matching 'Nitin xxxxxxx/xyzCAppStore'. 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 'Application' in SDK 'iOS 10.3'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Build step 'Xcode' marked build as failure
Finished: FAILURE
have tried below things
http://code-dojo.blogspot.in/2012/09/fix-ios-code-signing-issue-when-using.html
https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin
I have solved same problem by following steps
Switch to your Jenkin Account [Login to your Jenkins Account]
Install all required certificates and provisioning in keychain in Jenkin-Account
Jenkins/Home/workspace or may be different on your Mac [you need to locate the workspace] go to this location.
You will find the Xcode project which is created by Jenkin local server-- Open this Xcode project -- set provisioning and certificates
close the project
open localhost:8080 build your project from Jenkin
jenkins provisioning profile issue will be solved

Import .ProvisionProfile when using Circle.CI and FastLane

For my personal project, I am using Circle.ci to test and deploy the OSX application (with upload hook to S3, to distribute it outside the AppStore - using the signed with Developer ID distribution method). I am using FastLane to build the app, which works flawlessly when building it from my local terminal, but I cannot get past code signing step when using the CI server.
The issue is very simple, the keychain does not import the provision profile, which I can tell from the pre-build step:
1 key imported.
No provisioning profiles found in repository.
You must add a provisioning profile to your repository
to enable CircleCI code-signing support.
Currently installed Code-Signing identities:
Policy: Code Signing
Matching identities
0 identities found
Valid identities only
0 valid identities found
I have my .p12 with private key and certificate uploaded to the repository, no issue there. I have also added the .provisionprofile to the repository (root, even different locations) but to no avail. The documentation states (https://circleci.com/docs/ios-code-signing/) that there is a need for .mobileprovision, but that only covers the iOS, not the OSX, while the system should be nearly identical so I assumed that would work as well.
So the TLDR question is: How do I import the provisioning profile of the OSX distribution on the Circle.CI, so the keychain accepts the entry? Or is there a way around it - like skipping the signing step (disabling it in XCode) and signing it by hand with some .sh?
Thanks everyone!
I am sharing my experience of deploying iOS app to Testflight using CircleCI. Maybe this helps.
Put the provision profile file in the root of your project directory. Make sure it is a normal "Distribution Profile" not a App Store submission profile.
Just add the .p12 key in the project settings of CircleCI. Remove all other certificates / .p12 file from the repository.
I tried using fastlane to build and distribute the build but it was failing in CircleCI. I had these three steps in my Fastfile beta environment.
increment_build_number
gym(scheme: "myScheme”)
pilot
I changed that to just
increment_build_number
My Circle CI file
machine:
environment:
GYM_CODE_SIGNING_IDENTITY: "iPhone Distribution: Company Name (XXXXXX)"
xcode:
version: "8.0"
test:
override:
- set -o pipefail && xcodebuild -workspace 'my.xcworkspace' -scheme 'myscheme' clean build test -sdk iphonesimulator -destination 'id=AC291080-8EFE-4095-8C55-B1E952EFFC36' CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= PROVISIONING_PROFILE=
dependencies:
pre:
- gem update fastlane
deployment:
beta_distribution:
branch: master
commands:
- fastlane beta
- gym --scheme "myscheme" --workspace "my.xcworkspace" --export_method app-store --use_legacy_build_api false
- pilot upload

Why does `ionic run ios` error with "No matching provisioning profile found"?

My goal is to run my Ionic app on my iPhone.
I don't figure out what could be the reason explaining this exception:
myIonicApp$ sudo ionic run ios
Check dependencies
=== BUILD TARGET WealCome OF PROJECT WealCome WITH CONFIGURATION Debug ===
Check dependencies
Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “dabcc352-0b59-415a-bcd1-6f6ea1d1fbe6”, however, no such provisioning profile was found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
I have this build settings:
The organizer:
As Mik378 said on his comment the right destination path of the provisioning profiles seems to be /Library/MobileDevice so all you have to do is copy everything you need to that folder:
sudo cp -r ~/Library/MobileDevice/ /Library/MobileDevice/
Try going into Xcode preferences, into Accounts and clicking the refresh button at the bottom left of the dialog.

Xcode command line build fails with "Failed to read entitlements"

My Jenkins (continues integration server) is failing with the error:
error: Failed to read entitlements from '/var/folders/gp/fxfq69kd26j160s85g6vjy6h0000gr/T/yMWJTWS2AJ/Payload/app.com.app'
Full output:
The following build commands failed:
CompileC /Users/jenkins/Library/Developer/Xcode/DerivedData/App-doozayqorsxatsbzlunnptqszxax/Build/Intermediates/rara.build/Production-iphoneos/rara.build/Objects-normal/armv7/RRArtworkView.o
app/RRArtworkView.m normal armv7 objective-c
com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Poduct build
dir:
/Users/jenkins/Library/Developer/Xcode/DerivedData/app-doozayqorsxatsbzlunnptqszxax/Build/Products/Production-iphoneos
xcrun via /usr/bin/xcrun (xcrun) DEVELOPER_DIR = '/Developer' via
'/usr/share/xcode-select/xcode_dir_path' Database Key is:
PackageApplication_/Developer_iphoneos Cache version is '1'
Lookup resolved in
'/var/folders/gp/fxfq69kd26j160s85g6vjy6h0000gr/T/xcrun_db' :
'/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication'
error: Failed to read entitlements from
'/var/folders/gp/fxfq69kd26j160s85g6vjy6h0000gr/T/yMWJTWS2AJ/Payload/app.com.app'
Build "app" failed Build step 'Execute shell' marked build as failure
It build fine form the IDE and will install on the device.
System info:
Xcode v4.3.2
The rather cryptic message:
Failed to read entitlements[...]
Is cause by Xcode not archiving the app correctly, this is normally caused by:
Having "Skip Install" set to NO
Have header file (.h) copied to a public folder in the build phase
See the question:
Compile, Build or Archive problems with Xcode 4 (and dependancies)
For a detailed explanation of these issues.

xcodebuild - 'Code Sign error: Provisioning profile X can't be found'

Yet another code sign error.
I'm running command:
xcodebuild -project $DIR/myproject.xcodeproj -sdk iphoneos5.0 -alltargets
and my project.pbxproj
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Ryan"
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "/Users/ryan/12345678-9012-3456-7890-123456789012.mobileprovision";
with output
=== BUILD NATIVE TARGET myproject OF PROJECT myproject WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
[BEROR]Code Sign error: Provisioning profile '/Users/ryan/12345678-9012-3456-7890-123456789012.mobileprovision' can't be found
I can't find any guidance on how to do this. Ive tried putting the provision in ~/Library/MobileDevice/Provisioning Profiles and setting the profile field in project.pbxproj to just the profile ID
It is a requirement that I need to be configure this at the command line w/o Jenkins/Hudson
Provisioning file goes to ~/Library/MobileDevice/Provisioning Profiles and you you can select the provisioning profile like this:
xcodebuild PROVISIONING_PROFILE=12345678-9012-3456-7890-123456789012

Resources