fastlane: Pilot, Xcode 8 and Automatic signing. ERROR ITMS-90161
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
It has been impossible to upload a build with Pilot, using Xcode 8 and automatic signing. It continuously says ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.***.*** [Payload/***.app] is invalid.
if I try using deliver, the same error message appears.
Things checked:
- When
gymcreates the build, it has the correct bundle id - When
gymcreates the build, it appears in the Xcode 8 organizer. If I upload through there, everything works
Complete output when running fastlane, including the stack trace and command used
[00:42:23]: Successfully exported and compressed dSYM file
[00:42:23]: Successfully exported and signed the ipa file:
[00:42:23]: /Users/polquintana/Xcode/***/***.ipa
[00:42:23]: -----------------------------------------------
[00:42:23]: --- Step: Switch to ios checkout_badge lane ---
[00:42:23]: -----------------------------------------------
[00:42:23]: Cruising over to lane 'ios checkout_badge' 🚖
[00:42:23]: Cruising back to lane 'ios beta' 🚘
[00:42:23]: -------------------
[00:42:23]: --- Step: pilot ---
[00:42:23]: -------------------
[00:42:23]: Login to iTunes Connect (***)
[00:42:32]: Login successful
[00:42:32]: Ready to upload new build to TestFlight (App: ***)...
[00:42:33]: Going to upload updated app to iTunes Connect
[00:42:33]: This might take a few minutes. Please don't interrupt the script.
[00:44:47]: [Transporter Error Output]: ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.***.*** [Payload/***.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."
[00:44:47]: Transporter transfer failed.
[00:44:47]:
[00:44:47]: ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.***.*** [Payload/***.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."
[00:44:47]: ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com com.***.*** [Payload/***.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."
Return status of iTunes Transporter was 1: ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.***.*** [Payload/***.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."
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
[00:44:47]: -------------------
[00:44:47]: --- Step: slack ---
[00:44:47]: -------------------
[00:44:50]: Successfully sent Slack notification
[00:44:50]: Variable Dump:
[00:44:50]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios beta", :IPA_OUTPUT_PATH=>"/Users/polquintana/Xcode/***/***.ipa", :DSYM_OUTPUT_PATH=>"/Users/polquintana/Xcode/***/***.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/polquintana/Library/Developer/Xcode/Archives/2016-09-20/*** 2016-09-20 00.40.57.xcarchive"}
[00:44:50]: Error uploading ipa file, for more information see above
+------+-------------------------------------+-------------+
| fastlane summary |
+------+-------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+-------------------------------------+-------------+
| 1 | Verifying required fastlane version | 0 |
| 2 | default_platform | 0 |
| 3 | Switch to ios custom_badge lane | 0 |
| 4 | badge | 5 |
| 5 | gym | 87 |
| 6 | Switch to ios checkout_badge lane | 0 |
| 7 | pilot | 144 |
| 8 | slack | 2 |
+------+-------------------------------------+-------------+
[00:44:50]: fastlane finished with errors
[!] Error uploading ipa file, for more information see above
Configuration Files
Please copy the complete content of your Fastfile and any other configuration files you use below:
Fastfile:
desc "Submit a new Beta Build to Apple TestFlight"
lane :beta do
ensure_git_branch
custom_badge
gym(scheme: "***", configuration: "Beta", use_legacy_build_api: true)
checkout_badge
pilot(app_identifier: "com.***.***", skip_submission: true, skip_waiting_for_build_processing: true)
slack(message: "Deployment to TestFlight finished.")
end
Environment
fastlane version (run fastlane -v): fastlane 1.103.0
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? no
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? rvm
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (8 by maintainers)
@poolqf Thank for following up. This isn’t on the roadmap with the most recent changes to Xcode. Thanks!
Moving to
matchfixed the issue, but would be interesting to have support for automatic signing. Is this on the roadmap?Sure ! What we do:
Automatic codesign is commited for development so the developers do not have to worry about it, only the PMs for delivery or the CI servers.
At the beggining of the Fastlane flow, we:
Switch to Manual codesign
To do that I have a simple function
NB : I suspect we could only replace Automatic with manual but this seems safer
Switch to Production Signing (if required)
By default Automatic codesign uses Development, so if my lanes requires it (totally depends on your setup)
I did not take time to factorize this yet 😃
Feel free to ask!
Nicolas
@KrauseFx the ideal solution for me would be to let Xcode do all the work, and not use match.
I feel like match is great when you are in an app that several people is developing. I don’t have experience using Xcode’s automatic signing on an app with multiple developers, maybe it also does all the work for you.
@nicolasbraun could you write about this solution somewhere?
@mangofever Thanks for reaching out. We don’t currently support automatic signing and this could be the source of your problem. Also, can you let me know the full input and output of your error? Thanks!
I’m experiencing this issue. I don’t use match and just set automatically manage signing. And it works uploading ipa file via organizer.
Still nothing works. Can’t upload using fastlane, but works using Organizer in Xcode. 😦
What we do is use eVar in xcode:
$PROFILE_UDID for the app https://i.imgur.com/huI88lS.png $PROFILE_UDID_EXT0 / EXT1 for the watch app and extension. https://i.imgur.com/UGhNU7l.png
We then run match 3 times and set the correct eVar fort each and 🚀 .
That said we have to do this because we have several bundle for internal development and for the release on our client’s account. I believe since Xcode8 can now use Profile name instead of UUID you could simple set the value to the profile name (which does not change when you update it)
Nicolas