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

eas submit error "Cannot read properties of undefined" #2389

Closed
BrandonMathis opened this issue May 20, 2024 · 8 comments
Closed

eas submit error "Cannot read properties of undefined" #2389

BrandonMathis opened this issue May 20, 2024 · 8 comments

Comments

@BrandonMathis
Copy link

Build/Submit details page URL

No response

Summary

Running eas submit --platform ios throws an error in my console and no new submissions are made on the Expo account.

🐚 eas submit --platform ios

βœ” What would you like to submit? β€Ί Select a build from EAS
βœ” Which build would you like to submit? β€Ί - ID: xxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxx (3 days ago)
Ensuring your app exists on App Store Connect. This step can be skipped by providing ascAppId in the submit
profile. Learn more: https://expo.fyi/asc-app-id

β€Ί Log in to your Apple Developer account to continue
βœ” Apple ID: … [email protected]
β€Ί Restoring session /Users/xxxxxxxxx/.app-store/auth/[email protected]/cookie
βœ” Select a Team β€Ί XXXXXXXXXX XXXXXXXXXXX Inc - Company/Organization (XXXXXXXXXXXX)
β€Ί Provider XXXXXXXXX XXXXXXXXXX Inc (XXXXXXXXX)
βœ” Logged in Local session

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

Running with DEBUG=* did not provide many details

βœ” Logged in Local session

Cannot read properties of undefined (reading 'attributes')
Submission failed
Error: Submission failed
    at IosSubmitCommand.resolveSubmissionOptionsAsync (/Users/xxxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/submit/ios/IosSubmitCommand.js:58:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async IosSubmitCommand.runAsync (/Users/xxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/submit/ios/IosSubmitCommand.js:39:25)
    at async withAnalyticsAsync (/Users/xxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/analytics/common.js:7:24)
    at async submitAsync (/Users/xxxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/submit/submit.js:17:12)
    at async Submit.runAsync (/Users/xxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/commands/submit.js:58:32)
    at async Submit._run (/Users/xxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:80:22)
    at async Config.runCommand (/Users/xxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:301:25)

Managed or bare?

Managed

Environment

 expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 13.4.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.16.0 - ~/.asdf/installs/nodejs/18.16.0/bin/node
      Yarn: 1.22.19 - ~/.asdf/installs/nodejs/18.16.0/bin/yarn
      npm: 9.5.1 - ~/.asdf/plugins/nodejs/shims/npm
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    IDEs:
      Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
    npmPackages:
      babel-preset-expo: ~11.0.0 => 11.0.6
      expo: ^51.0.5 => 51.0.7
      react: 18.2.0 => 18.2.0
      react-dom: 18.2.0 => 18.2.0
      react-native: 0.74.1 => 0.74.1
    npmGlobalPackages:
      eas-cli: 9.0.7
    Expo Workflow: managed

Error output

βœ” Logged in Local session

Cannot read properties of undefined (reading 'attributes')
Submission failed
Error: Submission failed
    at IosSubmitCommand.resolveSubmissionOptionsAsync (/Users/xxxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/submit/ios/IosSubmitCommand.js:58:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async IosSubmitCommand.runAsync (/Users/xxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/submit/ios/IosSubmitCommand.js:39:25)
    at async withAnalyticsAsync (/Users/xxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/analytics/common.js:7:24)
    at async submitAsync (/Users/xxxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/submit/submit.js:17:12)
    at async Submit.runAsync (/Users/xxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/build/commands/submit.js:58:32)
    at async Submit._run (/Users/xxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:80:22)
    at async Config.runCommand (/Users/xxxxxxxxxxx/.asdf/installs/nodejs/18.16.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:301:25)

Reproducible demo or steps to reproduce from a blank project

eas submit --platform ios

@BrandonMathis BrandonMathis added the needs review Issue is ready to be reviewed by a maintainer label May 20, 2024
@AmitayCohen1
Copy link

Same here

@brentvatne
Copy link
Member

hey folks, @kadikraman and i have tried to reproduce this and were unable to.

  • does eas build -p ios work for you?
  • are you using an ASC API key to handle submissions? or an app specific password?
  • if you run eas credentials -p ios and go to "App Store Connect: Manage your API Key" and generate a key from there, does that work for you?

@BrandonMathis
Copy link
Author

@brentvatne The eas build command works for me. Here is a link to a recent build I enqueued using it

I used the eas credentials -p ios command to deleted my existing key I used for eas submit & generated a new key. After that, the problem persists with the same error

@szdziedzic
Copy link
Member

@BrandonMathis Can you try to do rm -rf ~/.app-store to clear the cache?

@szdziedzic
Copy link
Member

@BrandonMathis what is the output of cat ~/.app-store/auth/apple-developer-portal-domain.json on your device?

@quinlanj
Copy link
Member

quinlanj commented May 21, 2024

@BrandonMathis when was the last time you logged in via the Apple on eas-cli, before you ran eas submit --platform ios and saw the error?

@szdziedzic szdziedzic added needs more info eas build and removed needs review Issue is ready to be reviewed by a maintainer labels May 21, 2024
@AmitayCohen1
Copy link

AmitayCohen1 commented May 21, 2024

Updating my eas.json solved it for me! @brentvatne
In the submit.production.ios section I added:

  1. ascAppId
  2. appleId
  3. appleTeamId

"submit": { "production": { "ios": { "ascAppId": "", "appleId": "", "appleTeamId": "" } } }

@BrandonMathis
Copy link
Author

BrandonMathis commented May 21, 2024

@BrandonMathis what is the output of cat ~/.app-store/auth/apple-developer-portal-domain.json on your device?

Contents of that file are

{
  "domain": "https://developer.apple.com"
}

@BrandonMathis Can you try to do rm -rf ~/.app-store to clear the cache?

I deleted that file & was required to log back in so I beleive that did clear some cache but the issues persists

🐚 rm -rf ~/.app-store
🐚 eas submit --platform ios
β˜… [email protected] is now available.
To upgrade, run npm install -g eas-cli.
Proceeding with outdated version.


βœ” What would you like to submit? β€Ί Select a build from EAS
βœ” Which build would you like to submit? β€Ί - ID: 45d27a48-51b4-4234-8971-44c7c851d529 (21 hours ago)
Ensuring your app exists on App Store Connect. This step can be skipped by providing ascAppId in the submit profile. Learn
more: https://expo.fyi/asc-app-id

β€Ί Log in to your Apple Developer account to continue
βœ” Apple ID: … [email protected]
β€Ί Using password for [email protected] from your local Keychain
  Learn more: https://docs.expo.dev/distribution/security#keychain
βœ” Logged in, verify your Apple account to continue
Two-factor Authentication (6 digit code) is enabled for [email protected]. Learn more: https://support.apple.com/en-us/HT204915

βœ” Please enter the 6 digit code you received at +1 (β€’β€’β€’) β€’β€’β€’-β€’β€’00: … xxxxxx
βœ” Valid code
βœ” Logged in and verified
βœ” Select a Team β€Ί XXXXXX XXXXXX Inc - Company/Organization (xxxxxxxx)
βœ” Select a Provider β€Ί XXXXXXX XXXXXXX Inc (xxxxxx)
βœ” Switched to provider: XXXXXXXXXX XXXXXXXXx Inc (xxxxxxx)

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

βœ… This fixed the issue for me (updating my eas.json with some ios specific data)

Updating my eas.json solved it for me! @brentvatne
In the submit.production.ios section I added:

ascAppId
appleId
appleTeamId
"submit": { "production": { "ios": { "ascAppId": "", "appleId": "", "appleTeamId": "" } } }

Many thanks to the people in this issue & the Discord who helped. I will close this issue now.

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

5 participants