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

Unable to run my first demo app shows me fatal error #25707

Closed
vnanaware opened this issue Jul 18, 2019 · 9 comments
Closed

Unable to run my first demo app shows me fatal error #25707

vnanaware opened this issue Jul 18, 2019 · 9 comments
Labels
Bug Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@vnanaware
Copy link

when I run my app on mac for ios

#import <React/RCTBridgeDelegate.h>

Fatal error: 'React/RCTBridgeDelegate.h' file not found

Please help how to resolve this?

@vnanaware vnanaware added the Bug label Jul 18, 2019
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@RobinCsl
Copy link

Hi @vnanaware,

Could you please add more details to the issue you encountered? It is very difficult to say what's the underlying issue and help you fix it otherwise.

Do you have any example repository that we could look at?

when I run my app on mac for ios

Did you run it through react-native run-ios or through Xcode?

@slavikdenis
Copy link

Same happened to me as well on a freshly initialized react-native project.

Info:

Karols-Mac:app karolduchon$ react-native info
info Fetching system and libraries information...
System:
    OS: macOS 10.14.5
    CPU: (6) x64 Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
    Memory: 52.02 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
  IDEs:
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.4 => 0.60.4

Stack:

Karols-Mac:app karolduchon$ react-native run-ios
info Found Xcode project "DrinkMemory.xcodeproj"
info Building (using "xcodebuild -project DrinkMemory.xcodeproj -configuration Debug -scheme DrinkMemory -destination id=66EBB6EA-6B57-4F80-A719-3A4383EEE7B4 -derivedDataPath build/DrinkMemory")
...............
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 DrinkMemory.xcodeproj. Run CLI with --verbose flag for more details.
User defaults from command line:
    IDEDerivedDataPathOverride = /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory

note: Using new build system
note: Planning build
note: Using build description from disk
Build system information
warning: Capabilities for DrinkMemory may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the build settings editor. (in target 'DrinkMemory')

PhaseScriptExecution Start\ Packager /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Script-FD10A7F022414F080027D42C.sh (in target: DrinkMemory)
    cd /Users/karolduchon/Documents/repos/drink-memory-app/app/ios
    /bin/sh -c /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Script-FD10A7F022414F080027D42C.sh

CompileC /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/main.o /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: DrinkMemory)
    cd /Users/karolduchon/Documents/repos/drink-memory-app/app/ios
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Index/DataStore -iquote /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-generated-files.hmap -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-own-target-headers.hmap -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-all-target-headers.hmap -iquote /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-project-headers.hmap -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Products/Debug-iphonesimulator/include -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DerivedSources-normal/x86_64 -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DerivedSources/x86_64 -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DerivedSources -F/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/main.dia -c /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/main.m -o /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/main.o
In file included from /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/main.m:10:
/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

CompileC /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/AppDelegate.o /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: DrinkMemory)
    cd /Users/karolduchon/Documents/repos/drink-memory-app/app/ios
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Index/DataStore -iquote /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-generated-files.hmap -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-own-target-headers.hmap -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-all-target-headers.hmap -iquote /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DrinkMemory-project-headers.hmap -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Products/Debug-iphonesimulator/include -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DerivedSources-normal/x86_64 -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DerivedSources/x86_64 -I/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/DerivedSources -F/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/AppDelegate.d --serialize-diagnostics /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/AppDelegate.dia -c /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/AppDelegate.m -o /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/AppDelegate.o
In file included from /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/AppDelegate.m:8:
/Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.


** BUILD FAILED **


The following build commands failed:
        CompileC /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/build/DrinkMemory/Build/Intermediates.noindex/DrinkMemory.build/Debug-iphonesimulator/DrinkMemory.build/Objects-normal/x86_64/main.o /Users/karolduchon/Documents/repos/drink-memory-app/app/ios/DrinkMemory/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Hope this helps.

@RamkiranRaghuraman-MachB
Copy link

RamkiranRaghuraman-MachB commented Jul 23, 2019

Same error for the demo AwesomeProject.
react-native info:

info Fetching system and libraries information...
System:
OS: macOS 10.14.6
CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory: 1.15 GB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.6.0 - /usr/local/bin/node
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 23, 28, 29
Build Tools: 28.0.3, 29.0.1
System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.4 => 0.60.4
npmGlobalPackages:
react-native-cli: 2.0.1

@vnanaware
Copy link
Author

please someboday help many people having same problem occured, Not able to start react native learning.

@slavikdenis
Copy link

Solution #25820 (comment)

@chiaberry
Copy link

so are cocoapods required for react-native init to work?

I tried running from the command line react-native run-ios and also tried launching from Xcode and both times I get

/Users/analuciaberry/Documents/GitHub/phoneScanLink/ios/phoneScanLink/AppDelegate.h:8:9: 
fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>

I'm able to run other react-native apps fwiw, just apparently not the basic one from react-native init. I've never had to use cocoapods before

@Ericnsamba
Copy link

Solution you can try:

1 - Install Cocoa Pods globaly
sudo gem install cocoapods or visit https://cocoapods.org/
2 - then you should navigate into your ios Project Folder:
cd ios
and do a pod install
or run cd ios && pod install

@hramos hramos added Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. and removed Resolution: Needs More Information labels Jan 18, 2020
@hramos hramos closed this as completed Jan 21, 2020
@dylanlangerman1
Copy link

Not sure if this was the issue but it worked for me at first I was using iTerm a 3rd terminal I switch to the default terminal ran cd ios && pod install and it worked

@facebook facebook locked as resolved and limited conversation to collaborators Oct 7, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants