expo build:ios -c error!

Hello! I am running expo on a PC with Windows 10! I am able to successfully build Android APKs and used to successfully build iPhone IPAs but am recently running into build issues for iOS. All my previous (successful) iOS builds were with expo-cli 2.6.14 and I upgraded to expo-cli 2.11.7 recently. As the transcripts below show, both my 2.11.7 and 2.6.14 iOS builds are running into issues! I seem to proceed a little further with 2.6.14 but it throws a status code 400 error before quitting.

I have checked that “Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux” is set per instructions.

I need help, please, on what to try next! Thank you!

The following transcripts are generated with EXPO_DEBUG set to true.

With expo-cli 2.11.7

$ expo build:ios -c

Checking if there is a build in progress…

Removed existing credentials from expo servers

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: …my_appleID_here…

? Password (for …my_appleID_here…): [hidden]

  • Trying to authenticate with Apple Developer Portal…?[2K?[1G?[?25h?[31m×?[39m Authentication with Apple Developer Portal failed!

?[31mProcess exited with non-zero code: 127?[39m

?[31m?[90mError: Process exited with non-zero code: 127?[31m?[39m

?[31m?[90m at ChildProcess.child.on (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\build\spawnAsync.js:39:21)?[31m?[39m

?[31m?[90m at ChildProcess.emit (events.js:182:13)?[31m?[39m

?[31m?[90m at ChildProcess.cp.emit (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:40:29)?[31m?[39m

?[31m?[90m at maybeClose (internal/child_process.js:962:16)?[31m?[39m

?[31m?[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)?[31m?[39m

?[?25h

After downgrading to expo-cli 2.6.14 (which used to successfully build before in previous versions):

$ expo build:ios -c

There is a new version of expo-cli available (2.11.7).

You are currently using expo-cli 2.6.14

Run npm install -g expo-cli to get the latest version

[07:52:19] Making sure project is set up correctly…

[07:52:21] Your project looks good!

[07:52:21] Checking if current build exists…

[07:52:22] Did you know that Expo provides over-the-air updates?

[07:52:22] Did you know that Expo provides over-the-air updates?Please see the docs (https://docs.expo.io/versions/latest/guides/configuring-ota-updates) and check if you can use them instead of building your app binaries again.

[07:52:22] No currently active or previous builds for this project.

[07:52:22] Removed existing credentials from expo servers

[07:52:22] If you get errors about

‘Maximum number of certificates generated’ or ‘duplicate profiles’

then consider using the flags --revoke-apple-dist-certs, --revoke-apple-push-certs,

and --revoke-apple-provisioning-profile or go to developer.apple.com

and revoke those credentials manually

[07:52:22] We do not have some credentials for you, pushP12,pushPassword,provisioningProfile,certP12,certPassword

? How would you like to upload your credentials?

I will provide all the credentials and files needed, Expo does limited validation

We need your Apple ID/password to ensure the correct teamID and appID

Note: Expo does not keep your Apple ID or your Apple password.

? What’s your Apple ID? …my_appleID_here…

? Password? [hidden]

[07:53:20] Validating Credentials…

[07:53:20] Running: bash.exe -c PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin "/mnt/c/Users/Surven/AppData/Roaming/npm/node_modules/expo-cli/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.6.2-linux-x86_64/validate_apple_credentials" "…my_appleID_here… xxxx-xxxx-xxxx-xxxx"

[07:53:24] Only 1 team associated with your account, using Team ID: DMLWGBX88X

[07:53:24] Running: bash.exe -c PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin "/mnt/c/Users/Surven/AppData/Roaming/npm/node_modules/expo-cli/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.6.2-linux-x86_64/app_management" "verify …my_appleID_here… xxxx-xxxx-xxxx-xxxx DMLWGBX88X com.easyiotsolutions.expoLawnManagement @surven/expoLawnManagement false"

[07:53:27]

WARNING! In this mode, we won’t be able to make sure your certificates,

or provisioning profile are valid. Please double check that you’re

uploading valid files for your app otherwise you may encounter strange errors!

Make sure you’ve created your app ID on the developer portal, that your app ID

is in app.json as bundleIdentifier, and that the provisioning profile you

upload matches that team ID and app ID.

[07:53:27] Please provide the path to your push notification cert P12

? Path to P12 file: C:\Users\Surven\Documents\reactnative\EXPOLAWN\packageExpoLawnManagement190308\aps.p12

? P12 password: [hidden]

[07:53:52] Please provide the path to your .mobile provisioning profile

? Path to your .mobile provisioning Profile C:\Users\Surven\Documents\reactnative\EXPOLAWN\packageExpoLawnManagement190308\JointProfile.mobileprovision

[07:54:08] Please provide your distribution certificate P12:

? Path to P12 file: C:\Users\Surven\Documents\reactnative\EXPOLAWN\packageExpoLawnManagement190308\ios_distribution.p12

? P12 password: [hidden]

[07:54:35] Error while gathering & validating credentials

[07:54:35] Error: Request failed with status code 400

[07:54:35] Request failed with status code 400

[07:54:35] Error: Request failed with status code 400

at createError (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\core\createError.js:16:15)

at settle (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\core\settle.js:17:12)

at IncomingMessage.handleStreamEnd (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\adapters\http.js:236:11)

at IncomingMessage.emit (events.js:187:15)

at endReadableNT (_stream_readable.js:1094:12)

at process._tickCallback (internal/process/next_tick.js:63:19)

Hey @surven,

Can you go to your Apple Developer Portal and check and see if the certs are getting deleted? If not, manually delete them and see if that resolves the issue.

Cheers,
Adam

Thanks, @adamjnav! I did manually revoke the (1) iOS Distribution and (2) Apple Push Services certs but that did not solve the problem. Below is the transcript for reference. It doesn’t even want to get to the point where it asks me for the .p12 files and exits after it takes my Apple ID and password.

$ expo build:ios -c
┌─────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (2.11.8). │
│ You are currently using expo-cli 2.11.7 │
│ Run npm install -g expo-cli to get the latest version │
│ │
└─────────────────────────────────────────────────────────────┘
Checking if there is a build in progress…

Removed existing credentials from expo servers
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: …my_appleID_here…
? Password (for …my_appleID_here…): [hidden]

  • Trying to authenticate with Apple Developer Portal…?[2K?[1G?[36m?[39m Trying to authenticate with Apple Developer Portal…?[2K?[1G?[?25h?[31m×?[39m Authentication with Apple Developer Portal failed!
    ?[31mProcess exited with non-zero code: 127?[39m
    ?[31m?[90mError: Process exited with non-zero code: 127?[31m?[39m
    ?[31m?[90m at ChildProcess.child.on (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\build\spawnAsync.js:39:21)?[31m?[39m
    ?[31m?[90m at ChildProcess.emit (events.js:182:13)?[31m?[39m
    ?[31m?[90m at ChildProcess.cp.emit (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:40:29)?[31m?[39m
    ?[31m?[90m at maybeClose (internal/child_process.js:962:16)?[31m?[39m
    ?[31m?[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)?[31m?[39m
    ?[?25h

Any thoughts or suggestions on how to proceed? Wondering if this is related to some of the other expo build:ios errors being posted on this forum.

I did attempt a rollback to version 2.6.14 of expo-cli. The build process seems to take a few more steps with this version (like asking for the .p12 and mobile provisioning files) before quitting with the error messages below:

[15:12:20] Error while gathering & validating credentials
[15:12:20] Error: Request failed with status code 400
[15:12:20] Request failed with status code 400
[15:12:20] Error: Request failed with status code 400
at createError (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\Surven\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\adapters\http.js:236:11)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

Thanks!

@adamjnav, any insights/suggestions/recommendations on next steps to try? I did update expo-cli to the latest 2.11.9 level and am still running into the same blockages. Pretty much dead in the water not knowing how to proceed. Thanks for any help/pointers!

@adamjnav

Having exactly the same problem.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Path :
Online : True
RestartNeeded : False

Have run ubuntu.

expo diagnostics

Expo CLI 2.11.9 environment info:
System:
OS: Windows 10
Binaries:
Yarn: 1.13.0 - C:\Users\xxx\AppData\Roaming\npm\yarn.CMD
npm: 6.8.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842

expo build:ios
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: xxx@xxx.com
? Password (for xxx@xxx.com): [hidden]
Trying to authenticate with Apple Developer Portal…
Authentication with Apple Developer Portal failed!
Process exited with non-zero code: 127
Error: Process exited with non-zero code: 127
at ChildProcess.child.on (C:\Users\xxx\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\build\spawnAsync.js:39:21)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at ChildProcess.cp.emit (C:\Users\xxx\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

1 Like

Hi @jreason, I have been able to make some progress after my cry for help on March 15th.

I personally did notice a difference in message output between the git bash terminal I was initially running my build command on and a Windows 10 command prompt C:. For good measure, I also ran the expo build command in a Bash (WSL), and separately, from within a Windows PowerShell. My recollection is that Bash, PowerShell, and C:\ seemed to proceed past the point of authentication with Apple Developer Portal and the output messages between these three terminals were consistent (please see my other post on this topic of preferred terminals - What is the preferred terminal for "expo build" on Windows 10 - #3 by surven).

Once I successfully got beyond the point of authentication with Apple Developer Portal, my builds were initially failing with credentials that I set up on my own. I have had successful builds before with my own credentials, so I don’t think the problem was there, but I suspect that the expo code has changed since the 2.6.14 version on which I had those builds.

I was able to get a successful build only after having expo generate the credentials automatically. In the past I have avoided the Apple TestFlight based testing process (because of the added complexities) to get my code to run on my iPhone but was pushed to learn it, since there seemed to be no other way out.

Hope this experience helps you in some way.

Best wishes!

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