eas-cli: `Authentication with Apple Developer Portal failed!`

Build/Submit details page URL

No response

Summary

I get the error

Authentication with Apple Developer Portal failed!
Cookie not in this host's domain. Cookie:developer-mdn.apple.com Request:developer.apple.com
    Error: build command failed.

when running eas build --profile preview --platform ios. this command worked successfully a few days ago

Managed or bare?

managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.2.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.0/bin/yarn
      npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
      Watchman: 2023.10.30.00 - /opt/homebrew/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    IDEs:
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      @expo/webpack-config: ^19.0.0 => 19.0.0 
      expo: ~49.0.15 => 49.0.18 
      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.6 => 0.19.9 
    npmGlobalPackages:
      eas-cli: 7.1.3
    Expo Workflow: managed
✔ 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 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

Authentication with Apple Developer Portal failed!
Cookie not in this host's domain. Cookie:developer-mdn.apple.com Request:developer.apple.com
Error: Cookie not in this host's domain. Cookie:developer-mdn.apple.com Request:developer.apple.com
    at M.setCookie (/Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:927590)
    at M.setCookie (/Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:697286)
    at /Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:894766
    at new Promise (<anonymous>)
    at /Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:894571
    at Object.apply (/Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:895502)
    at /Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:868909
    at Array.forEach (<anonymous>)
    at c (/Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:868881)
    at /Users/eric/.nvm/versions/node/v16.20.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:867223
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

Run

eas build --profile preview --platform ios

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 38
  • Comments: 86 (3 by maintainers)

Most upvoted comments

fixed in eas-cli@7.2.0 - please update to this version. there was a change on the apple api server side, and this new eas-cli version accounts for this change.

thanks, we will investigate this.

you can use eas build --non-interactive to skip the apple auth prompt and used stored app signing credentials to work around this issue for now.

i’ll lock the issue for now so that this comment is easily discoverable, and we’ll follow up shortly.

I had the same issue. Reinstalling eas-cli worked for me:

npm install -g eas-cli

what work for me and it’s so strange is

  • reinstall eas yarn global add eas-cli
  • remove it npm uninstall -g eas-cli
  • reinstall again yarn global add eas-cli

Might help someone

This didn’t work for me, however, I reinstalled npm global eas-cli:

npm uninstall -g eas-cli
npm install -g eas-cli

after that I just reinstalled node_modules and it worked for me

+1 having this issue too

npm uninstall -g eas-cli
npm install -g eas-cli

I was getting the same error. I ran npm install -g eas-cli and that fixed the issue

@brentvatne

fixed in eas-cli@7.2.0 - please update to this version. there was a change on the apple api server side, and this new eas-cli version accounts for this change.

I uninstalled eas-cli and reinstalled eas-cli@7.2.0 . Unfortunately I’m still getting the same error upon running eas build --profile staging --platform ios . Tried adding --clear-cache but it doesn’t help.

can you try eas --version what version it shows? also where eas

also try in eas file adding

  "cli": {
    "version": ">= 7.2.0",
  },

npm install -g eas-cli (to update eas-cli) in combination with this eas.json change resolved the issue for me

This is why I love expo, thank you for the fast work

npm uninstall -g eas-cli
npm install -g eas-cli

this is work for me .

what work for me and it’s so strange is

  • reinstall eas yarn global add eas-cli
  • remove it npm uninstall -g eas-cli
  • reinstall again yarn global add eas-cli

Might help someone

@brentvatne

fixed in eas-cli@7.2.0 - please update to this version. there was a change on the apple api server side, and this new eas-cli version accounts for this change.

I uninstalled eas-cli and reinstalled eas-cli@7.2.0 . Unfortunately I’m still getting the same error upon running eas build --profile staging --platform ios . Tried adding --clear-cache but it doesn’t help.

can you try eas --version what version it shows? also where eas

also try in eas file adding

  "cli": {
    "version": ">= 7.2.0",
  },

i fixed by updating eas.json

nvm use 18.17.1
npm install -g eas-cli
{
  "cli": {
    "version": "7.3.0"
  },

npm install -g eas-cli

helped!

Reinstall eas-cli worked for me

npm uninstall -g eas-cli
npm install -g eas-cli

This solved it for me.

Still not working after updating eas-cli@7.2.0 and specifying the version in eas.json file

I am still getting this error on version eas cli 7.3.0, Authentication with Apple Developer Portal failed! Apple provided the following error info: Service not available because of maintenance activities, please try again after some time. Error: build command failed.

I am still facing the same issue on eas-cli/7.3.0

PS D:\Projects\React Native> eas --version
eas-cli/7.3.0 win32-x64 node-v18.15.0 PS D:\Projects\React Native> eas build --profile production --platform ios Loaded “env” configuration for the “production” profile: no environment variables specified. Learn more: https://docs.expo.dev/build-reference/variables/ √ Using remote iOS credentials (Expo server)

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: … ************* › Restoring session C:\Users*.app-store\auth*******\cookie › Session expired Local session › The password is only used to authenticate with Apple and never stored on EAS servers Learn more: https://bit.ly/2VtGWhU √ Password (for ************): … *************** › Saving Apple ID password to the local Keychain Learn more: https://docs.expo.dev/distribution/security#keychain √ Logged in New session Authentication with Apple Developer Portal failed! Apple provided the following error info: Service not available because of maintenance activities, please try again after some time. Error: build command failed.

Updating the cli is confirmed working on my end.

Uninstalling & re installing eas-cli (thus installing version 7.3) worked for me too.

npm install -g eas-cli Run this and the cli will be upgraded to 7.3 and that will fix the issue.

Reinstall eas-cli worked for me

npm uninstall -g eas-cli
npm install -g eas-cli

I just upgraded to the latest version of the CLI and the problem seems to be solved. Thanks!!!

@brentvatne

fixed in eas-cli@7.2.0 - please update to this version. there was a change on the apple api server side, and this new eas-cli version accounts for this change.

I uninstalled eas-cli and reinstalled eas-cli@7.2.0 . Unfortunately I’m still getting the same error upon running eas build --profile staging --platform ios . Tried adding --clear-cache but it doesn’t help.

can you try eas --version what version it shows? also where eas also try in eas file adding

  "cli": {
    "version": ">= 7.2.0",
  },

npm install -g eas-cli (to update eas-cli) in combination with this eas.json change resolved the issue for me

I can confirm this worked for me.

eas 7.2.0 is working for me!

My version of eas-cli wasn’t updating due to using nvm to manage multiple Node versions:

% which eas
/Users/current/.nvm/versions/node/v16.17.0/bin/eas

% node -v
v20.10.0

% nvm use v20.10.0
Now using node v20.10.0 (npm v10.2.3)

% which eas
/Users/current/.nvm/versions/node/v20.10.0/bin/eas

% npm install -g eas-cli
changed 408 packages in 5s

38 packages are looking for funding
  run `npm fund` for details
  
% eas -v
eas-cli/7.2.0 darwin-arm64 node-v20.10.0

Make sure you are installing eas-cli while using the correct Node version.

Same

I updated eas-cli again and it’s working now.