expo / eas-cli

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

Submission Failed - Cannot read properties of undefined (reading 'attributes') #2426

Open Roshdy opened 5 months ago

Roshdy commented 5 months ago

Build/Submit details page URL

https://expo.dev/accounts/mal-org/projects/malfintech

Summary

i'm trying to submit iOS, but i keep getting

Cannot read properties of undefined (reading 'attributes')
Submission failed

i updated the latest eas-cli now it asks me for my Apple credentials, then fail after successfully logging in.

Expected behaviour:

Successfully submit to store, or provide an error message to fix.

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: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
      Yarn: 3.6.4 - ~/.nvm/versions/node/v20.12.2/bin/yarn
      npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
      Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.14.3 - /Users/roshdy/.rvm/rubies/ruby-3.2.0/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
      Android SDK:
        API Levels: 27, 30, 31, 33, 34
        Build Tools: 27.0.3, 28.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 34.0.0
        System Images: android-33 | Google Play Intel x86_64 Atom, android-34 | Google Play ARM 64 v8a, android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a
    IDEs:
      Android Studio: 2023.2 AI-232.10300.40.2321.11567975
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmPackages:
      babel-preset-expo: ~11.0.0 => 11.0.6 
      expo: ~51.0.13 => 51.0.13 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.2 => 0.74.2 
      react-native-web: ~0.19.10 => 0.19.11 
    npmGlobalPackages:
      eas-cli: 9.2.0
    Expo Workflow: managed

Expo Doctor

✔ 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 that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

Error output

eas submit -p ios

✔ What would you like to submit? › Select a build from EAS
✔ Which build would you like to submit? › - ID: 81cf1880-b10a-446d-8356-09bbf2a442c7 (17 hours ago)
Ensuring your app exists on App Store Connect. This step can be skipped by providing ascAppId in the submit profile. Learn more

› Log in to your Apple Developer account to continue
✔ Apple ID: … xxxxxx
› Restoring session /Users/xxxx/.app-store/auth/xxxxx/cookie
› Provider xxxxxxx (xxxxx)
✔ Logged in Local session

Cannot read properties of undefined (reading 'attributes')
Submission failed
    Error: submit command failed.

Reproducible demo or steps to reproduce from a blank project

Unable to provide a snack of submitting to the store! Sorry.

szdziedzic commented 5 months ago

Can you try to remove Users/xxxx/.app-store directory?

xrnm commented 5 months ago

Have the same issue. Deleted and tried submitting again. Same error for me.

xrnm commented 5 months ago

Verified same issue present on 9.0.10 and 9.0.4

szdziedzic commented 5 months ago

Interesting, I can't reproduce it on my device so far 🤔.

As a temporary workaround, you can try to set your app's App Store Connect ID in the ascAppId field in the submit profile in eas.json. This way you can skip the authentication with Apple if you have credentials set on Expo servers.

xrnm commented 5 months ago

This workaround was amazingly helpful. I'm a consultant and have many teams on ASC so maybe that's an component of the CLI issue. I can't thank you enough as I can get this submitted for my client with the ascAppId work around. Thank you so much @szdziedzic. For anyone else interested in the workaround the section looks like this:

{
  "cli": {
    "version": ">= 0.34.0"
  },
  "submit": {
    "production": {
      "android": {
        "serviceAccountKeyPath": "../path/to/api-xxx-yyy-zzz.json",
        "track": "internal"
      },
      "ios": {
        "appleId": "john@turtle.com",
        "ascAppId": "1234567890",
        "appleTeamId": "AB12XYZ34S"
      }
    }
  }
}

from https://docs.expo.dev/submit/eas-json/

I only included ascAppId and not the appleid or team id and my submission worked great.

Sorry to be on the GSD side of things; such is the life of a consultant. :)

xrnm commented 5 months ago

I have confirmed I cannot submit on other teams with this account. I will report back if other members of my team are having the issue. Happy to provide any other information helpful in debugging. Thanks for building and supporting this software.

StephenBenson-MRM commented 5 months ago

I also had this issue, adding the ascAppId resolved it for me, it would be good to know what caused this issue

FoRavel commented 1 month ago

To resolve the issue I had to manually create new app in App Store Connect, and then copy paste the ascAppId (App Store Connect App ID) in the eas.json.

I found the ascAppId in the url of the app detail page https://appstoreconnect.apple.com/apps/{id}/...