Build ios failed

When I try to build ios release, I get this error: spawn C:\Windows\system32\bash.exe ENOENT after input apple id and password, any ideas?

I am using latest version of expo cli (47.3.7) and the error screen capture as below.

Make sure you have WSL on your windows machine enabled. See the expo build docs for the admin powershell command you can run.

Thank you for your reply.

After setting up WSL, the error goes away but it hangs at validating credentials…Is it because 2FA? Is 2FA supported in windows?

1 Like

It is supported on windows. What does hang mean? How long are you letting it run? (It should be relatively quick) (Please let it finish its work.)

I have simillar problem, I let it run for 3h and after that, I’ve ended process and got this:

[exp] Validating Credentials...
[exp] Error while gathering & validating credentials
[exp] {"pid":7528,"output":["W\u0000i\u0000n\u0000d\u0000o\u0000w\u0000s\u0000 \u0000S\u0000u\u0000b\u0000s\u0000y\u0000s\u0000t\u0000e\u0000m\u0000 \u0000f\u0000o\u0000r\u0000 \u0000L\u0000i\u0000n\u0000u\u0000x\u0000 \u0000h\u0000a\u0000s\u0000 \u0000n\u0000o\u0000 \u0000i\u0000n\u0000s\u0000t\u0000a\u0000l\u0000l\u0000e\u0000d\u0000 \u0000d\u0000i\u0000s\u0000t\u0000r\u0000i\u0000b\u0000u\u0000t\u0000i\u0000o\u0000n\u0000s\u0000.\u0000\r\u0000\r\u0000\n\u0000D\u0000i\u0000s\u0000t\u0000r\u0000i\u0000b\u0000u\u0000t\u0000i\u0000o\u0000n\u0000s\u0000 \u0000c\u0000a\u0000n\u0000 \u0000b\u0000e\u0000 \u0000i\u0000n\u0000s\u0000t\u0000a\u0000l\u0000l\u0000e\u0000d\u0000 \u0000b\u0000y\u0000 \u0000v\u0000i\u0000s\u0000i\u0000t\u0000i\u0000n\u0000g\u0000 \u0000t\u0000h\u0000e\u0000 \u0000W\u0000i\u0000n\u0000d\u0000o\u0000w\u0000s\u0000 \u0000S\u0000t\u0000o\u0000r\u0000e\u0000:\u0000\r\u0000\r\u0000\n\u0000h\u0000t\u0000t\u0000p\u0000s\u0000:\u0000/\u0000/\u0000a\u0000k\u0000a\u0000.\u0000m\u0000s\u0000/\u0000w\u0000s\u0000l\u0000s\u0000t\u0000o\u0000r\u0000e\u0000\r\u0000\r\u0000\n\u0000P\u0000r\u0000e\u0000s\u0000s\u0000 \u0000a\u0000n\u0000y\u0000 \u0000k\u0000e\u0000y\u0000 \u0000t\u0000o\u0000 \u0000c\u0000o\u0000n\u0000t\u0000i\u0000n\u0000u\u0000e\u0000.\u0000.\u0000.\u0000\r\u0000\r\u0000\n\u0000",""],"stdout":"W\u0000i\u0000n\u0000d\u0000o\u0000w\u0000s\u0000 \u0000S\u0000u\u0000b\u0000s\u0000y\u0000s\u0000t\u0000e\u0000m\u0000 \u0000f\u0000o\u0000r\u0000 \u0000L\u0000i\u0000n\u0000u\u0000x\u0000 \u0000h\u0000a\u0000s\u0000 \u0000n\u0000o\u0000 \u0000i\u0000n\u0000s\u0000t\u0000a\u0000l\u0000l\u0000e\u0000d\u0000 \u0000d\u0000i\u0000s\u0000t\u0000r\u0000i\u0000b\u0000u\u0000t\u0000i\u0000o\u0000n\u0000s\u0000.\u0000\r\u0000\r\u0000\n\u0000D\u0000i\u0000s\u0000t\u0000r\u0000i\u0000b\u0000u\u0000t\u0000i\u0000o\u0000n\u0000s\u0000 \u0000c\u0000a\u0000n\u0000 \u0000b\u0000e\u0000 \u0000i\u0000n\u0000s\u0000t\u0000a\u0000l\u0000l\u0000e\u0000d\u0000 \u0000b\u0000y\u0000 \u0000v\u0000i\u0000s\u0000i\u0000t\u0000i\u0000n\u0000g\u0000 \u0000t\u0000h\u0000e\u0000 \u0000W\u0000i\u0000n\u0000d\u0000o\u0000w\u0000s\u0000 \u0000S\u0000t\u0000o\u0000r\u0000e\u0000:\u0000\r\u0000\r\u0000\n\u0000h\u0000t\u0000t\u0000p\u0000s\u0000:\u0000/\u0000/\u0000a\u0000k\u0000a\u0000.\u0000m\u0000s\u0000/\u0000w\u0000s\u0000l\u0000s\u0000t\u0000o\u0000r\u0000e\u0000\r\u0000\r\u0000\n\u0000P\u0000r\u0000e\u0000s\u0000s\u0000 \u0000a\u0000n\u0000y\u0000 \u0000k\u0000e\u0000y\u0000 \u0000t\u0000o\u0000 \u0000c\u0000o\u0000n\u0000t\u0000i\u0000n\u0000u\u0000e\u0000.\u0000.\u0000.\u0000\r\u0000\r\u0000\n\u0000","stderr":"","status":4294967295,"signal":null}
[exp] Process exited with non-zero code: 4294967295
[exp] Error: Process exited with non-zero code: 4294967295
    at ChildProcess.child.on (C:\Users\Admin\AppData\Roaming\npm\node_modules\exp\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\Admin\AppData\Roaming\npm\node_modules\exp\node_modules\cross-spawn\lib\enoent.js:40:29)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:554:12)

