Skip to content
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 fails to start on Apple Chip M2 with macOS Monterey 12.4 #36834

Closed
georgeka98 opened this issue Apr 6, 2023 · 17 comments
Closed
Labels
Needs: Attention Issues where the author has responded to feedback. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@georgeka98
Copy link

georgeka98 commented Apr 6, 2023

Description

Hi,

I currently need to build an app and I chose RN in order to work on cross platform (iOS and Android). I never had issues before working with RN before upgrading to the Apple M series chipset.

I followed some commands to install all the packages needed to start working on my app following this guide, but I am getting the following error after running npx react-native run-ios.

Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AwesomeApp.xcodeproj.

I have tried multiple solutions from other "open issues", but I couldn't manage to resolve the issue and I would get even more issues by following some proposed solutions from other GitHub users.

Here are my versions:

  • npm: 9.5.1
  • node: v19.8.1
  • pod: 1.12.0
  • gem: 3.0.3.1
  • react-native: 0.71.6
  • npx: 9.5.1
  • Brew: Homebrew 4.0.10-dirty

My computer specs:

  • macOS Monterey: 12.4
  • Chipset: Apple M2

I was wondering if anyone has any suggestions on how I can fix this error. Are there any issues with the versions of the packages?

React Native Version

0.71.6

Output of npx react-native info

System:
OS: macOS 12.4
CPU: (8) arm64 Apple M2
Memory: 598.59 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.8.1 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.5.1 - /opt/homebrew/bin/npm
Watchman: 2023.03.27.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 19.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.6 => 0.71.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  • sudo gem install -n /usr/local/bin ffi cocoapods
  • npx react-native init MyProject
  • cd MyProject
  • npm start

(open another Terminal window in the MyProject directory)

  • npm run ios

Snack, code example, screenshot, or link to a repository

https://github.com/georgeka98/react-native-issue.git

@github-actions github-actions bot added the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label Apr 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 6, 2023

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@cortinico
Copy link
Contributor

10.2.2

There is no React Native 10.2.2. Can you clarify whihc version you're using?

@georgeka98
Copy link
Author

Hi cortinico, sorry my bad. My React Native version is "0.71.6".

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Apr 6, 2023
@cortinico
Copy link
Contributor

Can you share the full build log?

@georgeka98
Copy link
Author

georgeka98 commented Apr 6, 2023

georgeka@Georges-MBP awesomeProject % npm run ios

> awesomeProject@0.0.1 ios
> react-native run-ios

warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info Found Xcode project "awesomeProject.xcodeproj"
info No booted devices or simulators found. Launching first available simulator...
info Launching iPhone 8 (iOS 15.5)
info Building (using "xcodebuild -project awesomeProject.xcodeproj -configuration Debug -scheme awesomeProject -destination id=B71A5245-1523-4950-88FD-A6CF04B0917A")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening awesomeProject.xcodeproj.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project awesomeProject.xcodeproj -configuration Debug -scheme awesomeProject -destination id=B71A5245-1523-4950-88FD-A6CF04B0917A

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Planning
Analyze workspace

Create build description
Build description signature: c5c98438717a011bb7252c7724cc193c
Build description path: /Users/georgeka/Library/Developer/Xcode/DerivedData/awesomeProject-aphdmpvjivdwhsaccwvsdmcudwlm/Build/Intermediates.noindex/XCBuildData/c5c98438717a011bb7252c7724cc193c-desc.xcbuild

note: Build preparation complete
note: Building targets in dependency order
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-frameworks-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-resources-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-frameworks-Debug-input-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-resources-Debug-input-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-frameworks-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-resources-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')

2023-04-06 20:41:17.549 xcodebuild[26938:523686] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2023-04-06 20:41:17.550 xcodebuild[26938:523686] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **


info Run CLI with --verbose flag for more details.

@khosrora
Copy link

khosrora commented Apr 6, 2023

I have the same problem on mac air m2 .
I installed with this tutorial : https://www.youtube.com/watch?v=MJEcookWYUI

@blakef
Copy link
Contributor

blakef commented Apr 6, 2023

It looks like something funky is going in your app/awesomeProject/ios/Pods.

@blakef blakef removed the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label Apr 6, 2023
@georgeka98
Copy link
Author

Hi @blakef

Unfortunately, I don't have a Pods directory, so I couldn't follow your first suggestion.

Screen Shot 2023-04-07 at 8 16 31 PM

Your second suggestion to follow the instructions from the link you provided to me worked by opening the app. However, I am getting the following error after the app opened.

Screen Shot 2023-04-07 at 8 20 02 PM

@georgeka98
Copy link
Author

Anyone available? I am still getting the following error when I run the command npm run ios.

