How can i build ios app with another apple account?

Hi all, i got an issue while running “expo build:ios” command as below:

Trying to authenticate with Apple Developer Portal…
Available session is not valid any more. Continuing with normal login.
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.”

Before i got the issue, i switched my apple account from “A” to “B” and run the command expo build:ios -c to clear the previous apple account.

Thank you so much for any help!

Hey @thongleduy, could you please run expo diagnostics and paste the log that is printed out here?

Cheers,
Adam

hi adamjnav!

The log is below, i have tried to upgrade expo-cli to 3.5.0. Before it’s 2.17.x

Expo CLI 3.5.0 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.1 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
expo: ^33.0.0 => 33.0.7
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8
react-navigation: ^3.11.0 => 3.11.0
npmGlobalPackages:
expo-cli: 3.5.0

=========================

After i upgrade expo-cli, the error was no longer. But i got another message:

Two-factor Authentication (6 digits code) is enabled for account ‘admin@kkfashion.vn’
More information about Two-factor Authentication: Two-factor authentication for Apple ID - Apple Support

If you’re running this in a non-interactive session (e.g. server or CI)
check out fastlane/spaceship at master · fastlane/fastlane · GitHub

(Input sms to escape this prompt and select a trusted phone number to send the code as a text message)

(You can also set the environment variable SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER to automate this)
(Read more at: fastlane/Authentication.md at master · fastlane/fastlane · GitHub)

Please enter the 6 digit code:

Was this an issue from server?

Hey @thongleduy,

This was caused by Apple disabling one of their endpoints that FastLane uses. We fixed it by upgrading FastLane versions (since the new version no longer hits that endpoint) and rolling out a new turtle builder.

Cheers,
Adam

Thank you so much for your support @adamjmav!

I tried to upgraded expo-cli and changed apple authetication to two-factor authentication method. This resolved my issue! Thank you again!

Vào Th 6, 22 thg 11, 2019 lúc 00:21 Adam Navarro via Forums expo@discoursemail.com đã viết:

1 Like

If you don’t see an option to create a new Apple ID, you are signed in to the App Store, iTunes Store, Apple Books, or iCloud with an existing Apple ID.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.