@gieerzetka Your message says:

Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Windows Store:

Press any key to continue…

You need to enable WSL on your windows machine, see expo build docs for the command to invoke in an admin powershell.

I found this reply before BUT that link to Windows store do not work xD Anyway, I’ve endabled WSL and installed Ubuntu, can you provide link to docs you are talking about? I have followed this one: https://docs.expo.io/versions/latest/guides/building-standalone-apps.html

@gieerzetka Oh that’s my mistake, I thought docs with updated message were deployed but I see they didn’t.

In a admin powershell, run

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

And then you should have WSL enabled.

You can check in powershell if things are working:

bash.exe -c 'whoami'

done that, still nothing :frowning:

Please describe and maybe copy paste what the error is. Sometimes restarting the machine after enabling WSL like that in admin powershell helps.

Firstly, I’ve set debug mode on:

$env:EXPO_DEBUG = "true"

then simply:

exp build:ios -c

After monits I’ve entered Apple Id and password and

[exp] Validating Credentials...

diplays forever. no error, no freeze, no nothing ;-(
I’ve restared my pc after endabling WSL

exactly same here as @gieerzetka …:sob::sob:

I also tried input wrong credentials, still no difference

Are you sure you have WSL actually working? Even if you run the powershell admin command, you need to use the Linux distribution at least once.

Double check that everything is working correctly:

bash.exe -c 'uname'

that should work fine.

Regarding the hang, I am checking this now on my windows machine, please bear with me.

Thank you so much for your follow up!
I tried your bash command and it works fine.
I updated exp cli to latest 47.3.10, still not working, but the behave changed as attached and hanging

Yes, there is some windows behavior with files that is causing a hang I think. Fixing now, will release fix soon.

@meteoriteliu Can you upgrade to latest exp, I temporarily turned off some code that I think was causing the hang.

seems no difference… I waited for 5 min

Okay, I need to recreate my windows environment to be like yours. Thank you for your patience.

@meteoriteliu appreciate your patience, can you try again with latest exp?

latest exp (47.3.13) works fine! thanks!

2 Likes