eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

Issue: EAS CLI keeps asking for Apple Team ID despite environment variables being set

Open sultanmyrza opened this issue 3 months ago • 0 comments

Summary

eas build --local --platform ios continues to prompt for Apple Team ID selection even when the required environment variables (EXPO_APPLE_TEAM_TYPE and EXPO_APPLE_TEAM_ID) are properly configured in eas.json.

Expected Behavior

When running eas build --local --platform ios, the CLI should automatically use the Apple Team ID and Team Type from the environment variables without prompting for manual selection.

Actual Behavior

The CLI prompts for Apple Team ID and Team Type selection on every local build, ignoring the configured environment variables in eas.json.

Note: When setting the environment variables directly in the command (e.g., EXPO_APPLE_TEAM_ID=B9A7V7HR98 eas build --local --platform ios), the CLI works as expected and does not prompt for manual selection. This confirms that the issue is specifically with environment variable resolution from eas.json.

Visual Comparison

Environment Variables in eas.json Environment Variables in Command
set env via eas.json set env in command
❌ CLI prompts for manual selection ✅ CLI works automatically

Environment Configuration

I have configured the following environment variables in my eas.json:

{
  "cli": {
    "version": ">= 16.19.1",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "env": {
        "EXPO_APPLE_TEAM_TYPE": "COMPANY_OR_ORGANIZATION",
        "EXPO_APPLE_TEAM_ID": "B9A7V7HR98"
      }
    },
    "preview": {
      "distribution": "internal",
      "env": {
        "EXPO_APPLE_TEAM_TYPE": "COMPANY_OR_ORGANIZATION",
        "EXPO_APPLE_TEAM_ID": "B9A7V7HR98"
      }
    },
    "production": {
      "autoIncrement": true,
      "env": {
        "EXPO_APPLE_TEAM_TYPE": "COMPANY_OR_ORGANIZATION",
        "EXPO_APPLE_TEAM_ID": "B9A7V7HR98"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

Technical Analysis

After analyzing the relevant source code:

The environment variables should be properly resolved, but the CLI is not recognizing them during local builds e.g eas build --local.

Impact

This issue impacts developer productivity as it requires manual intervention for every local build, defeating the purpose of automated credential management.

Expected Resolution

The CLI should automatically detect and use the environment variables from eas.json without requiring manual selection.

Managed or bare?

managed

Environment

npx expo-env-info
  expo-env-info 2.0.7 environment info:
    System:
      OS: macOS 26.0
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node
      Yarn: 4.9.2 - ~/.nvm/versions/node/v22.18.0/bin/yarn
      npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm
    Managers:
      CocoaPods: 1.16.2 - /Users/sultanmyrza/.rvm/gems/ruby-3.4.5/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 24.5, iOS 18.5, macOS 15.5, tvOS 18.5, visionOS 2.5, watchOS 11.5
      Android SDK:
        API Levels: 28, 29, 31, 32, 33, 34, 35, 36
        Build Tools: 30.0.3, 33.0.1, 35.0.0, 36.0.0
        System Images: android-36 | Google Play ARM 64 v8a
    IDEs:
      Xcode: 16.4/16F6 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~54.0.8 => 54.0.8 
      expo-router: ~6.0.6 => 6.0.6 
      react: 19.1.0 => 19.1.0 
      react-dom: 19.1.0 => 19.1.0 
      react-native: 0.81.4 => 0.81.4 
      react-native-web: ~0.21.0 => 0.21.1 
    npmGlobalPackages:
      eas-cli: 16.19.1
    Expo Workflow: managed
npx expo-doctor
env: load .env.local
env: export EXPO_APPLE_TEAM_TYPE EXPO_APPLE_TEAM_ID
Running 17 checks on your project...
15/17 checks passed. 2 checks failed. Possible issues detected:
Use the --verbose flag to see more details about passed checks.

✖ Check that required peer dependencies are installed
Missing peer dependency: @expo/metro-runtime
Required by: expo-router
Advice:
Install missing required peer dependency with "npx expo install @expo/metro-runtime"
Your app may crash outside of Expo Go without this dependency. Native module peer dependencies must be installed directly.

✖ Check that packages match versions required by installed Expo SDK

🔧 Patch version mismatches
package      expected  found  
expo-router  ~6.0.7    6.0.6  

Changelogs:
- expo-router → https://github.com/expo/expo/blob/sdk-54/packages/expo-router/CHANGELOG.md

1 package out of date.
Advice:
Use 'npx expo install --check' to review and upgrade your dependencies.
To ignore specific packages, add them to "expo.install.exclude" in package.json. Learn more: https://expo.fyi/dependency-validation

Error output

No response

Reproducible demo or steps to reproduce from a blank project

  • init expo app (sdk 54)
  • setup development build
  • add environment variables for Apple team configuration in eas.json

or pull this branch experiment-eas-build-local-auto-select-ios-team-provider

sultanmyrza avatar Sep 19 '25 10:09 sultanmyrza