Sentry-react-native: Error building: 'React/RCTBridgeDelegate.h' file not found; 'React/RCTBridge.h' file not found

Created on 25 Apr 2018  Β·  39Comments  Β·  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

_Platform:_

  • [x] iOS
  • [ ] Android

Output of node -v && npm -v && npm ls --prod --depth=0

v6.11.3
5.8.0
[email protected] /Users/fei/Documents/github/CtvpApp/CTVistaPlus
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]

Config:

Sentry.config('https://[email protected]/...', {
....
}).install()

I have following issue:
During 'react-native run-ios', my project can't compile.
Description goes here ...

Steps to reproduce:

  • Step

Actual result:

β–Έ Compiling RNSentry.m

❌  /node_modules/react-native/React/Base/RCTBridge.h:12:9: 'React/RCTBridgeDelegate.h' file not found

#import <React/RCTBridgeDelegate.h>
                                                                                     ^


β–Έ Compiling RNSentryEventEmitter.m

❌  node_modules/react-native/React/Modules/RCTEventEmitter.h:10:9: 'React/RCTBridge.h' file not found

#import <React/RCTBridge.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~


** BUILD FAILED **



The following build commands failed:
    CompileC ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SentryReactNative.build/Objects-normal/x86_64/RNSentryEventEmitter.o /node_modules/react-native-sentry/ios/RNSentryEventEmitter.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Expected result:

  • Compiles ok

it's strange that even when I have this error, my app runs in the simulater successfully.

Most helpful comment

FYI if you are still facing this issue after you successfully initialize a new project using react-native init, open Terminal, go to your project ios director, run pod install and then open the workspace project. It should build successfully.

running pod install inside /ios folder has worked perfectly for me!
Thank you @najielchemaly

All 39 comments

How did you install react native?
Via Cocoapods or react-native init?

I'm having the same issue. Project created with react-native init.
react-native-sentry ver 0.36.0

Having the same issue with Archiving
Here are some build logs;