Here's my log:

georgeka@Georges-MacBook-Pro awesomeProject % npm run ios

> awesomeProject@0.0.1 ios
> react-native run-ios

warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info Found Xcode project "awesomeProject.xcodeproj"
info No booted devices or simulators found. Launching first available simulator...
info Launching iPhone 8 (iOS 15.5)
info Building (using "xcodebuild -project awesomeProject.xcodeproj -configuration Debug -scheme awesomeProject -destination id=B71A5245-1523-4950-88FD-A6CF04B0917A")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening awesomeProject.xcodeproj.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project awesomeProject.xcodeproj -configuration Debug -scheme awesomeProject -destination id=B71A5245-1523-4950-88FD-A6CF04B0917A

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Planning
Analyze workspace

Create build description
Build description signature: c5c98438717a011bb7252c7724cc193c
Build description path: /Users/georgeka/Library/Developer/Xcode/DerivedData/awesomeProject-aphdmpvjivdwhsaccwvsdmcudwlm/Build/Intermediates.noindex/XCBuildData/c5c98438717a011bb7252c7724cc193c-desc.xcbuild

note: Build preparation complete
note: Building targets in dependency order
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
/Users/georgeka/Sites/ingridients waste reduction app/awesomeProject/ios/Pods/Target Support Files/Pods-awesomeProject/Pods-awesomeProject.debug.xcconfig:1:1: error: unable to open file (in target "awesomeProject" in project "awesomeProject")
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-resources-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-frameworks-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-frameworks-Debug-input-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-frameworks-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-resources-Debug-input-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')
error: Unable to load contents of file list: '/Target Support Files/Pods-awesomeProject/Pods-awesomeProject-resources-Debug-output-files.xcfilelist' (in target 'awesomeProject' from project 'awesomeProject')

2023-04-10 02:09:54.975 xcodebuild[1913:56595] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2023-04-10 02:09:54.975 xcodebuild[1913:56595] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **


info Run CLI with --verbose flag for more details.

@sLurPPPeRsTaR
Copy link

sLurPPPeRsTaR commented Apr 17, 2023

@georgeka98 try run

  1. softwareupdate --install-rosetta
  2. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. brew install cocoapods

image

or probably you are using Java: 19.0.1 - /usr/bin/javac not Java: 11.0.18 - /usr/bin/javac

@bruceeewong
Copy link

@georgeka98 Since you don't have a Pods folder, I bet you haven't installed dependencies of the iOS project.
I suggest you Install cocoapods, and then cd to ios path then use pod install to install dependencies for the iOS project.
I assume this should work because the issue is just a lack of dependencies. 😂

Copy link

github-actions bot commented Nov 3, 2023

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.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 3, 2023
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@huzaifahazelGit
Copy link

huzaifahazelGit commented Feb 10, 2024

This issue was closed because it has been stalled for 7 days with no activity.
Why are you closed this issue , did not any action for this issue , There are many days passed but no any respond from React native community and not a stack overflow developers
There are a lot of developers has stucked to solve this issue but I have tried mays days to solve this issue but below same error occured

React-rncore issues
Command PhaseScriptExecution failed with a nonzero exit code

Now Setting up React Native environment installing at IOS Plateform with React Native latest version (0.73.4) for macOS Sonoma m2 Apple chip with Xcode 15.2 version Failed

@COSSART-FR
Copy link

This issue was closed because it has been stalled for 7 days with no activity.
Why are you closed this issue , did not any action for this issue , There are many days passed but no any respond from React native community and not a stack overflow developers
There are a lot of developers has stucked to solve this issue but I have tried mays days to solve this issue but below same error occured

React-rncore issues Command PhaseScriptExecution failed with a nonzero exit code

Now Setting up React Native environment installing at IOS Plateform with React Native latest version (0.73.4) for macOS Sonoma m2 Apple chip with Xcode 15.2 version Failed

cd ios && RCT_NEW_ARCH_ENABLED=1 pod install from #34651 (comment)

@arunsa-hrbl
Copy link

This issue was closed because it has been stalled for 7 days with no activity.
Why are you closed this issue , did not any action for this issue , There are many days passed but no any respond from React native community and not a stack overflow developers
There are a lot of developers has stucked to solve this issue but I have tried mays days to solve this issue but below same error occured

React-rncore issues Command PhaseScriptExecution failed with a nonzero exit code

Now Setting up React Native environment installing at IOS Plateform with React Native latest version (0.73.4) for macOS Sonoma m2 Apple chip with Xcode 15.2 version Failed

Hi @huzaifahazelGit , did you find any solution for this ?

@huzaifahazelGit
Copy link

huzaifahazelGit commented Apr 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

9 participants