expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
767 stars 81 forks source link

Push Notifications Entitlement turned on even when selecting "no" #987

Closed hawekotte closed 2 years ago

hawekotte commented 2 years ago

Build/Submit details page URL

https://expo.dev/accounts/new-stockyard-group/projects/cattleid/builds/6b3f9ca1-27a7-480d-96b7-d4977abbbf59

Summary

When attempting to build a release version of our iOS app using EAS build we are met with a duo of fastlane errors:

error: Provisioning profile "<PROVISIONING_PROFILE>" doesn't support the Push Notifications capability

error: Provisioning profile "<PROVISIONING_PROFILE>" doesn't include the aps-environment entitlement

Managed or bare?

Managed

Environment

EAS CLI 0.47.0 environment info: System: OS: macOS Mojave 10.14.4 Shell: 3.2.57 - /bin/bash Binaries: Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm Utilities: Git: 2.31.1 - /usr/local/bin/git npmPackages: expo: ^43.0.0 => 43.0.3 expo-updates: ~0.10.15 => 0.10.15 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.47.0 expo-cli: 5.2.0 Project workflow: managed

Error output

As mentioned above we are receiving the following error during the fastlane build step:

error: Provisioning profile "<PROVISIONING_PROFILE>" doesn't support the Push Notifications capability

error: Provisioning profile "<PROVISIONING_PROFILE>" doesn't include the aps-environment entitlement

Call and EAS Setup

The explicit call being made is: eas build -p ios --profile release, where for Would you like to set up Push Notifications for your project? we chose n.

Our eas.json is as follows:

Expand JSON ```json { "build": { "release": { "expoCli": "5.2.0", "android": { "buildType": "app-bundle" }, "releaseChannel": "internal" }, "development": { "releaseChannel": "internal", "developmentClient": true, "distribution": "internal" }, "emulator": { "android": { "buildType": "apk" }, "releaseChannel": "internal" }, "simulator": { "ios": { "releaseChannel": "internal", "simulator": true } } }, "cli": { "version": ">= 0.47.0" } } ```

If you want the full fastlane dump is below

Expand fastlane dump ```bash Creating Gymfile Gymfile created Successfully loaded '/Users/expo/workingdir/build/ios/Gymfile' πŸ“„ +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | Detected Values from './Gymfile' | +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | suppress_xcode_output | true | | clean | false | | scheme | CattleID | | configuration | Release | | export_options | | | export_xcargs | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-8722ef83-94f5-4951-8e84-20da9aff967d.keychain" | | disable_xcpretty | true | | buildlog_path | /Users/expo/workingdir/logs | | output_directory | ./build | +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ Resolving Swift Package Manager dependencies... $ xcodebuild -resolvePackageDependencies -workspace ./CattleID.xcworkspace -scheme CattleID -configuration Release β–Έ Command line invocation: β–Έ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./CattleID.xcworkspace -scheme CattleID -configuration Release β–Έ User defaults from command line: β–Έ IDEPackageSupportUseBuiltinSCM = YES β–Έ --- xcodebuild: WARNING: Using the first of multiple matching destinations: β–Έ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } β–Έ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } β–Έ { platform:iOS Simulator, id:1CB33FBC-3FAA-4F3E-BB0F-A9EDCAAD1259, OS:15.0, name:iPad (9th generation) } β–Έ { platform:iOS Simulator, id:AFC5A58F-7FBC-4DF5-AE5A-0974346DF7B6, OS:15.0, name:iPad Air (4th generation) } β–Έ { platform:iOS Simulator, id:95E4DD21-70F0-4B6F-AC94-EA4476055EEF, OS:15.0, name:iPad Pro (9.7-inch) } β–Έ { platform:iOS Simulator, id:EEB18B5C-E97E-454D-A183-84ED100F8196, OS:15.0, name:iPad Pro (11-inch) (3rd generation) } β–Έ { platform:iOS Simulator, id:2A156826-CB37-46EA-8ECC-8DAD52EF0F1F, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) } β–Έ { platform:iOS Simulator, id:CCA2D32E-96E5-44C0-8A63-13814504BDA0, OS:15.0, name:iPad mini (6th generation) } β–Έ { platform:iOS Simulator, id:AE115BC2-463C-49D5-B498-8741EE92F069, OS:15.0, name:iPhone 8 } β–Έ { platform:iOS Simulator, id:718EB7E9-0A7D-4F2D-8334-9FAEB4D2D7D6, OS:15.0, name:iPhone 8 Plus } β–Έ { platform:iOS Simulator, id:0B5CA4B0-23A2-4D9B-ACB5-0697F287717C, OS:15.0, name:iPhone 11 } β–Έ { platform:iOS Simulator, id:95F5C092-940F-4853-850B-B1B36E8E0590, OS:15.0, name:iPhone 11 Pro Max } β–Έ { platform:iOS Simulator, id:03B4BB90-B5D0-4877-9D66-4E5B63B5A3C5, OS:15.0, name:iPhone 11 Pro } β–Έ { platform:iOS Simulator, id:FEA2C8C1-E52B-4540-9BCD-3BBC2EDEBFF4, OS:15.0, name:iPhone 12 } β–Έ { platform:iOS Simulator, id:AFEA8245-61C0-43CB-BAEA-97F1196BAF6E, OS:15.0, name:iPhone 12 Pro } β–Έ { platform:iOS Simulator, id:CB92FB5B-DF81-4D07-A8F6-18224862D513, OS:15.0, name:iPhone 12 Pro Max } β–Έ { platform:iOS Simulator, id:AE9F8D77-BE11-4FDB-AD3B-CA9CF749BF34, OS:15.0, name:iPhone 12 mini } β–Έ { platform:iOS Simulator, id:ECE956C8-39E0-492B-9E37-0C28627D599D, OS:15.0, name:iPhone 13 } β–Έ { platform:iOS Simulator, id:BC6F1D15-3ED9-40F2-BBDA-D082D5DFB738, OS:15.0, name:iPhone 13 Pro } β–Έ { platform:iOS Simulator, id:B26270AC-4D5B-4F8B-AF53-15B9BE5F6A3B, OS:15.0, name:iPhone 13 Pro Max } β–Έ { platform:iOS Simulator, id:AF3558D2-7ED7-4BD9-93BE-9F2C242BE18E, OS:15.0, name:iPhone 13 mini } β–Έ { platform:iOS Simulator, id:0A569D77-37C2-405B-A551-23EFA0D267DB, OS:15.0, name:iPhone SE (2nd generation) } β–Έ { platform:iOS Simulator, id:3F3F8FB5-2DED-483F-8134-855C1784EFC5, OS:15.0, name:iPod touch (7th generation) } β–Έ resolved source packages: $ xcodebuild -showBuildSettings -workspace ./CattleID.xcworkspace -scheme CattleID -configuration Release [stderr] --- xcodebuild: WARNING: Using the first of multiple matching destinations: [stderr] { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } [stderr] { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } [stderr] { platform:iOS Simulator, id:1CB33FBC-3FAA-4F3E-BB0F-A9EDCAAD1259, OS:15.0, name:iPad (9th generation) } [stderr] { platform:iOS Simulator, id:AFC5A58F-7FBC-4DF5-AE5A-0974346DF7B6, OS:15.0, name:iPad Air (4th generation) } [stderr] { platform:iOS Simulator, id:95E4DD21-70F0-4B6F-AC94-EA4476055EEF, OS:15.0, name:iPad Pro (9.7-inch) } [stderr] { platform:iOS Simulator, id:EEB18B5C-E97E-454D-A183-84ED100F8196, OS:15.0, name:iPad Pro (11-inch) (3rd generation) } [stderr] { platform:iOS Simulator, id:2A156826-CB37-46EA-8ECC-8DAD52EF0F1F, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) } [stderr] { platform:iOS Simulator, id:CCA2D32E-96E5-44C0-8A63-13814504BDA0, OS:15.0, name:iPad mini (6th generation) } [stderr] { platform:iOS Simulator, id:AE115BC2-463C-49D5-B498-8741EE92F069, OS:15.0, name:iPhone 8 } [stderr] { platform:iOS Simulator, id:718EB7E9-0A7D-4F2D-8334-9FAEB4D2D7D6, OS:15.0, name:iPhone 8 Plus } [stderr] { platform:iOS Simulator, id:0B5CA4B0-23A2-4D9B-ACB5-0697F287717C, OS:15.0, name:iPhone 11 } [stderr] { platform:iOS Simulator, id:03B4BB90-B5D0-4877-9D66-4E5B63B5A3C5, OS:15.0, name:iPhone 11 Pro } [stderr] { platform:iOS Simulator, id:95F5C092-940F-4853-850B-B1B36E8E0590, OS:15.0, name:iPhone 11 Pro Max } [stderr] { platform:iOS Simulator, id:FEA2C8C1-E52B-4540-9BCD-3BBC2EDEBFF4, OS:15.0, name:iPhone 12 } [stderr] { platform:iOS Simulator, id:AFEA8245-61C0-43CB-BAEA-97F1196BAF6E, OS:15.0, name:iPhone 12 Pro } [stderr] { platform:iOS Simulator, id:CB92FB5B-DF81-4D07-A8F6-18224862D513, OS:15.0, name:iPhone 12 Pro Max } [stderr] { platform:iOS Simulator, id:AE9F8D77-BE11-4FDB-AD3B-CA9CF749BF34, OS:15.0, name:iPhone 12 mini } [stderr] { platform:iOS Simulator, id:ECE956C8-39E0-492B-9E37-0C28627D599D, OS:15.0, name:iPhone 13 } [stderr] { platform:iOS Simulator, id:BC6F1D15-3ED9-40F2-BBDA-D082D5DFB738, OS:15.0, name:iPhone 13 Pro } [stderr] { platform:iOS Simulator, id:B26270AC-4D5B-4F8B-AF53-15B9BE5F6A3B, OS:15.0, name:iPhone 13 Pro Max } [stderr] { platform:iOS Simulator, id:AF3558D2-7ED7-4BD9-93BE-9F2C242BE18E, OS:15.0, name:iPhone 13 mini } [stderr] { platform:iOS Simulator, id:0A569D77-37C2-405B-A551-23EFA0D267DB, OS:15.0, name:iPhone SE (2nd generation) } [stderr] { platform:iOS Simulator, id:3F3F8FB5-2DED-483F-8134-855C1784EFC5, OS:15.0, name:iPod touch (7th generation) } Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout... [stderr] --- xcodebuild: WARNING: Using the first of multiple matching destinations: [stderr] { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } [stderr] { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } [stderr] { platform:iOS Simulator, id:1CB33FBC-3FAA-4F3E-BB0F-A9EDCAAD1259, OS:15.0, name:iPad (9th generation) } [stderr] { platform:iOS Simulator, id:AFC5A58F-7FBC-4DF5-AE5A-0974346DF7B6, OS:15.0, name:iPad Air (4th generation) } [stderr] { platform:iOS Simulator, id:95E4DD21-70F0-4B6F-AC94-EA4476055EEF, OS:15.0, name:iPad Pro (9.7-inch) } [stderr] { platform:iOS Simulator, id:EEB18B5C-E97E-454D-A183-84ED100F8196, OS:15.0, name:iPad Pro (11-inch) (3rd generation) } [stderr] { platform:iOS Simulator, id:2A156826-CB37-46EA-8ECC-8DAD52EF0F1F, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) } [stderr] { platform:iOS Simulator, id:CCA2D32E-96E5-44C0-8A63-13814504BDA0, OS:15.0, name:iPad mini (6th generation) } [stderr] { platform:iOS Simulator, id:AE115BC2-463C-49D5-B498-8741EE92F069, OS:15.0, name:iPhone 8 } [stderr] { platform:iOS Simulator, id:718EB7E9-0A7D-4F2D-8334-9FAEB4D2D7D6, OS:15.0, name:iPhone 8 Plus } [stderr] { platform:iOS Simulator, id:0B5CA4B0-23A2-4D9B-ACB5-0697F287717C, OS:15.0, name:iPhone 11 } [stderr] { platform:iOS Simulator, id:03B4BB90-B5D0-4877-9D66-4E5B63B5A3C5, OS:15.0, name:iPhone 11 Pro } [stderr] { platform:iOS Simulator, id:95F5C092-940F-4853-850B-B1B36E8E0590, OS:15.0, name:iPhone 11 Pro Max } [stderr] { platform:iOS Simulator, id:FEA2C8C1-E52B-4540-9BCD-3BBC2EDEBFF4, OS:15.0, name:iPhone 12 } [stderr] { platform:iOS Simulator, id:AFEA8245-61C0-43CB-BAEA-97F1196BAF6E, OS:15.0, name:iPhone 12 Pro } [stderr] { platform:iOS Simulator, id:CB92FB5B-DF81-4D07-A8F6-18224862D513, OS:15.0, name:iPhone 12 Pro Max } [stderr] { platform:iOS Simulator, id:AE9F8D77-BE11-4FDB-AD3B-CA9CF749BF34, OS:15.0, name:iPhone 12 mini } [stderr] { platform:iOS Simulator, id:ECE956C8-39E0-492B-9E37-0C28627D599D, OS:15.0, name:iPhone 13 } [stderr] { platform:iOS Simulator, id:BC6F1D15-3ED9-40F2-BBDA-D082D5DFB738, OS:15.0, name:iPhone 13 Pro } [stderr] { platform:iOS Simulator, id:B26270AC-4D5B-4F8B-AF53-15B9BE5F6A3B, OS:15.0, name:iPhone 13 Pro Max } [stderr] { platform:iOS Simulator, id:AF3558D2-7ED7-4BD9-93BE-9F2C242BE18E, OS:15.0, name:iPhone 13 mini } [stderr] { platform:iOS Simulator, id:0A569D77-37C2-405B-A551-23EFA0D267DB, OS:15.0, name:iPhone SE (2nd generation) } [stderr] { platform:iOS Simulator, id:3F3F8FB5-2DED-483F-8134-855C1784EFC5, OS:15.0, name:iPod touch (7th generation) } Detected provisioning profile mapping: {:"com.newstockyardgroup.cattleid"=>"f2294c0f-4a1a-412a-8a1f-15f4cd958b39"} +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | Summary for gym 2.185.1 | +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | workspace | ./CattleID.xcworkspace | | scheme | CattleID | | clean | false | | output_directory | ./build | | output_name | CattleID | | configuration | Release | | silent | false | | skip_package_ipa | false | | export_options.method | app-store | | export_xcargs | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-8722ef83-94f5-4951-8e84-20da9aff967d.keychain" | | 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 | | skip_package_pkg | false | | xcode_path | /Applications/Xcode.app | +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | export_options.provisioningProfiles.com.newstockyardgroup.cattleid | f2294c0f-4a1a-412a-8a1f-15f4cd958b39 | | build_path | /Users/expo/Library/Developer/Xcode/Archives/2022-02-24 | $ set -o pipefail && xcodebuild -workspace ./CattleID.xcworkspace -scheme CattleID -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2022-02-24/CattleID\ 2022-02-24\ 22.00.47.xcarchive archive | tee /Users/expo/workingdir/logs/CattleID-CattleID.log > /dev/null ❌ error: Provisioning profile "NSG Cattle ID PROD" doesn't support the Push Notifications capability. (in target 'CattleID' from project 'CattleID') ❌ error: Provisioning profile "NSG Cattle ID PROD" doesn't include the aps-environment entitlement. (in target 'CattleID' from project 'CattleID') β–Έ ** ARCHIVE FAILED ** ** ARCHIVE FAILED ** Exit status: 65 +-------------+-------------------------+ | Build environment | +-------------+-------------------------+ | xcode_path | /Applications/Xcode.app | | gym_version | 2.185.1 | | sdk | iPhoneOS15.0.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. ```