2018-04-25T10:13:15.9925050Z In file included from /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentryEventEmitter.m:9:
2018-04-25T10:13:15.9968800Z In file included from /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentryEventEmitter.h:4:
2018-04-25T10:13:16.0012480Z /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native/React/Modules/RCTEventEmitter.h:10:9: fatal error: 'React/RCTBridge.h' file not found
2018-04-25T10:13:16.0043110Z #import <React/RCTBridge.h>
2018-04-25T10:13:16.0059570Z         ^~~~~~~~~~~~~~~~~~~
2018-04-25T10:13:16.0076290Z 1 error generated.
2018-04-25T10:13:16.0084960Z 
2018-04-25T10:13:16.0121480Z CompileC /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/armv7/SentryReactNative-dummy.o Target\ Support\ Files/SentryReactNative/SentryReactNative-dummy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
2018-04-25T10:13:16.0157910Z     cd /Users/vsts/agent/2.131.0/work/1/s/ios/Pods
2018-04-25T10:13:16.0186460Z     export LANG=en_US.US-ASCII
2018-04-25T10:13:16.0236040Z     export PATH="/Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode_9.3.app/Contents/Developer/usr/bin:/Library/Frameworks/Mono.framework/Versions/4/bin:/usr/local/bin:/usr/local/sbin:/Users/vsts/bin:/Users/vsts/.yarn/bin:/usr/local/go/bin:/Users/vsts/Library/Android/sdk/tools:/Users/vsts/Library/Android/sdk/platform-tools:/Users/vsts/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vsts/.azcopy"
2018-04-25T10:13:16.0382670Z     /Applications/Xcode_9.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vsts/Library/Developer/Xcode/DerivedData/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 -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -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 -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fembed-bitcode -iquote /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-generated-files.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-own-target-headers.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-all-target-headers.hmap -iquote /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-project-headers.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/BuildProductsPath/Release-iphoneos/SentryReactNative/include -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Private -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Private/SentryReactNative -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/KSCrash -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/Sentry -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/SentryReactNative -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/DerivedSources/armv7 -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/DerivedSources -F/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/BuildProductsPath/Release-iphoneos/SentryReactNative -include /Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Target\ Support\ Files/SentryReactNative/SentryReactNative-prefix.pch -MMD -MT dependencies -MF /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/armv7/SentryReactNative-dummy.d --serialize-diagnostics /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/armv7/SentryReactNative-dummy.dia -c /Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Target\ Support\ Files/SentryReactNative/SentryReactNative-dummy.m -o /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/armv7/SentryReactNative-dummy.o
2018-04-25T10:13:16.0499030Z 
2018-04-25T10:13:16.0535470Z CompileC /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentry.o /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentry.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
2018-04-25T10:13:16.0571360Z     cd /Users/vsts/agent/2.131.0/work/1/s/ios/Pods
2018-04-25T10:13:16.0599880Z     export LANG=en_US.US-ASCII
2018-04-25T10:13:16.0649230Z     export PATH="/Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode_9.3.app/Contents/Developer/usr/bin:/Library/Frameworks/Mono.framework/Versions/4/bin:/usr/local/bin:/usr/local/sbin:/Users/vsts/bin:/Users/vsts/.yarn/bin:/usr/local/go/bin:/Users/vsts/Library/Android/sdk/tools:/Users/vsts/Library/Android/sdk/platform-tools:/Users/vsts/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vsts/.azcopy"
2018-04-25T10:13:16.0808220Z     /Applications/Xcode_9.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vsts/Library/Developer/Xcode/DerivedData/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 -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -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 -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fembed-bitcode -iquote /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-generated-files.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-own-target-headers.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-all-target-headers.hmap -iquote /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-project-headers.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/BuildProductsPath/Release-iphoneos/SentryReactNative/include -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Private -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Private/SentryReactNative -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/KSCrash -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/Sentry -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/SentryReactNative -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/DerivedSources/arm64 -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/DerivedSources -F/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/BuildProductsPath/Release-iphoneos/SentryReactNative -include /Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Target\ Support\ Files/SentryReactNative/SentryReactNative-prefix.pch -MMD -MT dependencies -MF /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentry.d --serialize-diagnostics /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentry.dia -c /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentry.m -o /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentry.o
2018-04-25T10:13:16.0941130Z In file included from /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentry.m:1:
2018-04-25T10:13:16.0984300Z In file included from /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentry.h:4:
2018-04-25T10:13:16.1028070Z /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native/React/Base/RCTBridge.h:12:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
2018-04-25T10:13:16.1058350Z #import <React/RCTBridgeDelegate.h>
2018-04-25T10:13:16.1075110Z         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-04-25T10:13:16.1087250Z 
2018-04-25T10:13:16.1124400Z CompileC /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentryEventEmitter.o /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentryEventEmitter.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
2018-04-25T10:13:16.1163220Z     cd /Users/vsts/agent/2.131.0/work/1/s/ios/Pods
2018-04-25T10:13:16.1194070Z     export LANG=en_US.US-ASCII
2018-04-25T10:13:16.1250550Z     export PATH="/Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode_9.3.app/Contents/Developer/usr/bin:/Library/Frameworks/Mono.framework/Versions/4/bin:/usr/local/bin:/usr/local/sbin:/Users/vsts/bin:/Users/vsts/.yarn/bin:/usr/local/go/bin:/Users/vsts/Library/Android/sdk/tools:/Users/vsts/Library/Android/sdk/platform-tools:/Users/vsts/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vsts/.azcopy"
2018-04-25T10:13:16.1405730Z     /Applications/Xcode_9.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vsts/Library/Developer/Xcode/DerivedData/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 -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -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 -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fembed-bitcode -iquote /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-generated-files.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-own-target-headers.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-all-target-headers.hmap -iquote /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/SentryReactNative-project-headers.hmap -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/BuildProductsPath/Release-iphoneos/SentryReactNative/include -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Private -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Private/SentryReactNative -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/KSCrash -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/Sentry -I/Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Headers/Public/SentryReactNative -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/DerivedSources/arm64 -I/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/DerivedSources -F/Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/BuildProductsPath/Release-iphoneos/SentryReactNative -include /Users/vsts/agent/2.131.0/work/1/s/ios/Pods/Target\ Support\ Files/SentryReactNative/SentryReactNative-prefix.pch -MMD -MT dependencies -MF /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentryEventEmitter.d --serialize-diagnostics /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentryEventEmitter.dia -c /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentryEventEmitter.m -o /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/arm64/RNSentryEventEmitter.o
2018-04-25T10:13:16.1527640Z 
2018-04-25T10:13:16.1545430Z ** ARCHIVE FAILED **
2018-04-25T10:13:16.1554430Z 
2018-04-25T10:13:16.1563330Z 
2018-04-25T10:13:16.1583060Z The following build commands failed:
2018-04-25T10:13:16.1624930Z    CompileC /Users/vsts/Library/Developer/Xcode/DerivedData/driverapp-eqvpwlxmlqvfdsfwdnithqfdnqoa/Build/Intermediates.noindex/ArchiveIntermediates/App\ Driver/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SentryReactNative.build/Objects-normal/armv7/RNSentryEventEmitter.o /Users/vsts/agent/2.131.0/work/1/s/node_modules/react-native-sentry/ios/RNSentryEventEmitter.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

Can you all do a rm -rf node_modules npm install this should fix it.
Actually this seems to be an ongoing issue with react-native itself
https://github.com/facebook/react-native/issues/12042

Issue was introduced with merging https://github.com/getsentry/react-native-sentry/pull/382 React dependency is not "obsolete".

A. Re add "React" as a dependency
or
B. Fix React paths in the emitter

Hi, ^^ this is unfortunate. I tried to upgrade react native and now I'm kind of stuck because of this. @HazAT is removing React from dependency really necessary?

How does your Podfile look like?

@hccoelho You can change the Podspec file in '../node_modules/react-native-onesignal' and add react, I will try if adding a subspec can fix the problem in the podfile btw.

Maybe something like that could work in this case.

pod 'react-native-onesignal', :path => '../node_modules/react-native-onesignal', subspecs: [ pod 'React', path: '../node_modules/react-native']

I'm hitting the same error, and that was after I upgraded cocoapods from 1.4.0 to 1.5.0. Solution: downgrade it. (as seen on: https://github.com/ocetnik/react-native-background-timer/issues/82#issuecomment-386583153)

Not sure if the culprit falls more on cocoapods messing up (deleting) HEADER_SEARCH_PATHS in Sentry*.xcconfig, or react-native-sentry not being better at said paths.

Downgrading cocoapods works for me as a workaround, but obviously not a real fix moving forward.

I also have this issue after Cocoapods upgrade from 1.4.0 to 1.5.0 (so I downgraded it back to 1.4.0)

@macs03 that worked for me thanks! Was an issue from using Cocoapods and missing some steps.

Posting the comment here from @amsul:


Got it working!

For anyone reading this, these are the steps I took:

  1. Do NOT use CocoaPods for react-native-sentry
  2. Follow the standard install steps:
    a) yarn react-native-sentry
    b) react-native link react-native-sentry
  3. If your Podfile was modified by the setup script, remove any reference of ReactNativeSentry
  4. Open Xcode and drag node_modules/react-native-sentry/ios/RNSentry.xcodeproj into your project's Libraries directory
  5. Open your project's "Linked Frameworks and Libraries" and add libRNSentry.a
    Hope that helps!

I managed to get my build to work with cococapods v1.5.2 by modifying the podspec.

I added this to the list of dependencies in the podspec:

# ... rest of react-native-sentry podspec

s.dependency 'React/Core'
s.dependency 'Sentry', '~> 3.12.0'
s.dependency 'Sentry/KSCrash', '~> 3.12.0'

Hey, so I reverted the change, React is back in the podspec.
Version 0.37.0 is on its way, sorry for the inconvenience this has caused.
I will close this issue now since this should solve it.

Fix confirmed, with cocoapods 1.5.2

I will close this for now, please post again if you are still having troubles.

@lachiet your solution solve my issues, react-native link didnt actual link the libraries, i have to manually copy the RnSentry.xcodeproj to project Libraries myself

In general, my experience with RN and podfiles is to not point to node_modules. It always seems to have one issue or another.

Instead, as @lachiet quoted, linking the library manually always works.

