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 many verification codes #2143

Closed
zRelux opened this issue Dec 8, 2023 · 11 comments
Closed

Too many verification codes #2143

zRelux opened this issue Dec 8, 2023 · 11 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@zRelux
Copy link

zRelux commented Dec 8, 2023

Build/Submit details page URL

No response

Summary

Since yesterday I have been getting this error when trying to build with eas build.

Authentication with Apple Developer Portal failed!
Too many verification codes have been sent. Enter the last code you received or try again later.

I am wondering if it is related to the new app store changes. Not sure also on how to bypass this problem: I tried cleaning my .app-store folder, using EXPO_NO_KEYCHAIN=1 , without any major luck.

I also tried to look into the fastlane docs, but nothing there as well, I am hoping for any way to fix this, even doing all the setup again would be fine

Managed or bare?

bare

Environment

Env
  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 14.0
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    Managers:
      CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
    IDEs:
      Android Studio: 2021.2 AI-212.5712.43.2112.8815526
      Xcode: 15.0/15A240d - /usr/bin/xcodebuild
    npmPackages:
      @expo/metro-config: ^0.10.7 => 0.10.7 
      expo: ^49.0.7 => 49.0.13 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: ^0.72.6 => 0.72.6 
      react-native-web: ^0.19.9 => 0.19.9 
    npmGlobalPackages:
      eas-cli: 5.9.1
    Expo Workflow: bare
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ 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

Detailed check results:

Expected package @expo/config-plugins@~7.2.2
Found invalid:
  @expo/[email protected]
  (for more info, run: npm why @expo/config-plugins)
Advice: Upgrade dependencies that are using the invalid package versions.

Some dependencies are incompatible with the installed expo version:
  @react-native-community/[email protected] - expected version: 9.3.10
  @shopify/[email protected] - expected version: 1.4.3
  [email protected] - expected version: ~2.4.12
  [email protected] - expected version: ~5.4.0
  [email protected] - expected version: ~11.5.4
  [email protected] - expected version: ~15.4.5
  [email protected] - expected version: ~1.3.5
  [email protected] - expected version: ~11.3.0
  [email protected] - expected version: ~14.3.2
  [email protected] - expected version: ~0.2.0
  [email protected] - expected version: ~12.3.0
  [email protected] - expected version: ~14.3.0
  [email protected] - expected version: ~0.18.17
  [email protected] - expected version: ~12.3.2
  [email protected] - expected version: ~2.12.0
  [email protected] - expected version: 6.2.0
  [email protected] - expected version: ~3.3.0
  [email protected] - expected version: 4.6.3
  [email protected] - expected version: 13.9.0
  [email protected] - expected version: ~49.0.0
Your project may not work correctly until you install the correct versions of the packages.
Fix with: npx expo install --fix
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

No response

Reproducible demo or steps to reproduce from a blank project

Just run eas build --platform ios

@zRelux zRelux added the needs review Issue is ready to be reviewed by a maintainer label Dec 8, 2023
@szdziedzic
Copy link
Member

Hi, can you try to run the command with EXPO_DEBUG=1 or DEBUG=* flags? I think it should give you more details about the underlying error message.

@zRelux
Copy link
Author

zRelux commented Dec 8, 2023

@szdziedzic This is the logs I get back

p [Error]: Too many verification codes have been sent. Enter the last code you received or try again later.
    at a (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:718209)
    at o (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:718164)
    at t.idmsaRequestAsync (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:718423)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async t.requestAuthAsync (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:731967)
    at async t.handleTwoFactorAuthentication (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:728132)
    at async Object.S [as loginWithUserCredentialsAsync] (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:709726)
    at async loginWithUserCredentialsAsync (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:85:24)
    at async loginAsync (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:57:16)
    at async authenticateAsUserAsync (/Users/relux/.nvm/versions/node/v20.9.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:131:27) {
  data: {
    code: '-22981',
    title: 'Too many verification codes have been sent.',
    message: 'Too many verification codes have been sent. Enter the last code you received or try again later.',
    suppressDismissal: false
  },
  code: '-22981',
  title: 'Too many verification codes have been sent.',
  suppressDismissal: false
}

@zRelux
Copy link
Author

zRelux commented Dec 12, 2023

Today re asked me for the otp and allowed me to go through, but not sure why it was broken in the first place

@szdziedzic
Copy link
Member

Good to hear it!

I think it's just SMS rate limiting on Apple's side. We are not controlling it, just using their API when it comes to logging in/sending OTP.

I will close this issue because I believe the problem itself is not related to EAS CLI.

@gustavoelizalde
Copy link

I'm having the same issue.

Is there a waiting time to solve this?

Should not eas-cli request for the last code instead forcing the exit?

@gustavoelizalde
Copy link

@szdziedzic is there anything that could be done from the eas-cli perspective?

@jorgezerpa
Copy link

@szdziedzic is there anything that could be done from the eas-cli perspective?

Exactly! it should request for the older code, when you try to login into https://appstoreconnect.apple.com/login it is the way it works

@thomas-coldwell
Copy link

thomas-coldwell commented Aug 26, 2024

Hey @szdziedzic - I'm in agreement here that it should not exit if the error is Too many verification codes have been sent. Enter the last code you received or try again later. as there should be a prompt for input from the user to enter their last code at this stage.

I can see that it reaches this method and then throws

const newSession = await Auth.loginWithUserCredentialsAsync({
, however, this seems to be part of the @expo/apple-utils package which is not public afaict and so would have to be an internal change to support this. If I am mistaken please let me know and I'd be more than happy to submit a PR here to support this :)

Edit: Yeah looks like @expo/apple-utils is indeed private expo/expo-cli#4148 (comment)

@wooller
Copy link

wooller commented Sep 13, 2024

Just ran into this today too, I imagine its fairly low down on the priority list but having the cli allow inputting the most recent SMS code would be amazing!

@zane-commeatio
Copy link

Happening again today, unable to build for ios

@jorgezerpa
Copy link

@zane-commeatio Hi!

I went through this issue a couple weeks ago. It seems like it has nothing to do with Expo or eas-cli, the error comes from IOS servers. In my case, it just get fixed by wating a couple days without attemping getting a code.

During that time, I figured it out how to make the builds using non-interactive mode, so you can try:

eas build --platform ios --non-interactive

And this will start the build inmediatly (it will take more time than usually, but it works!).

Plus:

If you need to make a submit after your build (example -> submit to Testflight) you can make:
eas submit --platform ios -- id {id-build} --non-interactive

You can found the id-build on your expo dashboard -> go to your build -> in top-right corner you will se a button "View details" -> click on it and you will see your id-build.

Important

If you going to make the submit by this way, you will need to add this into the root object of your eas.json file:

 "submit": {
    "production": {
      "ios": {
        "appleId": { a string with the username or email of your apple account },
        "ascAppId": { a string. You can found this value on your apple developer console }
      }
    }
  }

Let me know if it works bro🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

7 participants