34

I'm using EAS to build my Expo app, and today I started getting this error when attempting to run an iOS build, either local or on EAS servers. I'm thinking it's an issue with Apple servers, so I'm hoping it gets fixed soon.

Output from build command:

✔ Select platform › iOS
✔ 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 /Users/.../.app-store/auth/.../cookie
› Session expired Local session
› Using password for ... from your local Keychain
  Learn more
✔ Logged in New session
Authentication with Apple Developer Portal failed!
    Error: Cookie not in this host's domain. Cookie:developer-mdn.apple.com Request:developer.apple.com

Anyone else have this problem and have any ideas on how to resolve it?

I've tried removing the stored authentication cookie and signing in again. I also tried signing in on App Store Connect to see if there was any issue with my account but I couldn't find one.

Kollin Murphy
  • 395
  • 1
  • 3
  • 7

10 Answers10

33

Updating the eas-cli version to version 3.5.2 fixed the problem for me. Just run the command:

npm install -g eas-cli 

and it supposed to work

Dviros
  • 349
  • 2
  • 3
  • What's odd about this is that I had just installed eas-cli with that very command. Yet when I ran it, I noticed it was not the latest copy. So I ran the exact SAME command again, and it upgraded it to the latest version, at which point it worked. Go figure. – Boom King Jul 11 '23 at 02:13
5

I was getting the same error. I was able to start the build, after selecting no for the "Do you want to log in to your Apple account?" question. I hope this workaround works for you.

github issue https://github.com/expo/eas-cli/issues/1672#issuecomment-1416851869

Edit: As @Dviros pointed out above, run npm install -g eas-cli for a definitive solution.

cengaver
  • 302
  • 1
  • 2
  • 13
3

I started having this issue today too. There is old issue in github that seems to be related https://github.com/expo/eas-cli/issues/1220#issuecomment-1416834395 Looks like it just started happening again today.

3

I was able to work around the Apple sign in by using local credentials.

https://docs.expo.dev/app-signing/local-credentials/

By going to the Expo website I was able to download the distribution certificate and provisioning profile certificate. There was also a file that had the password needed to access the distribution certificate. Then I configured the production build profile in eas.json with

...
"ios": {
  "credentialsSource": "local"
},
...

And I created a credentials.json file with

{
  "ios": {
    "provisioningProfilePath": "relative/path/to/provisioning/profile.mobileprovision",
    "distributionCertificate": {
      "path": "relative/path/to/distribution/certificate.p12",
      "password": "<MYPASSWORD>"
    }
  }
}

Then building with the normal command, it no longer prompted me to sign in to Apple. Build worked like a charm!

Kollin Murphy
  • 395
  • 1
  • 3
  • 7
  • 1
    Thanks @kollin-murphy This worked for me. The direct link to download Apple dist cert p12 and provisioning profile is: https://developer.apple.com/account/resources/certificates/list – Adriaan Balt Feb 05 '23 at 13:13
2

This is now fixed by the expo team. In order for it to work, all you have to do is update to the latest eas-cli. This should do it:

npm i -g eas-cli

Then build or submit you application to iOS.

eas build --platform ios --auto-submit

Of course you can ignore the --auto-submit.

Or Nakash
  • 1,345
  • 1
  • 9
  • 22
1

I wont advise to put the password in a file, it's a dangerous practice. I guess the Expo EAS team will need to have a look and find a solution for all of us users.

Jonnary
  • 11
  • 1
  • As long as you don't commit it to your repository and add it to your .gitignore I don't think there's anything wrong with putting the password in a file. But I do agree that they need to fix this ASAP. – Kollin Murphy Feb 05 '23 at 16:01
1

The EXPO team created an incident on there status page regarding this issue: Apple authentication error renewing certificates/profiles for EAS Build

We are currently investigating an upstream issue authenticating with Apple to renew certificates/profiles when using EAS Build.

If you are using local credentials, if you're running a non-interactive build, or if you don't need to login to Apple because your certificates/profiles are up to date, then you are unaffected by this incident.

I hope they fix it soon!

0

use Transporter.

I got the same issue, but i solved it using transporter. I use eas build to upload it to expo server from there i download the app and upload it to Transporter.

Syed
  • 33
  • 12
0

Reinstalling eas-cli globally using npm i -g eas-cli did not fix this problem for me.

I was able to fix this by updating the eas-cli package in my local project.

Update your package.json to "eas-cli": "^3.5.2", and then run npm i to reinstall.

Dustin Spengler
  • 5,478
  • 4
  • 28
  • 36
0

when eas build --platform ios , it will ask , select no ✔ Do you want to log in to your Apple account? … no