Can't Authenticate with Apple Developer Portal, code: 126 (build:ios)

I can’t get the expo build:ios command to work. Powershell displays this error:

Authentication with Apple Developer Portal failed!
bash exited with non-zero code: 126

Here’s a couple of steps I’ve tried to solve the issue:

  • confirmed WLS is enabled and ran Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux in the powershell, and installed ubuntu (and rebooted twice so that ubuntu works when I open the app).

  • confirmed that I can sign into the Apple Developer website as normal and that my username & password are correct when I enter it into the command line

  • updated node and made sure I was using the latest Expo CLI (3.15.4) to avoid the 2FA issue people are having (since Apple won’t let you disable 2FA)

  • scoured the forums here and elsewhere for help, to no avail

expo diagnostics:

Expo CLI 3.15.4 environment info: System: OS: Windows 10 10.0.18362 Binaries: Node: 13.11.0 - D:\node.EXE npm: 6.14.2 - D:\npm.CMD npmPackages: expo: ~36.0.0 => 36.0.2 react: ~16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4 react-navigation: ^4.2.1 => 4.2.1

Please, I’m desperate to fix this problem.

NOTE: I should also mention that I’ve already been able to publish to expo just fine, it’s just building with ios and getting past the Apple Developer Portal that’s my main issue. If there is a way around this, please let me know.

UPDATE: I moved my project to my other windows computer and installed a fresh copy of node, git, and the expo cli. I also updated ubuntu according to this link and now I’m getting error code 127 instead of 126. Going to check the forums again but it feels related to a grander issue I haven’t figured out yet.

Have you tried running powershell as administrator?

Simplest solution would be to do that on mac os. You’ll need it either way to upload ipa to App Store.

This doesn’t make sense, otherwise it’s pointless using expo. Having the same problem here

Hi. It looks like you have the Windows version of node and npm instead of the Linux versions. Since you’ve installed WSL, I think what you want is the Linux versions, and run expo build:ios from Bash.

2 Likes

That is actually the problem. In programs and features you enable WSL. Then from the store, expo recommends you to use WSL ubuntu, install it then you’re good to go.

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