eas-cli: Authentication with Apple Developer Portal failed! [Error -36607]

Build/Submit details page URL

No response

Summary

When running eas build -p ios --auto-submit and choose yes when being asked to log in to my Apple account, I get this error:

✖ Logging in...
Authentication with Apple Developer Portal failed!
    Error: Apple Service Error -36607. Unable to sign you in to your Apple ID. Try again later. <a target="_blank" 
    href="https://support.apple.com/kb/HT212522 ">Learn more.<span class="sr-only"> Opens in a new window.</span></a>

after getting the error, I do get the Apple ID verification code prompt on my apple devices though, so it might be that the CLI is not able to handle cases where 2fa is required.

eas-cli/3.6.1 darwin-arm64 node-v18.12.1

Managed or bare?

managed

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 13.2 Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm Watchman: 2023.02.13.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 IDEs: Xcode: 14.2/14C18 - /usr/bin/xcodebuild npmGlobalPackages: eas-cli: 3.6.1 expo-cli: 6.3.0 Expo Workflow: managed

Error output

Authentication with Apple Developer Portal failed! Error: Apple Service Error -36607. Unable to sign you in to your Apple ID. Try again later. Learn more.<span class="sr-only"> Opens in a new window.</span>

Reproducible demo or steps to reproduce from a blank project

eas build -p ios --auto-submit

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 17
  • Comments: 73 (12 by maintainers)

Most upvoted comments

🚀 Fix is now published in eas-cli@3.7.2 🚀

I’m investigating now, need to confirm the new endpoints.

Update:

I can reproduce certain authentication errors, specifically this rate limiting error:

> Request: https://idmsa.apple.com/appleauth/auth/signin
> Response:
Apple Service Error -36607. Unable to sign you in to your Apple ID. Try again later. <a target="_blank" href="https://support.apple.com/kb/HT212522 ">Learn more.<span class="sr-only"> Opens in a new window.</span></a>

But authentication sometimes works in https://idmsa.apple.com/signin (then timesout instantly). I think Apple may be having some server issues at the moment. I have been able to get EAS CLI authentication working one time a moment ago (using an sms-2fa account) but then it went back to the rate limit issue. I get the same issue using fastlane spaceauth. Going to try adjusting the cookies to see if that helps. FYI, this Fastlane PR only appears to update 2fa device codes using the legacy four digit codes, most people aren’t using this.

this same issue is occurring on fastlane: https://github.com/fastlane/fastlane/pull/21072 it looks like Apple changed an API without notice. we’re going to update for this as soon as possible. for now, indeed, you can skip the authentication part

Ok, I think I got it. Pushing a new version now. Apple appears to be locking accounts using legacy headers, after unlocking your account the new system should work as expected. The issue wasn’t related to 2-Factor Authentication so if you get to the 2FA prompt and it fails, then you have encountered a different issue.

fwiw, you can bypass this problem by

  1. choosing no when being asked to log in to your Apple account
  2. download the build’s .ipa file from your expo dashboard
  3. submit the .ipa file to App Store Connect via Transporter

It seems that trying to use eas right now and logging in to your Apple account more than once results in a soft lock of the account. I had to log back in on my Mac after trying and change my password because

Your Apple ID has been locked for security reasons. To unlock it, you must verify your identity.

Looks like eas device:create, eas submit etc. are all affected

Downgrading to v3.6 gave the same error. It’s worth noting that while I received the Authentication with Apple Developer Portal failed! error in the cli. A 2FA code was pushed to my physical device. Its almost as if the CLI just isnt waiting for the 2FA process.

eas 3.7.1 - I had to reset my password. Tried steps described above, still not working. I did get a pin alert on my phone.

(prod) $ eas -v eas-cli/3.7.1 linux-x64 node-v16.18.1 (prod) $ rm -rf ~/.app-store (prod) $ eas credentials -p ios ✔ Which build profile do you want to configure? › prod ✔ Using build profile: prod If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them. This is optional, but without Apple account access you will need to provide all the missing values manually and we can only run minimal validation on them. ✔ Do you want to log in to your Apple account? … yes

› Log in to your Apple Developer account to continue ✔ Apple ID: … xxxx@gmail.com › The password is only used to authenticate with Apple and never stored on EAS servers Learn more: https://bit.ly/2VtGWhU ✔ Password (for xxxx@gmail.com): … ************* › Saving Apple ID password to the local Keychain Learn more: https://docs.expo.dev/distribution/security#keychain ✖ Logging in… Authentication with Apple Developer Portal failed! Error: Apple Server Error: Unable to sign you in to your Apple ID. Try again later. The following support link is provided by Apple but it may not be relevant: Learn more: https://support.apple.com/kb/HT212522

Still happening for us as well. eas-cli@3.7.1.

❯ eas -v
eas-cli/3.7.1 darwin-arm64 node-v18.12.1

❯ eas credentials -p ios
If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them.
This is optional, but without Apple account access you will need to provide all the missing values manually and we can only run minimal validation on them.
✔ Do you want to log in to your Apple account? … yes

› Log in to your Apple Developer account to continue
✔ Apple ID: … dev@brguide.com
› Using password for dev@brguide.com from your local Keychain
  Learn more
✖ Logging in...
Authentication with Apple Developer Portal failed!
    Error: Apple Service Error -36607. Unable to sign you in to your Apple ID. Try again later. <a
    target="_blank" href="https://support.apple.com/kb/HT212522 ">Learn more.<span class="sr-only">
    Opens in a new window.</span></a>

Still getting the below error with using eas-cli/3.7.1 darwin-arm64 node-v16.17.0

✖ Logging in...
Authentication with Apple Developer Portal failed!
    Error: Apple Server Error: Unable to sign you in to your Apple ID. Try again later. The following support link is provided by Apple but it may not be 
    relevant: Learn more: https://support.apple.com/kb/HT212522
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Also gets the apple 2fa popup. Not sure if related or as the apple error suggests, I need to wait 24hrs

@anubra266 Try again, and try what @MaxAst suggested above.

fwiw, you can bypass this problem by

  1. choosing no when being asked to log in to your Apple account
  2. download the build’s .ipa file from your expo dashboard
  3. submit the .ipa file to App Store Connect via Transporter

@miran248 I run into the same sit CleanShot 2023-02-23 at 14 05 15@2x uation as @GiovanniFerrara

Got the same error too! And me being who i am, i ran it twice and got a different error the second time 😃

✖ Logging in...
Authentication with Apple Developer Portal failed!
    Error: Apple Service Error -20209. This Apple ID has been locked for security reasons. Visit iForgot to reset your account 
    (https://iforgot.apple.com)

EDIT: I later ran it again and got the error 36607 again. After that i ran it again, this time choosing no and this time i had no issues; what’s more, a few minutes later i got an email from testflight, saying the app was now available to test.

After having ‘eas update’ installed and 'eas update --branch preview --message “try first updating” ’ excuted, I don’t see my app on my ios device udpated. (The ios app was installed through testflight.) Then I thought I might need to run the ‘eas build --platform ios’ again, but got the following errors (before the ‘eas update’ installation, this ‘eas build…’ was good)

WX20240213-004258@2x

Just updated to eas-cli@3.7.1, but I still get an error: image

This error is different than the one I was receiving this morning, which had the -36607 error code in the error string.

I’m on MacOS, Apple M1 Pro, running Ventura 13.2.1.

Hey @brentvatne - just another data point.

I ran into this issue this morning (and thought it was just me as I had to reset my Apple password so that further indicates Apple’s culpability here) and just now tried upgrading all CLI dependencies and ran into that issue.

Anything I can provide for you that may help or diagnose?

the fix that we deployed has resolved this issue for many folks, but not for everyone, it seems.

if you are using eas-cli@3.7.1 and this is not yet resolved for you, please give it some time before trying again, in case you are rate limited. in the url that was linked from the above error messages (https://support.apple.com/kb/HT212522) indicates that you need to wait.

you can work around this by:

  • running eas build -p ios --non-interactive to not prompt for authentication and instead just reuse your existing app signing credentials
% eas build -p ios --non-interactive

EAS Build is experiencing a partial outage.
Reason: Apple Developer authentication services through EAS CLI may be unavailable for some users
All information on service status and incidents available at https://status.expo.dev/.

✔ Using remote iOS credentials (Expo server)

Distribution Certificate is not validated for non-interactive builds.
Failed to set up credentials.
    Error: Credentials are not set up. Run this command again in
     interactive mode.
% eas -v
eas-cli/3.7.1 darwin-arm64 node-v18.14.2

Maybe it’s related to my specific environment, or I’m doing something wrong. When I select “no” when being asked to log in to my Apple account I get the question about my credentials again.

I think I fixed it, please pull the branch for https://github.com/expo/eas-cli/pull/1719 test it locally and let me know if it works!

Edit: My latest PR appears to definitively solve the -36607 error. Will merge and republish.

Working for me, thanks! 🚀

@EvanBacon i did what you told to do before testing but still getting this error ✖ Logging in... Authentication with Apple Developer Portal failed! Error: Apple Server Error: Unable to sign you in to your Apple ID. Try again later. The following support link is provided by Apple but it may not be relevant: Learn more.

Reopening until I can fully confirm that the issue is fixed.

I am getting this error too. As it previously worked without a cli version change, one assumes the issue is on the Apple/Expo auth side.

I believe this is a sit and wait for Expo to resolve now.

FWIW to others coming across this issue. Don’t keep trying, as it’ll lock your Apple account and you’ll have to reset your password.

Edit: Tagging @EvanBacon as he dealt with a similar previous issue.