expo / eas-cli

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

EAS on CI, iOS submit "Set ascAppId in the submit profile (eas.json) or re-run this command in interactive mode." even if ascAppId is present #2418

Closed FrancescoBonizzi closed 3 months ago

FrancescoBonizzi commented 3 months ago

Build/Submit details page URL

No response

Summary

When using EAS on CI (Azure DevOps pipelines) I run:

eas build --platform all --auto-submit-with-profile=test --non-interactive --no-wait

And I set those env variables:

          EXPO_TOKEN
          EXPO_APPLE_ID
          EXPO_APPLE_APP_SPECIFIC_PASSWORD

Android is fine: build and submit. iOS fails with this error: Set ascAppId in the submit profile (eas.json) or re-run this command in interactive mode.

My test submit profile:

 "submit": {
    "production": {},
    "test": {
      "android": {
        "track": "alpha"
      },
      "ios": {
        "ascAppId": "123",
        "appleTeamId": "123",
        "sku": "test",
        "bundleIdentifier": "com.test.test"
      }
    }
  }

I set the correct ascAppId! Locally, if I run the same command, it works!

Managed or bare?

Managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 21.7.3 - /opt/homebrew/bin/node
      Yarn: 1.22.22 - /opt/homebrew/bin/yarn
      npm: 10.7.0 - /opt/homebrew/bin/npm
      Watchman: 2024.04.29.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      expo: ^51.0.9 => 51.0.9 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.1 => 0.74.1 
      react-native-web: ^0.19.10 => 0.19.12 
    npmGlobalPackages:
      eas-cli: 9.2.0
    Expo Workflow: managed
(node:40018) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ 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

Detailed check results:

Expected package @expo/config-plugins@~8.0.0
Found invalid:
  @expo/config-plugins@5.0.4
  (for more info, run: npm why @expo/config-plugins)
Advice: Upgrade dependencies that are using the invalid package versions0.

(node:40188) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
The following packages should be updated for best compatibility with the installed expo version:
  expo@51.0.9 - expected version: ~51.0.11
  expo-build-properties@0.12.1 - expected version: ~0.12.3
  expo-font@12.0.6 - expected version: ~12.0.7
  expo-image@1.12.9 - expected version: ~1.12.11
  expo-splash-screen@0.27.4 - expected version: ~0.27.5
  react-native@0.74.1 - expected version: 0.74.2
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.

One or more checks failed, indicating possible issues with the project.

Error output

Set ascAppId in the submit profile (eas.json) or re-run this command in interactive mode.
Submission failed
Error: Submission failed
    at IosSubmitCommand.resolveSubmissionOptionsAsync (/usr/local/lib/node_modules/eas-cli/build/submit/ios/IosSubmitCommand.js:58:19)
    at async IosSubmitCommand.runAsync (/usr/local/lib/node_modules/eas-cli/build/submit/ios/IosSubmitCommand.js:39:25)
    at async withAnalyticsAsync (/usr/local/lib/node_modules/eas-cli/build/analytics/common.js:7:24)
    at async submitAsync (/usr/local/lib/node_modules/eas-cli/build/submit/submit.js:17:12)
    at async prepareAndStartSubmissionAsync (/usr/local/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:314:12)
    at async runBuildAndSubmitAsync (/usr/local/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:147:32)
    at async Build.runAsync (/usr/local/lib/node_modules/eas-cli/build/commands/build/index.js:42:9)
    at async Build._run (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:80:22)
    at async Config.runCommand (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:301:25)
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

Just create a new expo App and:

  1. Set eas.json like this:
    
    {
    "cli": {
    "version": ">= 0.47.0",
    "promptToConfigurePushNotifications": false
    },
    "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "credentialsSource": "local"
    },
    "production": {
      "ios": {
        "resourceClass": "m-medium"
      },
      "android": {
      }
    }
    },
    "submit": {
    "production": {},
    "test": {
      "android": {
        "track": "alpha"
      },
      "ios": {
        "ascAppId": "123",
        "appleTeamId": "123",
        "sku": "sku",
        "bundleIdentifier": "com.test.test"
      }
    }
    }
    }

on a real App.



2. Set ENV variabiles:
- `EXPO_TOKEN`
- `EXPO_APPLE_ID`
- `EXPO_APPLE_APP_SPECIFIC_PASSWORD`

3. Run: `eas build --platform all --auto-submit-with-profile=test --non-interactive --no-wait`
szdziedzic commented 3 months ago

Hi @FrancescoBonizzi,

Thanks for the report! It turns out I fixed this exact issue yesterday https://github.com/expo/eas-cli/commit/5f800b5be6d398b7343fea937d936a62400c8324. I'm going to release a new CLI version now.

szdziedzic commented 3 months ago

@FrancescoBonizzi should be fixed in 10.0.0