Authentication with Apple Developer Portal failed! Unauthorized Access

I cannot build App for Apple Enterprise using the following command:

expo build:ios -c

After entering apple id and password, it asks for 6 digit code. Here is output from my console with links removed…

Checking if there is a build in progress…

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: AppDevelopment@mycompany.com
? Password (for AppDevelopment@mycompany.com): [hidden]
Trying to authenticate with Apple Developer Portal…
Available session is not valid any more. Continuing with normal login.
Two-factor Authentication (6 digits code) is enabled for account ‘AppDevelopment@mycompany.com’
More information about Two-factor Authentication: ***

If you’re running this in a non-interactive session (e.g. server or CI)
check out github***/fastlane/fastlane/tree/master/spaceship#2-step-verification

(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: ***

Please enter the 6 digit code:
877911
Requesting session…
Authentication with Apple Developer Portal failed!
Reason: Unknown reason, raw: “Unauthorized Access”
Error: Reason: Unknown reason, raw: “Unauthorized Access”
at runAction (C:\expo-cli@3.11.3\src\appleApi\fastlane.ts:28:17)
at processTicksAndRejections (internal/process/task_queues.js:88:5)
at Object.authenticate (C:\expo-cli@3.11.3\src\appleApi\authenticate.ts:46:40)
at IOSBuilder.getAppleCtx (C:\expo-cli@3.11.3\src\commands\build\ios\IOSBuilder.js:47:23)
at IOSBuilder.produceMissingCredentials (C:\expo-cli@3.11.3\src\commands\build\ios\IOSBuilder.js:123:22)
at IOSBuilder.prepareCredentials (C:\expo-cli@3.11.3\src\commands\build\ios\IOSBuilder.js:65:7)
at IOSBuilder.run (C:\expo-cli@3.11.3\src\commands\build\ios\IOSBuilder.js:19:7)
at IOSBuilder.command (C:\expo-cli@3.11.3\src\commands\build\BaseBuilder.js:55:7)
at Command. (C:\expo-cli@3.11.3\src\exp.ts:81:7)

Apple immedietly sends a second 6 digit code after this error, but at this point it has exited and I cannot enter the second one.

I have tried this a few times and am sure that the 6 digit code is correct. I have also tried on windows and mac with same result.

My expo setup is the following:

Expo CLI 3.11.3 environment info:
System:
OS: Windows 10
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338

Is anyone able to help solve this issue?

Kind Regards
Peter

1 Like

Hi- it looks from this github issue that you probably need to accept some new agreements in itunes connect, and then it will start working again

1 Like

Thanks for the related thread above, I tried signing into https://itunesconnect.apple.com/ There does not seem to be any prompts or outstanding agreements to accept. My developer account seems complete with nothing outstanding that I can see. I’m still experiencing this issue. Any other ideas are welcome.

I’m having a similar issue, did you work out a fix?

? What’s your Apple ID? ***********
? Password? [hidden]
Downloading build
Downloading [=============================================================================================================================================================================] 100% 0.0s
Resolving the ITC team ID…
Available session is not valid any more. Continuing with normal login.
Failed to upload the standalone app to the app store.
SSL_connect returned=1 errno=0 state=error: certificate verify failed

Which command did you run? It looks like its trying to upload to app store and its complaining about a certificate. No luck on my side even after upgrading to expo-cli 3.11.7.

This is on expo upload:ios. I am currently using Apple Transport App as a work around: ‎Transporter on the Mac App Store

2 Likes

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