iOS AutoProvision does not work for Provisioning Profile that requires Push Notifications capability

ios-auto-provision
#1

Bitrise Build Issue Report template

Description of the issue

All builds were working great until we added a new tester to the team that didn’t have his device added to the original provisioning profile. No other settings were changed and older builds have been rerun with the same settings pointing to the same place and failed now.

During the iOS Auto Provision step I’m using v1.3.1. For the Xcode-archive step I’m using v2.4.21.

In the iOS Auto Provision step if I set generate_profiles to no this error occurs:

Profile (iOS Team Inhouse Provisioning Profile: com.[bundleName]) distribution type: inhouse, should be: limited
Profile (iOS Team Provisioning Profile: com.[bundleName]) does not contain all the test devices
Missing devices:
[redacted]
[redacted]
Profile (XC: com.bose.*) distribution type: inhouse, should be: limited
Profile (XC Development WC) distribution type: inhouse, should be: limited
Profile (XC: *) distribution type: inhouse, should be: limited
Profile (iOS Team Provisioning Profile: *) does not contain every required services
Error:
Failed to find development Xcode managed provisioning profile for bundle id: com[bundleName].

Previously this step would print out:

[(iOS Team Inhouse Provisioning Profile: com.[bundleName]) distribution type: inhouse, should be: limitede
downloading development profile: iOS Team Provisioning Profile: com.[bundleName]
e[Profile path: /Users/vagrant/Library/MobileDevice/Provisioning Profiles/[redacted].mobileprovisione[0m
checking xcode managed enterprise profile for target: [RedactedName] (com.[bundleName]) with 2 services on developer portal

This step used to work, and all certifications and code signing docs have been uploaded and not changed.

If I set generate_profiles to yes then there is an error in the Xcode-archive step with this output:

Filtering CodeSignInfo groups for target capabilities
Filtering CodeSignInfo groups for export method
Export TeamID specified: [redacted], filtering CodeSignInfo groups...
App was signed with NON xcode managed profile when archiving,
only NOT xcode managed profiles are allowed to sign when exporting the archive.
Removing xcode managed CodeSignInfo groups
Entitlements filter - removes profile if has missing capabilities
Export method filter - removes profile if distribution type is not: enterprise
Entitlements filter - removes profile if has missing capabilities
Failed to find Codesign Groups
generated export options content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>method</key>
		<string>enterprise</string>
	</dict>
</plist> <nil>
[13:27:49] set -o pipefail && xcodebuild "-exportArchive" "-archivePath" "[redacted]" "-exportOptionsPlist" "/Users/vagrant/deploy/export_options.plist" | xcpretty
❌  error: exportArchive: "[RedactedName]" requires a provisioning profile with the Push Notifications feature.

What is interesting is I see that the UDID of the enterprise provisioning profile printed out in the bundle_id_profiles is not the same as the enterprise profile that was originally uploaded, so it seems like a new provisioning profile has been created, but somehow things aren’t working. I’m working with a client so I don’t have direct access to the Apple Developer Portal, so I can’t verify that they’ve been created.

So when generating profiles it seems like the profile I want to use is either not being added to the export options plist, or the new profile is not receiving the proper capabilities.

Environment:

If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)

Xcode 10.1.x stack.

Error occurs with ios-auto-provision@1.3.1 if generate_profiles is set to no.
Error occurs with xcode-archive@2.4.21 if generate_profiles is set to yes.

These errors only started occurring after a tester with a new device was added to the team.

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : March 15th, 2019.

Local reproduction

No, I do not possess the private keys for the code signing information being used so I can’t test locally.

Build log

Sent an email with log URLs.

0 Likes

iOS automatic provisioning does not use a profile with all devices included
closed #2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes