EAS Build: "requires a provisioning profile with the Push Notifications feature"

Getting the following error on EAS build for iOS, even though the provisioning profile includes the Push Notifications feature:

  • eas --version: eas-cli/0.23.0 darwin-x64 node-v14.17.3
    Build details
    This same project built successfully two months ago.
Creating Gymfile
Gymfile created
[stderr] RubyZip 3.0 is coming!
[stderr] **********************
[stderr] 
[stderr] The public API of some Rubyzip classes has been modernized to use named
[stderr] parameters for optional arguments. Please check your usage of the
[stderr] following classes:
[stderr]  * `Zip::File`
[stderr]  * `Zip::Entry`
[stderr]  * `Zip::InputStream`
[stderr]  * `Zip::OutputStream`
[stderr] 
[stderr] Please ensure that your Gemfiles and .gemspecs are suitably restrictive
[stderr] to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
[stderr] See https://github.com/rubyzip/rubyzip for details. The Changelog also
[stderr] lists other enhancements and bugfixes that have been implemented since
[stderr] version 2.3.0.
Successfully loaded '/Users/expo/workingdir/build/ios/Gymfile' 📄
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                  Detected Values from './Gymfile'                                                                   |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| suppress_xcode_output | true                                                                                                                                        |
| clean                 | false                                                                                                                                       |
| scheme                | NUMIS                                                                                                                                       |
| configuration         | ReleaseXd                                                                                                                                   |
| export_options        |                                                                                                                                             |
| export_xcargs         | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-3b88c425-4ba0-47fc-90b4-11bd4cef5f8b.keychain" |
| disable_xcpretty      | true                                                                                                                                        |
| buildlog_path         | /Users/expo/workingdir/logs                                                                                                                 |
| output_directory      | ./build                                                                                                                                     |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
Resolving Swift Package Manager dependencies...
$ xcodebuild -resolvePackageDependencies -workspace ./NUMIS.xcworkspace -scheme NUMIS -configuration ReleaseXd
▸ Command line invocation:
▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./NUMIS.xcworkspace -scheme NUMIS -configuration ReleaseXd
▸ User defaults from command line:
▸     IDEPackageSupportUseBuiltinSCM = YES
▸ resolved source packages:
$ xcodebuild -showBuildSettings -workspace ./NUMIS.xcworkspace -scheme NUMIS -configuration ReleaseXd
Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...
[stderr] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `1E69B2B5C060453787F9E9F1` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
Detected provisioning profile mapping: {:"tech.numi.shopkeeper.staging"=>"f8b4fa77-04c7-4fb5-ab4b-f83ca505408e"}
[stderr] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `1E69B2B5C060453787F9E9F1` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
Couldn't find specified configuration 'ReleaseXd'.
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                            Summary for gym 2.185.1                                                                                             |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| workspace                                                        | ./NUMIS.xcworkspace                                                                                                                         |
| scheme                                                           | NUMIS                                                                                                                                       |
| clean                                                            | false                                                                                                                                       |
| output_directory                                                 | ./build                                                                                                                                     |
| output_name                                                      | staging                                                                                                                                     |
| configuration                                                    | ReleaseXd                                                                                                                                   |
| silent                                                           | false                                                                                                                                       |
| skip_package_ipa                                                 | false                                                                                                                                       |
| skip_package_pkg                                                 | false                                                                                                                                       |
| export_options.method                                            | ad-hoc                                                                                                                                      |
| export_options.provisioningProfiles.tech.numi.shopkeeper.staging | f8b4fa77-04c7-4fb5-ab4b-f83ca505408e                                                                                                        |
| export_xcargs                                                    | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-3b88c425-4ba0-47fc-90b4-11bd4cef5f8b.keychain" |
| build_path                                                       | /Users/expo/Library/Developer/Xcode/Archives/2021-08-23                                                                                     |
| result_bundle                                                    | false                                                                                                                                       |
| buildlog_path                                                    | /Users/expo/workingdir/logs                                                                                                                 |
| destination                                                      | generic/platform=iOS                                                                                                                        |
| suppress_xcode_output                                            | true                                                                                                                                        |
| disable_xcpretty                                                 | true                                                                                                                                        |
| skip_profile_detection                                           | false                                                                                                                                       |
| skip_package_dependencies_resolution                             | false                                                                                                                                       |
| disable_package_automatic_updates                                | false                                                                                                                                       |
| use_system_scm                                                   | false                                                                                                                                       |
| xcode_path                                                       | /Applications/Xcode.app                                                                                                                     |
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
$ set -o pipefail && xcodebuild -workspace ./NUMIS.xcworkspace -scheme NUMIS -configuration ReleaseXd -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2021-08-23/staging\ 2021-08-23\ 12.43.51.xcarchive archive | tee /Users/expo/workingdir/logs/staging-NUMIS.log > /dev/null

❌  error: "NUMIS" requires a provisioning profile with the Push Notifications feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'NUMIS' from project 'NUMIS')

▸ ** ARCHIVE FAILED **
** ARCHIVE FAILED **
Exit status: 65
+-------------+-------------------------+
|           Build environment           |
+-------------+-------------------------+
| xcode_path  | /Applications/Xcode.app |
| gym_version | 2.185.1                 |
| sdk         | iPhoneOS14.5.sdk        |
+-------------+-------------------------+
Looks like fastlane ran into a build/archive error with your project
It's hard to tell what's causing the error, so we wrote some guides on how
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
Before submitting an issue on GitHub, please follow the guide above and make
sure your project is set up correctly.
fastlane uses `xcodebuild` commands to generate your binary, you can see the
the full commands printed out in yellow in the above log.
Make sure to inspect the output above, as usually you'll find more error information there
[stderr] [!] Error building the application - see the log above
Error: Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.

Hi- sorry about this, that’s really weird if it’s throwing that error if your provisioning profile already defines push notifications as a capability

How did you determine that capability was already present? You should be able to go here in Apple’s UI, and look for the profile that is associated with this app (shown here in your EAS credentials UI), click it, and see “Push notifications” under “Enabled Capabilities”

Thanks @charliecruzan for the quick response.

This was one of the things I checked before posting. Here’s what the Provisioning profile looks like for the Ad Hoc Credentials which we’re using to build iOS:
Note the Push Notifications under “Enabled Capabilities”

@fiberjw mentioned that this could be related to issues with the Apple developer API that have been affecting fastlane builds? I don’t see any errors like the above in this issue though.

And the ID of that provisioning profile matches the one in your Expo dashboard for the internal distribution build?

You may want to try regenerating a new provisioning profile, just to see if that’s a quick fix

The provisioning profile ID in the Expo dashboard for the Ad Hoc provisioning profile matches the ID in the Apple dashboard for the ad hoc provisioning profile.

The UUID for the provisioning profile in the EAS build logs matches the UUID for the provisioning profile on the Expo dashboard. That profile’s Apple Developer Portal ID matches the ID for the Provisioning Profile in the Apple Developer portal.

Just tried with a fresh provisioning profile and it still failed.
Update: it works with the App Store build, which uses a different bundle identifier. But it doesn’t work with our ad hoc build.

Hm, that’s odd. Also according to your project setup, there is currently no Apple Provisioning Profile set for the ad hoc build

Looks like it got clobbered as I was trying to reset the profile. I’ve since done another build with a new provisioning profile that has push notifs enabled. Seeing the same errors here.

Are you letting EAS handle the creation of the profile?

Yes, here is the output for EXPO_APP_STORE_DEBUG=1 eas build -p ios --profile releaseXd

✔ Using remote iOS credentials (Expo server)

If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them.
This is optional, but without Apple account access you will need to provide all the values manually and we can only run minimal validation on them.
✔ Do you want to log in to your Apple account? … yes

› Log in to your Apple Developer account to continue
✔ Apple ID: … XXXX@XXXX.XXXX
› Restoring session /XXXXX/cookie
POST https://developer.apple.com/services-account/XXXX/account/listTeams.action
200 OK (POST https://developer.apple.com/services-account/XXXX/account/listTeams.action)
› Team Numi Inc. (XXXX)
GET https://appstoreconnect.apple.com/olympus/v1/session
200 OK (GET https://appstoreconnect.apple.com/olympus/v1/session)
› Provider Numi Inc. (XXXX)
✔ Logged in Local session
POST https://developer.apple.com/services-account/XXXX/account/listTeams.action
200 OK (POST https://developer.apple.com/services-account/XXXX/account/listTeams.action)
⠋ Linking bundle identifier tech.numi.shopkeeper.stagingPOST https://developer.apple.com/services-account/v1/bundleIds
⠸ Linking bundle identifier tech.numi.shopkeeper.staging200 OK (POST https://developer.apple.com/services-account/v1/bundleIds)
✔ Bundle identifier registered tech.numi.shopkeeper.staging
⠋ Syncing capabilitiesPOST https://developer.apple.com/services-account/v1/bundleIds/XXXX/bundleIdCapabilities
⠹ Syncing capabilities200 OK (POST https://developer.apple.com/services-account/v1/bundleIds/XXXX/bundleIdCapabilities)
✔ Synced capabilities: No updates
✔ Synced capability identifiers: No updates
⠋ Fetching Apple distribution certificatesPOST https://developer.apple.com/services-account/v1/certificates
⠙ Fetching Apple distribution certificates200 OK (POST https://developer.apple.com/services-account/v1/certificates)
✔ Fetched Apple distribution certificates
⠋ Fetching Apple provisioning profilesPOST https://developer.apple.com/services-account/v1/bundleIds
⠹ Fetching Apple provisioning profiles200 OK (POST https://developer.apple.com/services-account/v1/bundleIds)
POST https://developer.apple.com/services-account/v1/bundleIds/XXXX/profiles
⠴ Fetching Apple provisioning profiles200 OK (POST https://developer.apple.com/services-account/v1/bundleIds/XXXX/profiles)
POST https://developer.apple.com/services-account/v1/profiles/XXXX/bundleId
POST https://developer.apple.com/services-account/v1/profiles/XXXX/bundleId
⠧ Fetching Apple provisioning profiles200 OK (POST https://developer.apple.com/services-account/v1/profiles/XXXX/bundleId)
200 OK (POST https://developer.apple.com/services-account/v1/profiles/XXXX/bundleId)
POST https://developer.apple.com/services-account/v1/profiles/XXXX/certificates
⠙ Fetching Apple provisioning profiles200 OK (POST https://developer.apple.com/services-account/v1/profiles/XXXX/certificates)
✔ Fetched Apple provisioning profiles
✔ All your registered devices are present in the Provisioning Profile. Would you like to reuse it? … yes

Project Credentials Configuration:
  Project: @numi-hq/shopkeeper-mobile
  Bundle Identifier: tech.numi.shopkeeper.staging
  Configuration: Ad Hoc

  Distribution Certificate:
    Serial Number: 435D...A6B
    Expiration Date: Fri, 03 Jun 2022 17:31:30 EDT
    Apple Team: XXXX (Numi Inc. (Company/Organization))
    Updated 2 months ago

  Provisioning Profile:
    Developer Portal ID: XXXX
    Status: active
    Expiration Date: Fri, 03 Jun 2022 17:31:30 EDT
    Apple Team: XXXX (Numi Inc. (Company/Organization))
    Provisioned devices:
...
    Updated 4 hours ago

All credentials are ready to build @numi-hq/shopkeeper-mobile (tech.numi.shopkeeper.staging)

✔ Push Notifications setup for shopkeeper-mobile:tech.numi.shopkeeper.staging
✔ Uploaded to EAS 6s

@charliecruzan does the above output help at all?

Yes thanks, it’s just suspicious to me that your credentials dashboard doesn’t show any provisioning profile associated with your ad hoc build. Seems like that could very possibly be related to your error. I’m going to ask someone who’s a bit more familiar with our credentials backend to chime in

Do release builds work @agreeahmednumi , so the only issue is with your ad hoc client?

It’s only an issue with the ad hoc client.
You can see that we’ve got a provisioning profile set up for the ad hoc client here:

See the latest failed build for the ad hoc client here

Ah I was looking at the wrong bundle ID, sorry about that

Hey @charliecruzan any updates on this?

We’re looking into it- the person most familiar with this is on holiday but they’ll be back soon :slight_smile:

While looking at similar issue (EAS Build - “requires a provisioning profile with the Push Notifications feature” on enterprise build) that linked to this one I noticed that you both had incorrect build configuration, maybe try changing that and rebuilding, managed project has only Release and Debug configurations and you are using ReleaseXd

1 Like

@wkozyra can you explain what you mean by build configurations?
Would this be a change to eas.json, app.config.js, or something else?

xcode build configuration - by default xcode projects have 2 Debug and Release
you can select which you want to build in eas.json via buiildConfiguration field Configuring EAS Build with eas.json - Expo Documentation

but you should not use that field at all in manged project, for release build you do not need to set anything and for debug builds there is a developmentClient field Configuring EAS Build with eas.json - Expo Documentation

1 Like