Relevant Information

(Let me know what other information I can provide! πŸ™)


Extra information that is essentially me just oversharing and making this longer (sorry)

Here is the dump from the first part of EXPO_DEBUG=1 eas build -p ios --profile release:

Expand debug log output ```bash Error: Cannot find module 'expo-dev-client/package.json' Require stack: - /Users//MY/LOCAL/PATH/noop.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at resolveFileName (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/resolve-from/index.js:29:39) at resolveFrom (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/resolve-from/index.js:43:9) at module.exports (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/resolve-from/index.js:46:47) at isExpoDevClientInstalledAsync (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/build/build/utils/devClient.js:68:36) at ensureExpoDevClientInstalledForDevClientBuildsAsync (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/build/build/utils/devClient.js:18:15) at runBuildAndSubmitAsync (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:45:79) at async Build.runAsync (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/build/commands/build/index.js:31:9) at async Build._run (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:52:22) at async Config.runCommand (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:226:25) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users//MY/LOCAL/PATH/noop.js' ] } - Linking to project @new-stockyard-group/cattleid βœ” Linked to project @new-stockyard-group/cattleid (​https://expo.dev/accounts/new-stockyard-group/projects/cattleid​) Expo Metro config: - Version: 0.3.4 - Bundler target: bare - Legacy: false - Extensions: ts, tsx, js, jsx, json - React Native: /Users//MY/LOCAL/PATH/node_modules/react-native - Babel config: /Users//MY/LOCAL/PATH/babel.config.js - Resolver Fields: react-native, browser, main - Watch Folders: - Node Module Paths: - Exotic: false ios.infoPlist: withIntrospectionBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosInfoPlistBaseMod ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withVersion ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withBuildNumber ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withUsesNonExemptEncryption ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withScheme ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withRequiresFullScreen ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withOrientation ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withDisplayName ➜ withInfoPlist ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withGoogle ➜ withInfoPlist ios.infoPlist: withStaticPlugin ➜ withRunOnce ➜ withTaskManager ➜ withInfoPlist ios.infoPlist: withStaticPlugin ➜ withRunOnce ➜ withLocation ➜ withInfoPlist ios.infoPlist: withSplashScreen ➜ withIosSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withIosSplashInfoPlist ➜ withInfoPlist ios.infoPlist: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosUserInterfaceStyle ➜ withInfoPlist ios.infoPlist: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosRootViewBackgroundColor ➜ withInfoPlist ios.infoPlist: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosFacebook ➜ withInfoPlist ios.infoPlist: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosBranch ➜ withInfoPlist ios.infoPlist: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosAdMob ➜ withInfoPlist ios.infoPlist: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withMaps ➜ withGoogleMapsKey ➜ withInfoPlist ios.entitlements: withIntrospectionBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosEntitlementsBaseMod ios.entitlements: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAssociatedDomains ➜ withEntitlementsPlist ios.entitlements: withExpoDocumentPicker ➜ withStaticPlugin ➜ withRunOnce ➜ withDocumentPicker ➜ withDocumentPickerIOS ➜ withEntitlementsPlist Β» ios: expo-document-picker: Cannot configure iOS entitlements because neither the appleTeamId property, nor the environment variable EXPO_APPLE_TEAM_ID were defined. ios.entitlements: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withNotificationsEntitlement ➜ withEntitlementsPlist ios.entitlements: withStaticPlugin ➜ withExpoContacts ➜ withRunOnce ➜ withAccessesContactNotes ➜ withEntitlementsPlist ios.entitlements: withStaticPlugin ➜ withExpoAppleAuthentication ➜ withRunOnce ➜ withAppleSignInWarning ➜ withEntitlementsPlist ios.expoPlist: withIntrospectionBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosExpoPlistBaseMod ios.expoPlist: withExpoUpdates ➜ withStaticPlugin ➜ withRunOnce ➜ withUpdates ➜ withUpdates ➜ withExpoPlist Error: There is neither a value or a policy set for the runtime version on "ios" at getRuntimeVersion (/Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/utils/Updates.js:163:11) at getRuntimeVersionNullable (/Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/utils/Updates.js:147:12) at setVersionsConfig (/Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/ios/Updates.js:157:67) at setUpdatesConfig (/Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/ios/Updates.js:151:10) at /Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/ios/Updates.js:130:25 at action (/Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:29) at interceptingMod (/Users//MY/LOCAL/PATH/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:27) at action (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/@expo/config-plugins/build/plugins/createBaseMod.js:71:27) at async interceptingMod (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21) at async evalModsAsync (/Users/THISISME/.nvm/versions/node/v16.13.2/lib/node_modules/eas-cli/node_modules/@expo/config-plugins/build/plugins/mod-compiler.js:245:25) ios.podfileProperties: withIntrospectionBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosPodfilePropertiesBaseMod ios.podfileProperties: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withJsEnginePodfileProps ➜ withPodfileProperties βœ” Using remote iOS credentials (Expo server) <...trails off to interactive menu here...> ```

In the above debug log it appears that a notifications entitlement is being added according to this line:

ios.entitlements: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withNotificationsEntitlement ➜ withEntitlementsPlist

But, I am not quite sure how to fully read the output so please let me know if I am off-base and I will remove this.


Any help or guidance would be much appreciated. Again, let me know what other information I can provide. Thank you very much for your time, help, and Expo/EAS!

Reproducible demo or steps to reproduce from a blank project

As this is specific to our use case it is difficult to share a full repro. Though, let me know if I should go through the process of building a new app with new keys and certs to test this out.

StianVaage commented 2 years ago

Did you find a solution?

samuel-gay commented 2 years ago

This is also an issue for me. When prompted by eas-cli to setup Push Notifications, I say no, but the prebuild still adds the aps-environment entitlement. Fastlane then throws an error complaining that the provisioning profile does not support push notifications. @wkozyra95

samuel-gay commented 2 years ago

@hawekotte @StianVaage I don't know if you still need a work around for this for now. But if you do, you can add a config plugin to remove the erroneous entitlement.

app.config.ts

import withRemoveiOSNotificationEntitlement from "./config-plugins/withRemoveiOSNotificationEntitlement";

type Dict = {[key: string]:any};
export default ({config}: Dict) => {
    return {
        ...config,
        plugins: [
            ...(config.plugins ?? []),
            [withRemoveiOSNotificationEntitlement]
        ]
    }
}

config-plugins/withRemoveiOSNotificationEntitlement.js

const withEntitlementsPlist = require("@expo/config-plugins").withEntitlementsPlist;

const withRemoveiOSNotificationEntitlement = (config) => {
    return withEntitlementsPlist(config, mod => {
        mod.modResults = {...mod.modResults, "aps-environment": undefined};
        return mod;
    })
}

module.exports = withRemoveiOSNotificationEntitlement;

Hope that helps.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

mrtry commented 2 years ago

same Issue

mrtry commented 2 years ago

The cause is that aps-environment is set even if I reply "No", so it would be nice if aps-environment is not set. πŸ™ see: https://discord.com/channels/695411232856997968/943205994123657246/980211970206728232

mrtry commented 2 years ago

I found it helpful in creating a plugin πŸ™ https://www.aronberezkin.com/posts/a-step-by-step-guide-to-writing-your-first-expo-config-plugin

wkozyra95 commented 2 years ago

question about push key refers to server credentials, and we asked it after everything else for build was already prepared, answer to that question will not affect the build in any way and it is expected behavior

I assume prebuild/eject adds that entitlement for legacy reasons(removing it could break some workflows, but adding it even if it is necessary does not break anything for existing projects). Cli will regenerate the provisioning profile with that entitlement, but in your case, you are probably providing files manually so you would need to add that capability on your own and regenerate the provisioning profile(or disable it with config-pllugins).

@mrtry There is config-plugins already in the comments a few posts above yours, you can just copy it

If you disagree with that behavior you are welcome to open PR in expo-cli with arguments why it should by changed.

jbreuer95 commented 2 years ago

@hawekotte @StianVaage I don't know if you still need a work around for this for now. But if you do, you can add a config plugin to remove the erroneous entitlement.

app.config.ts

import withRemoveiOSNotificationEntitlement from "./config-plugins/withRemoveiOSNotificationEntitlement";

type Dict = {[key: string]:any};
export default ({config}: Dict) => {
    return {
        ...config,
        plugins: [
            ...(config.plugins ?? []),
            [withRemoveiOSNotificationEntitlement]
        ]
    }
}

config-plugins/withRemoveiOSNotificationEntitlement.js

const withEntitlementsPlist = require("@expo/config-plugins").withEntitlementsPlist;

const withRemoveiOSNotificationEntitlement = (config) => {
    return withEntitlementsPlist(config, mod => {
        mod.modResults = {...mod.modResults, "aps-environment": undefined};
        return mod;
    })
}

module.exports = withRemoveiOSNotificationEntitlement;

Hope that helps.

I replaced

mod.modResults = {...mod.modResults, "aps-environment": undefined};

with

delete mod.modResults['aps-environment'];

Without the change i would get: Error: iOS entitlement "aps-environment" has invalid value "undefined".