EAS Build - “requires a provisioning profile with the Push Notifications feature” on enterprise build

I know this issue is almost identical to this. I just want to share my issue in case I have overlooked something.

Basically, I’m getting the following error on EAS build for iOS when using an enterprise provisioning profile (in-house) even though the provisioning profile includes the Push Notifications feature:

Build details

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                | ConsumerApp                                                                                                                                 |
| configuration         | debug                                                                                                                                       |
| export_options        |                                                                                                                                             |
| export_xcargs         | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-6b472823-67ae-4220-990b-f3cb86d22486.keychain" |
| disable_xcpretty      | true                                                                                                                                        |
| buildlog_path         | /Users/expo/workingdir/logs                                                                                                                 |
| output_directory      | ./build                                                                                                                                     |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
Resolving Swift Package Manager dependencies...
$ xcodebuild -resolvePackageDependencies -workspace ./ConsumerApp.xcworkspace -scheme ConsumerApp -configuration debug
▸ Command line invocation:
▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./ConsumerApp.xcworkspace -scheme ConsumerApp -configuration debug
▸ User defaults from command line:
▸     IDEPackageSupportUseBuiltinSCM = YES
▸ resolved source packages:
$ xcodebuild -showBuildSettings -workspace ./ConsumerApp.xcworkspace -scheme ConsumerApp -configuration debug
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. `7517054655EA4CB6842268D3` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
Detected provisioning profile mapping: {:"com.convatec.ConsumerApp"=>"7343f14f-ecb9-49a8-a662-44f978003e18"}
[stderr] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `7517054655EA4CB6842268D3` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
Couldn't find specified configuration 'debug'.
+--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                          Summary for gym 2.193.1                                                                                           |
+--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| workspace                                                    | ./ConsumerApp.xcworkspace                                                                                                                   |
| scheme                                                       | ConsumerApp                                                                                                                                 |
| clean                                                        | false                                                                                                                                       |
| output_directory                                             | ./build                                                                                                                                     |
| output_name                                                  | ConsumerApp                                                                                                                                 |
| configuration                                                | debug                                                                                                                                       |
| silent                                                       | false                                                                                                                                       |
| skip_package_ipa                                             | false                                                                                                                                       |
| skip_package_pkg                                             | false                                                                                                                                       |
| export_options.method                                        | enterprise                                                                                                                                  |
| export_options.provisioningProfiles.com.convatec.ConsumerApp | 7343f14f-ecb9-49a8-a662-44f978003e18                                                                                                        |
| export_xcargs                                                | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-6b472823-67ae-4220-990b-f3cb86d22486.keychain" |
| build_path                                                   | /Users/expo/Library/Developer/Xcode/Archives/2021-09-08                                                                                     |
| 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 ./ConsumerApp.xcworkspace -scheme ConsumerApp -configuration debug -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2021-09-08/ConsumerApp\ 2021-09-08\ 07.38.52.xcarchive archive | tee /Users/expo/workingdir/logs/ConsumerApp-ConsumerApp.log > /dev/null

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

▸ ** ARCHIVE FAILED **
** ARCHIVE FAILED **
Exit status: 65
+-------------+-------------------------+
|           Build environment           |
+-------------+-------------------------+
| xcode_path  | /Applications/Xcode.app |
| gym_version | 2.193.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.

It’s shouldn’t be that issue but both you and post you linked to have incorrect buildConfiguration setup, you have debug and it should be Debug, maybe try changing that and rebuilding

@wkozyra thanks so much! This solved the issue for me and the build completed - what a misleading error message.

Build details:

I agree, although it does have this buried in the output:

@wodin you’re right, it was right there :man_facepalming:

I still agree that the error is misleading :slight_smile: