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

[Xcode 14] run-ios fails on fresh new project #34679

Closed
ajouve opened this issue Sep 13, 2022 · 8 comments
Closed

[Xcode 14] run-ios fails on fresh new project #34679

ajouve opened this issue Sep 13, 2022 · 8 comments
Labels
Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Tool: Xcode

Comments

@ajouve
Copy link

ajouve commented Sep 13, 2022

Description

I am running the command npx react-native init AwesomeProject everything works great but then when I am trying to run on iOS I have the following issue

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

info Found Xcode workspace "AwesomeProject.xcworkspace"
info Building (using "xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0")
    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AwesomeProject' from project 'AwesomeProject')
    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AwesomeProject' from project 'AwesomeProject')
▸ Running script 'Start Packager'
▸ Running script 'Bundle React Native code and images'
▸ Build Succeeded
success Successfully built the app
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0, OS:16.0, name:iPhone 13 }
{ platform:iOS Simulator, id:86F63448-3950-403E-B8C9-13491755B411, OS:16.0, name:iPhone 14 }
{ platform:iOS Simulator, id:1557EEB0-0B11-4AB5-A2B9-02606131CAFD, OS:16.0, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:A1A74626-406E-4AC3-80F9-177FC8202DFC, OS:16.0, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:F4EEA4A6-B478-4363-9759-39EE03F99EF7, OS:16.0, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:A09D9B20-D89F-48A8-9CEE-35015EFD7EB7, OS:16.0, name:iPhone SE (3rd generation) }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:B7DA7216-1933-439B-BB99-278A54FC9DDD, OS:16.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:670E1BA5-602E-4A84-9085-3E565E408F86, OS:16.0, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:BA5B5DB6-0540-4C36-954C-0720BF6D4EBD, OS:16.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:64B99D5A-8BA9-4E6C-80C5-C3417224F77E, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:F4FBD7CF-7C24-4A36-983D-9A37950AE750, OS:16.0, name:iPad mini (6th generation) }
2022-09-13 21:22:59.018 xcodebuild[19576:139674] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
info Installing "/Users/ajouve/Library/Developer/Xcode/DerivedData/AwesomeProject-cmodobjdhkgyybcihqmhuyqzsuzx/Build/Products/Debug-iphonesimulator/AwesomeProject.app"
info Launching "org.reactjs.native.example.AwesomeProject"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=3):
The request to open "org.reactjs.native.example.AwesomeProject" failed.
The process did launch, but has since exited or crashed.

I Reset Content And Setting from the simulator, clean from Xcode menu Product, rm -rf ios/build, restart computer, try to create w new project, nothing works

From time to time I have an other error

error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "org.reactjs.native.example.AwesomeProject" failed.
The request was denied by service delegate (SBMainWorkspace).
Underlying error (domain=FBProcessExit, code=128):
	The operation couldn’t be completed. The process exited.
	The process exited.

Tried on iPhone 13 and iPhone 14 simulator with both iOS 16.0

running npm run android I have no issues

Version

0.70.0

Output of npx react-native info

System:
OS: macOS 12.6
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 225.53 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v16.14.0/bin/yarn
npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
Languages:
Java: 14.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.0 => 0.70.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

npx react-native init AwesomeProject
cd AwesomeProject
npm run ios

Same issue with npx react-native run-ios

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

Defaut code

@danilobuerger
Copy link
Contributor

You could try opening the xcworkspace file with XCode and build / run from there.

@ajouve
Copy link
Author

ajouve commented Sep 14, 2022

I have this error

dyld[42206]: Library not loaded: @rpath/hermes.framework/hermes
  Referenced from: <AA1AEFF8-EF3C-321A-8585-50750E4D6AA4> /Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/AwesomeProject
  Reason: tried: '/Users/ajouve/Library/Developer/Xcode/DerivedData/AwesomeProject-cmodobjdhkgyybcihqmhuyqzsuzx/Build/Products/Debug-iphonesimulator/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, not in dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, not in dyld cache), '/Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/Frameworks/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, not in dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, not in dyld cache), '/Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/Frameworks/hermes.framework/hermes' (errno=2), '/Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/Frameworks/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/hermes.framework/hermes' (errno=2)
Library not loaded: @rpath/hermes.framework/hermes
  Referenced from: <AA1AEFF8-EF3C-321A-8585-50750E4D6AA4> /Users/ajouve/Library/Developer/CoreSimulator/Devices/2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0/data/Containers/Bundle/Application/985488F8-53EF-4702-9B61-6374101AFF94/AwesomeProject.app/AwesomeProject
  Reason: tried: '/Users/ajouve/Library/Developer/Xcode/DerivedData/AwesomeProject-cmodobjdhkgyybcihqmhuyqzsuzx/Build/Products/Debug-iphonesimulator/hermes.framework/hermes' (errno=2), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes.framework/hermes' (errno=2, not in dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (errno=2), '/usr/lib/swift/hermes
dyld config: DYLD_SHARED_CACHE_DIR=/Users/ajouve/Library/Developer/CoreSimulator/Caches/dyld/21G115/com.apple.CoreSimulator.SimRuntime.iOS-16-0.20A360 DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/ajouve/Library/Developer/Xcode/DerivedData/AwesomeProject-cmodobjdhkgyybcihqmhuyqzsuzx/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/ajouve/Library/Developer/Xcode/DerivedData/AwesomeProject-cmodobjdhkgyybcihqmhuyqzsuzx/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib

Seems to be related to #34601

@kelset kelset changed the title Issue starting a new project [Xcode 14] run-ios fails on fresh new project Sep 14, 2022
@kelset kelset added Platform: iOS iOS applications. Tool: Xcode labels Sep 14, 2022
@kelset
Copy link
Contributor

kelset commented Sep 14, 2022

@ajouve can you check this comment #34608 (comment) - it seems that for most people this is related to an Ruby version issue.

@ajouve
Copy link
Author

ajouve commented Sep 14, 2022

Thanks @kelset

I updated ruby to 2.7.5

Then ran

bundle install
bundle exec pod install

And it worked

@kelset kelset closed this as completed Sep 15, 2022
@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 labels Sep 15, 2022
@devDoubleH
Copy link

I don't know why but it worked for me

cd ios 
npx pod install
cd ..
npx react-native run-ios

@DeepakBrightcode
Copy link

I have this error

The following build commands failed:
CompileC /Users/brightcode/Library/Developer/Xcode/DerivedData/pranayBandhan-eqqyvjpxewsjgmgngfgmkrhqcqln/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/arm64/SKViewControllerDescriptor.o /Users/brightcode/pranayBandhan/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitPluginUtils/FlipperKitLayoutIOSDescriptors/FlipperKitLayoutIOSDescriptors/SKViewControllerDescriptor.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'FlipperKit' from project 'Pods')
(1 failure)

@DeepakBrightcode
Copy link

hoe to resolved it.

@CarolinaSFreitas
Copy link

hoe to resolved it.

Same here. Have you fixed it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Tool: Xcode
Projects
None yet
Development

No branches or pull requests

7 participants