I would hope that this project gets updated to not rely on the podfile pointing to node_modules (as other RN packages do ex: https://github.com/rt2zz/react-native-contacts, https://github.com/davodesign84/react-native-mixpanel)

I had this problem and it went away by disabling parallelize build in your scheme settings.

Can you all do a rm -rf node_modules npm install this should fix it.
Actually this seems to be an ongoing issue with react-native itself
facebook/react-native#12042

This solution works for me. Run those commands in the workspace directory of your applications.

FYI if you are still facing this issue after you successfully initialize a new project using react-native init, open Terminal, go to your project ios director, run pod install and then open the workspace project. It should build successfully.

FYI if you are still facing this issue after you successfully initialize a new project using react-native init, open Terminal, go to your project ios director, run pod install and then open the workspace project. It should build successfully.

running pod install inside /ios folder has worked perfectly for me!
Thank you @najielchemaly

Thank you @najielchemaly & @AlberErre

I tried the steps above (cdto your project's ios directory and run pod install) from @AlberErre and @najielchemaly but they did not work...at first.

I finally checked my podfile and it looks like one of the lines (36 to be exact) that was supposed to be commented was commented out (that’s the way the file gets installed from react-native cli). Once I commented it , i ran the commands above and it worked.

I am using react-native init

Error:

info Installing required CocoaPods dependencies

[!] Invalid `Podfile` file: [!] /Users/.../node_modules/.bin/react-native config

env: node: No such file or directory
.

 #  from /Users/.../ios/Podfile:36
 #  -------------------------------------------
 #  
 >    use_native_modules!
 #  end
 #  -------------------------------------------

(node:10702) UnhandledPromiseRejectionWarning: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.


Adding the following line to the Podfile in /ios directory before running pod install solved the problem for me.

pod 'boost-for-react-native', :podspec => 'https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec'

Thank you @najielchemaly
pod install is worked perfectly for me!

FYI if you are still facing this issue after you successfully initialize a new project using react-native init, open Terminal, go to your project ios director, run pod install and then open the workspace project. It should build successfully.

Thanks, Work for me

FYI if you are still facing this issue after you successfully initialize a new project using react-native init, open Terminal, go to your project ios director, run pod install and then open the workspace project. It should build successfully.

running pod install inside /ios folder has worked perfectly for me!
Thank you @najielchemaly

This is worked for me. πŸ‘

  1. cd /ios
  2. run pod install
  3. cd ..
  4. delete build folder
  5. run react-native run-ios

if error persists,

  1. delete build folder again
  2. open the /ios folder in x-code
  3. navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System

I had to change <React/RNSentry.h> to <SentryReactNative/RNSentry.h> in AppDelegate.m as per https://github.com/getsentry/sentry-react-native/issues/317#issuecomment-412707750.

  1. cd /ios
  2. run pod install
  3. cd ..
  4. delete _build_ folder
  5. run react-native run-ios

if error persists,

  1. delete build folder again
  2. open the /ios folder in x-code
  3. navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System

thank you very much, I finally got it working

Adding the following line to the Podfile in /ios directory before running pod install solved the problem for me.

pod 'boost-for-react-native', :podspec => 'https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec'

Thank you so much!!! I tried many times for pod install or pod upload, but they did not work.
This works for me!!!! Thank you!!

  1. cd /ios
  2. run pod install
  3. cd ..
  4. delete _build_ folder
  5. run react-native run-ios

if error persists,

  1. delete build folder again
  2. open the /ios folder in x-code
  3. navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System

thank you

@wanxchao Did it work for you?

After upgrading the react-native it shows the above error any one have any solution

After upgrading the react-native it shows the above error any one have any solution

I'm facing the same problem

Hello, having the same issue. However, even though it says build failed I can still work on my app.
Does anyone know why?

here is what I did to fix this issue:

  1. cd ios && xcodebuild clean
  2. pod init (if you don’t have podFile already)
  3. pod install

This solution was solved my problem
https://github.com/joltup/rn-fetch-blob/issues/461#issuecomment-553355501

Was this page helpful?
0 / 5 - 0 ratings