-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
React native ios: Showing Recent Errors Only Command PhaseScriptExecution failed with a nonzero exit code #41617
Comments
|
|
I ran into this too, when I upgraded to Sonoma and XCode 15. I can get my project working in an iPhone simulator but it throws this error on a real device. Nightmare. |
I managed to solve it. In my case it was my version of Node 21.2.0 not having access to openSSL (I have no clue what it is/does but it's legacy now). In XCode under Build Phases => Bundle React Native code and images, I added an additional export with a flag for openssl-legacy-provider:
After this, I was able to build and archive with XCode normally. 🥳 EDIT: to get it working in the simulator with
UPDATED: The above eventually failed to work in dev, instead I now run the metro server via npm script in my package.json, and install onto the physical Android device afterward. Seems to work for me: "scripts": {
"1. start-metro-server": "export NODE_OPTIONS=--openssl-legacy-provider && react-native start",
"2. android": "react-native run-android"
} |
Click properties on the project, go to build phases and check the option |
Hi @mohreRohan1. Also, from the image, the script is owned by Expo, not by React Native core, as you can see by the string:
Can you open an issue in their repo? They will be better equipped to help you. |
I was facing similar issue. In my case it was happening since my machine was having 2 node versions installed. Following anwser helped me resolve this issue: |
@mohreRohan1 |
This commit fixed it for me: (rn 0.73.0) I was getting this back:
The Worth mentioning that the build error was happening only when building on real device, on simulator the build has no issues. |
I replaced the entire for with a new command to get local IP of ethernet address without need to run through a loop, and worked fine to me. IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | head -1 | awk '{ print $2 }')
# for num in 0 1 2 3 4 5 6 7 8; do
# IP=$(ipconfig getifaddr en${num})
# if [ ! -z "$IP" ]; then
# break
# fi
# done |
Thanks very much for the info! got mine fixed right away 👍 |
@tonyjohnvan Thanks for reporting this. We have a pick request process for 0.73 in this discussion. This time, I added the pick request myself, in this message. Feel free to submit a pick request directly, next time! :D |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Description
I am getting below issue while buuilding react native project from xcode:
tried removing the podfile.lock, Pods folder and did 'pod install' as well, but no luck.
Also, when i am running the application from terminal using the command 'npx react-native run-ios', getting below error:
React Native Version
"react-native": "0.72.4",
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.6
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Memory: 866.93 MB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 20.8.0
path: /usr/local/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 9.8.1
path: /usr/local/bin/npm
Watchman:
version: 2023.10.02.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/admin/.rvm/gems/ruby-3.2.1/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK:
API Levels:
- "30"
- "33"
- "34"
Build Tools:
- 29.0.2
- 30.0.2
- 30.0.3
- 33.0.0
- 33.0.1
- 34.0.0
System Images:
- android-31 | Google Play Intel x86_64 Atom
- android-33 | ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-34 | Google APIs Intel x86_64 Atom
- android-TiramisuPrivacySandbox | Google Play Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.6
path: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/javac
Ruby:
version: 3.2.2
path: /usr/local/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: ^18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: Not found
Steps to reproduce
run 'npx react-native run-ios'
and
build from xcode
Snack, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: