Authentication Will Apple Developer Portal failed!


I have a expo project set up with my Apple developer account. I’ve done all the testing with my Apple Developer Account including building the .ipa file with expo build:ios. Everything works fine

Now I need to upload the .ipa file to (my client’s apple developer account) so that the app can be uploaded to Apps Store under his account. Whenever I try to run expo build:ios and put the credentials for my client’s account I get the following output:

Please enter your Apple Developer Program account credentials. These credentials are needed to manage certificates, keys and provisioning profiles in your Apple Developer account.

The password is only used to authenticate with Apple and never stored.
? Apple ID:
? Password (for [hidden]
Trying to authenticate with Apple Developer Portal…
getaddrinfo: nodename nor servname provided, or not known
Authentication with Apple Developer Portal failed!
Reason: Unknown reason, raw: “Could not receive latest API key from App Store Connect, this might be a server issue.”
Error: Reason: Unknown reason, raw: “Could not receive latest API key from App Store Connect, this might be a server issue.”
at runAction (/expo-cli@3.0.10/src/commands/build/ios/appleApi/fastlane.js:24:17)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at Object.authenticate (/expo-cli@3.0.10/src/commands/build/ios/appleApi/authenticate.js:15:40)
at IOSBuilder.getAppleCtx (/expo-cli@3.0.10/src/commands/build/ios/IOSBuilder.js:47:24)
at IOSBuilder.produceMissingCredentials (/expo-cli@3.0.10/src/commands/build/ios/IOSBuilder.js:122:22)
at IOSBuilder.prepareCredentials (/expo-cli@3.0.10/src/commands/build/ios/IOSBuilder.js:65:7)
at (/expo-cli@3.0.10/src/commands/build/ios/IOSBuilder.js:19:7)
at IOSBuilder.command (/expo-cli@3.0.10/src/commands/build/BaseBuilder.js:54:7)

Any help is appreciated.

Are you using a Mac or a PC when using the command line?

@netcheese I’m using a Mac.

I am suddenly having this same issue as well. I am on windows.

I followed the expo build guide and I’ve built this iOS app using this computer before. My certificates expired so I deleted them and ran ‘expo build:ios -c’ to try to have expo generate them again but no luck connecting. I’m assuming it has something to do with the old certs but so far no luck in further tracking it down.

In my case I’m guessing expo:build ios failed because the developer accoun I was using has 2FA, and (maybe I’m mistaken) but expo-cli 3.0.10 doesn’t seem to have a way to input the code sent for 2FA?

So for fun I ended up ejecting my project in a new branch and used fastlane to push to App Store with developer account mentioned and it prompted me with the 2FA authentication code in order to continue, so that’s how I figured out why expo was failing in running expo:build ios.