Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Error with "Invalid Provisioning Profile" #47

Closed
AndreyNikiforov opened this issue Dec 23, 2015 · 10 comments
Closed

Error with "Invalid Provisioning Profile" #47

AndreyNikiforov opened this issue Dec 23, 2015 · 10 comments
Labels

Comments

@AndreyNikiforov
Copy link

match 0.1.2. Steps:

on dev machine: match nuke, then match development
on circleci: match development, then gym, then pitot

log from CI server for match:
+----------------+----------------------------------------------------+
| Summary for match 0.1.2 |
+----------------+----------------------------------------------------+
| git_url | git+ssh://git@github.com/my2bytes/certificates.git |
| type | development |
| app_identifier | com.My2Bytes.ShoppingApp.Demo |
| username | build@my2bytes.com |
| keychain_name | login.keychain |
| readonly | true |
| verbose | true |
| force | false |
+----------------+----------------------------------------------------+

INFO [2015-12-22 20:56:18.10]: Cloning remote git repo...
INFO [2015-12-22 20:56:18.10]: $ git clone 'git+ssh://git@github.com/my2bytes/certificates.git' '/var/folders/jm/fw86rxds0xn69sk40d18y69m0000gp/T/d20151222-4072-1bzxo1c' --depth 1
INFO [2015-12-22 20:56:18.10]: > Cloning into '/var/folders/jm/fw86rxds0xn69sk40d18y69m0000gp/T/d20151222-4072-1bzxo1c'...
INFO [2015-12-22 20:56:18.49]: > remote: Counting objects: 17, done.
INFO [2015-12-22 20:56:18.49]: > remote: Compressing objects: 100% (17/17), done.
INFO [2015-12-22 20:56:18.53]: > remote: Total 17 (delta 0), reused 16 (delta 0), pack-reused 0
INFO [2015-12-22 20:56:18.53]: > Receiving objects: 100% (17/17), 38.62 KiB | 0 bytes/s, done.
INFO [2015-12-22 20:56:18.61]: > Checking connectivity... done.
INFO [2015-12-22 20:56:18.63]: 🔓 Decrypted 'NZL65R46D5.cer'
INFO [2015-12-22 20:56:18.63]: 🔓 Decrypted 'CMVR7EK86M.cer'
INFO [2015-12-22 20:56:18.64]: 🔓 Decrypted 'NZL65R46D5.p12'
INFO [2015-12-22 20:56:18.65]: 🔓 Decrypted 'CMVR7EK86M.p12'
INFO [2015-12-22 20:56:18.65]: 🔓 Decrypted 'AppStore_com.My2Bytes.ShoppingApp.Demo.mobileprovision'
INFO [2015-12-22 20:56:18.66]: 🔓 Decrypted 'AppStore_com.My2Bytes.ShoppingApp.CLIENT.QA.mobileprovision'
INFO [2015-12-22 20:56:18.67]: 🔓 Decrypted 'Development_com.My2Bytes.ShoppingApp.Demo.mobileprovision'
INFO [2015-12-22 20:56:18.67]: 🔓 Decrypted 'Development_com.My2Bytes.ShoppingApp.CLIENT.QA.mobileprovision'
INFO [2015-12-22 20:56:18.67]: 🔓 Successfully decrypted certificates repo
INFO [2015-12-22 20:56:18.68]: Installing certificate...
INFO [2015-12-22 20:56:18.71]: $ security import /var/folders/jm/fw86rxds0xn69sk40d18y69m0000gp/T/d20151222-4072-1bzxo1c/certs/development/NZL65R46D5.cer -k ~/Library/Keychains/login.keychain -T /usr/bin/codesign -T /usr/bin/security&> /dev/null
INFO [2015-12-22 20:56:18.74]: $ security import /var/folders/jm/fw86rxds0xn69sk40d18y69m0000gp/T/d20151222-4072-1bzxo1c/certs/development/NZL65R46D5.p12 -k ~/Library/Keychains/login.keychain -T /usr/bin/codesign -T /usr/bin/security&> /dev/null
INFO [2015-12-22 20:56:18.78]: Installing provisioning profile...
WARN [2015-12-22 20:56:18.92]: Setting environment variable 'sigh_com.My2Bytes.ShoppingApp.Demo_development' to '5e052cf1-1ec9-48a1-a1f0-f3f445b8d2b8'

+----------------------+------------------------------------------------+
| Installed Provisioning Profile |
+----------------------+------------------------------------------------+
| App Identifier | com.My2Bytes.ShoppingApp.Demo |
| Type | development |
| UUID | 5e052cf1-1ec9-48a1-a1f0-f3f445b8d2b8 |
| Environment Variable | sigh_com.My2Bytes.ShoppingApp.Demo_development |
+----------------------+------------------------------------------------+

error from pilot:
ErrorMessage = ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.My2Bytes.ShoppingApp.Demo [Payload/ShoppingApp.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal.

My understanding is that match should take care of signing certificate and provisioning profile. What am I missing and how can it be fixed?

@AndreyNikiforov
Copy link
Author

Upgraded match to 0.2.2 and got "No Password Supplied" error during "match nuke development". Suspect it is related to #42

Downgraded back to 0.1.2.

@AndreyNikiforov
Copy link
Author

Commented out "pilot" and left "hockey" & "crashlytics". Build was uploaded to hockeyapp & crashlytics successfully and devices are listed (on hockeyApp), so either provisioning profile was generated right OR hockey & crashlytics do not validate certificates/profiles the way testFlight does.

@MartinRogalla
Copy link

Having the same issue here. Really don't get what's going wrong.
edit: I fixed it, don't have access to the device atm, will update once I have access again.
Update: I was able to fix it by changing all the code signing identities in the project.pbxproj to "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";

Hope it will work for you too.

@KrauseFx
Copy link
Contributor

KrauseFx commented Jan 2, 2016

Thanks @MartinRogalla, does this fix the issue for you @AndreyNikiforov? Feel free to re-open the issue

@KrauseFx KrauseFx closed this as completed Jan 2, 2016
@AndreyNikiforov
Copy link
Author

@KrauseFx , I think I am missing something important. I assumed that "match" will take care of setting correct code signing identity and provisioning profile from repo.

"match" doc instructs to set provisioning profile in plist to env var, but there is nothing about changing code signing setting in pbxproj. How these settings have to adjusted when I need to "deliver" code to appstore?

@AndreyNikiforov
Copy link
Author

BTW @MartinRogalla suggested "iPhone Distribution" code signing identity, while screenshot in "match" guide shows "iPhone Development". List of available options in xcode shows Development and Distribution identities in my keychain that I have created with "match".

@KrauseFx
Copy link
Contributor

KrauseFx commented Jan 3, 2016

@AndreyNikiforov
Copy link
Author

@KrauseFx , I was following the guide you are giving a link to. It has setup instructions for Provisioning Profile, not Code Signing. Screen shot shows that Code Signing is set to "iPhone Development". I though "match" will set it to the Code Signing identity related to the identities generated by "match" (Development for "match development" and Distribution for "match appstore"). Please let me know what I am missing and better yet update the guide.

@AndreyNikiforov
Copy link
Author

I figured what I was missing. I tried to do one build and submit artifacts to HockeyApp/Crashlytics as well as TestFlight. That does not work (at least in full), because Crashlytics requires Code Signing for Development as well as Provisioning Profiles with a list of allowed devices, while TestFlight requires AppStore Code Signing (and Provisioning Profile without devices).

I can keep "Don't Sign" in xcode and match/gym takes care of using correct code signing, provisioning profile, and packaging.

@fastlanebot
Copy link

This issue was migrated to fastlane/fastlane#3447. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo 🚀

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants