Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too long chain of profile extensions, make sure "extends" keys do not make a cycle #2793

Open
cunneen opened this issue Jan 1, 2025 · 1 comment

Comments

@cunneen
Copy link

cunneen commented Jan 1, 2025

Build/Submit details page URL

No response

Summary

The expo docs for EAS submit and EAS build both seem to encourage using the "extends" keyword in eas.json to share configuration, which would indeed be useful.

It looks like EAS build has a maximum "extends" depth of 5, which seems adequate but should really be mentioned in the docs.

EAS submit, on the other hand, has a maximum "extends" depth of 2, which throws an error even for my simple case, especially when one considers that:

By default, --auto-submit will try to use a submission profile with the same name as the selected build profile. If this does not exist, or if you prefer to use a different profile, you can use --auto-submit-with-profile=<profile-name> instead.1

Too long chain of profile extensions, make sure "extends" keys do not make a cycle

My eas.json file:

{
  "cli": {
    "version": ">= 3.15.1",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {
      "extends": "production",
      "distribution": "internal",
      "android": {
        "gradleCommand": ":app:assembleDebug"
      },
      "ios": {
        "buildConfiguration": "Debug",
        "simulator": true
      }
    },
    "development:device": {
      "extends": "development",
      "distribution": "internal",
      "ios": {
        "buildConfiguration": "Debug",
        "simulator": false
      }
    },
    "preview": {
      "extends": "production",
      "distribution": "internal",
      "ios": {
        "simulator": true
      },
      "android": {
        "buildType": "apk"
      }
    },
    "preview:device": {
      "extends": "preview",
      "ios": {
        "simulator": false
      }
    },
    "preview:testflight": {
      "extends": "preview:device",
      "distribution": "store"
    },
    "production": {
      "autoIncrement": true
    }
  },
  "submit": {
    "preview": {
      "extends": "production",
      "android": {
        "track": "internal"
      }
    },
    "preview:device": {
      "extends": "preview"
    },
    "preview:testflight": {
      "extends": "preview"
    },
    "production": {
      "android": {
        "serviceAccountKeyPath": "../../secure/service-account-file.json",
        "track": "internal"
      },
      "ios": {
        "ascApiKeyPath": "../../secure/AppStoreConnect-API-key.p8",
        "appleId": "[email protected]",
        "ascApiKeyId": "12ABC34DEF",
        "ascApiKeyIssuerId": "56f1d523-25f0-4deb-bd86-3945a096b331",
        "ascAppId": "12345678",
        "appleTeamId": "12ABC34DEF"
      }
    }
  }
}

Managed or bare?

managed

Environment

expo-env-info 1.2.1 environment info:
System:
OS: macOS 14.5
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v18.18.2/bin/yarn
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /Users/mikecunneen/.rvm/gems/ruby-3.3.5/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.2, iOS 18.2, macOS 15.2, tvOS 18.2, visionOS 2.2, watchOS 11.2
Android SDK:
API Levels: 34, 35
Build Tools: 34.0.0, 35.0.0
System Images: android-34 | Google Play ARM 64 v8a
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2412.12266719
Xcode: 16.2/16C5032a - /usr/bin/xcodebuild
npmPackages:
expo: ~51.0.39 => 51.0.39
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.5 => 0.74.5
react-native-web: ~0.19.6 => 0.19.12
npmGlobalPackages:
eas-cli: 14.2.0
Expo Workflow: managed


npx expo-doctor
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check for issues with Metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that packages match versions required by installed Expo SDK
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

Error output

I don't want to use up my EAS build and submit credits, but it should be easily reproducible with my eas.json above when EAS Build is run with the preview:testflight profile and --auto-submit, i.e.:

eas build --profile preview:testflight --auto-submit

Here's a (redacted) transcript of my session. Incidentally, the build succeeded despite the error but obviously the submit did not work.

OUTPUT

eas build --profile preview:testflight --auto-submit

✔ Select platform › All
The EAS build profile does not specify a Node.js version. Using the version specified in .nvmrc: v18 
The EAS build profile does not specify a Node.js version. Using the version specified in .nvmrc: v18 
We detected that you are building for the "store" distribution. Resolving the environment for environment variables used during the build to "production". Set the "environment" field in the build profile if you want to specify the environment manually.
Environment variables with visibility "Plain text" and "Sensitive" loaded from the "production" environment on EAS servers: NODE_OPTIONS.

✔ Incremented versionCode from 22 to 23.

🤖 Android build
✔ Using remote Android credentials (Expo server)
✔ Using Keystore from configuration: Default (default)

Compressing project files and uploading to EAS Build. Learn more: https://expo.fyi/eas-build-archive
✔ Uploaded to EAS 21s
We detected that you are building for the "store" distribution. Resolving the environment for environment variables used during the build to "production". Set the "environment" field in the build profile if you want to specify the environment manually.
Environment variables with visibility "Plain text" and "Sensitive" loaded from the "production" environment on EAS servers: NODE_OPTIONS.

Failed to read the app config from the project using "npx expo config" command: npx expo config --json --type introspect exited with non-zero code: 1.
Falling back to the version of "@expo/config" shipped with the EAS CLI.
✔ Incremented buildNumber from 14 to 15.

🍏 iOS build
✔ 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 missing 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: … [email protected]
› Restoring session /Users/me/.app-store/auth/[email protected]/cookie
› Session expired Local session
› Using password for [email protected] from your local Keychain
  Learn more: https://docs.expo.dev/distribution/security#keychain
✔ Logged in New session
✔ Select a Team › Example Company Pty Ltd - Company/Organization (12ABC34DEF)
✔ Select a Provider › Example Company Pty Ltd (123456789)
✔ Bundle identifier registered com.example.app.myapp
✔ Synced capabilities: No updates
✔ Synced capability identifiers: No updates
✔ Fetched Apple distribution certificates
✔ Fetched Apple provisioning profiles

Project Credentials Configuration

Project                   @my-expo-org/my-expo-project
Bundle Identifier         com.example.app.myapp
                          
App Store Configuration   
                          
Distribution Certificate  
Serial Number             6DC6AC810EAE464BABF0F2092B1FE88D
Expiration Date           Sat, 20 Dec 2025 14:52:00 GMT+0800
Apple Team                12ABC34DEF (Example Company Pty Ltd (Company/Organization))
Updated                   11 days ago
                          
Provisioning Profile      
Developer Portal ID       092B1FE88D
Status                    active
Expiration                Sat, 20 Dec 2025 14:52:00 GMT+0800
Apple Team                12ABC34DEF (Example Company Pty Ltd (Company/Organization))
Updated                   8 days ago
                          
All credentials are ready to build @my-expo-org/my-expo-project (com.example.app.myapp)


Compressing project files and uploading to EAS Build. Learn more: https://expo.fyi/eas-build-archive
✔ Uploaded to EAS 19s

🤖 Android build details: https://expo.dev/accounts/my-expo-org/projects/my-expo-project/builds/270523a9-411f-4b08-8758-3136153050e1
🍏 iOS build details: https://expo.dev/accounts/my-expo-org/projects/my-expo-project/builds/bd1e7eea-95d2-4dff-818e-9b35529cc6ba

Too long chain of profile extensions, make sure "extends" keys do not make a cycle
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

See above.

Footnotes

  1. EAS Build > Automate Submissions > Selecting a Submission Profile (https://docs.expo.dev/build/automate-submissions/#selecting-a-submission-profile)

@cunneen cunneen added the needs review Issue is ready to be reviewed by a maintainer label Jan 1, 2025
@szdziedzic szdziedzic added issue accepted eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Jan 7, 2025
@expo-bot
Copy link
Contributor

expo-bot commented Jan 7, 2025

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants