-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios, new arch] RN 0.72.0rc5 : React-RCTAppDelegate => Command PhaseScriptExecution failed with a nonzero exit code #37762
Comments
Could you share your build log? |
Here is the end of the log, let me know if you need the full thing....
|
Attached the full log just in case... |
@cipolleschi @kelset ping if this is a release blocker or not |
thanks for the report, I think that since it's new arch specific we might not consider it 0.72.0 release blocker but worth looking into |
It does make using the new architecture basically impossible on a newer model mac... |
I'm not saying we won't ever fix it - just that the fix can wait 0.72.1 |
Thanks @ajpaulingalls for the full log. I'll look into this later today. I always test the new arch and last Thursday, when we released RC.5, it was working, so I'm a bit confused here. We: have you also tried to disable Hermes? If yes, does the failure remain? Nit: you don't need to use the USE_HERMES flag, as that's is the default! 😉 |
Just tried on my machine, and it works seamlessly, Apple M1 Pro. The reason why it is failing on your specific machine is:
Specifically:
This script tries to update a file in the @cortinico @kelset can I pick your brain too to brainstorm what may be going on? 🤔 |
This really feels a local issue to me. @ajpaulingalls could you try on a fresh setup, like in a different folder? |
Actually, this #37802 could solve the issue. |
OK, I dug into this some more. tldr; I was installing watchman at roughly the same time with brew, and I'm guessing brew decided it would be a good idea to update my other packages, which included node. So even though node was there, I'm guessing it had problems launching. I had previously been working on my intel mac with no problems, but moved to my m1 to make sure all was ok. I noticed I didn't have watchman, so I kicked off the install with brew, then updated my project and tried to pod install, resulting in the error. So I tried some more, googled around a bit, and overall couldn't find what was up. Then I tried with a clean project from init, with the same result so I filed the bug. However, during this process watchman was still installing. I believe what happened was that brew decided to upgrade all of the other packages on my mac (is this the default now?). One of those packages was node. So even though node was there, I'm guessing it couldn't launch properly. At any rate, when I try in a new folder today, the pod install works and the scripts run. Sorry for the runaround. Appreciate all you guys do! |
waitting to resovle |
@memosize this has been solved already. Can you be more specific with your problem? |
|
I've just bumped into this issue with RN@0.72.1 The Warning in the beginning of the screenshot makes me guess that it actually fails to detect the correct string for node executable command, gets an empty string instead of it, and thus instead of I actually have And... I am still using an Intel Mac, and I have Node installed via NVM, and it seems that something between NVM and XCode broke on my system, and it was highlighted by that script failing. The solution that works for me: |
The same error occurred in the latest version(0.72.1) with RCT_NEW_ARCH_ENABLED=1 |
I am facing the same issue in m1 mac |
does it happens also if you put the actual path in the
you actually have
basically, you can run |
I guess it does not happen then; but it is a bad option, say for a public example app, which should work on other ppl's machine, who will have their node at different paths. |
Yes, I should have added why I make this ask. 😅
So, even your system have |
Following your steps, my machine is already functioning properly |
Your solution works, thanks !! But it leads to another question, why |
I haven't dug into it recently, but basically Xcode looks for env vars in specific paths. Also, before each script exec, it export a bunch of environment variables, which can also clash with the current setup. Unfortunately, it is kind of a known issue, you can find other people asking how to have Xcode recognise those variables online, but there is no clear explanation why it doesn't pick them up automatically. |
It's weird that when I disable New architecture, the node env path was picked correctly |
Uhm... I don't think it does. When disabling the new architecture, that script is not executed as the interop layer is needed only for the new arch. |
Your solution works, thanks !! |
you should be also able to create
cd ios
touch .xcode.env.local
echo export NODE_BINARY=$(command -v node) > .xcode.env.local |
Description
When you create a new app using the latest RC for 0.72 and then install pods for new architecture, then the xcode build will fail in React-RCTAppDelegate with Command PhaseScriptExecution failed with a nonzero exit code.
React Native Version
0.72.0.rc5
Output of
npx react-native info
Steps to reproduce
Open the xcode workspace and hit build.
Snack, code example, screenshot, or link to a repository
You can just use the starter app with no code changes.
The text was updated successfully, but these errors were encountered: