Closed Gurpreetgpsingh closed 6 years ago
Hi @Gurpreetgpsingh can you email us at support@rollbar.com so we can try debugging this with you?
iOS or Android? Are you using Cocoapods? If iOS and not using Cocoapods, did you add the frameworks as described in the Readme?
@rokob Thanks for replying. Yes it is iOS and i have added frameworks as described in Readme. When am trying to run from Xcode, It is giving compile time error - "Rollbar/Rollbar.h not found" in RollbarReactNative.h class in RollbarReactNative.xcodeproj
@rivkahstandig3636: okay i will send mail. Thanks
I'm facing same problem as @Gurpreetgpsingh. Using cocoapods, did all configs in the Readme, but had no luck. I'm trying now to use rollbar.js in my react-native project as a workaround. Can you guys keep this issue updated, or should I e-mail you guys too?
We will keep this issue updated.
Sorry about the delay, I am working on this right now, will update shortly.
FYI: I think i got a similar issue with 1.3-alpha-1
CompileC /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/Objects-normal/x86_64/RollbarReactNative.o RollbarReactNative.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/cj/.cargo/bin:/Users/cj/.kiex/elixirs/elixir-1.5.0/bin:/Users/cj/.kiex/bin:/usr/local/opt/php56/bin:/Users/cj/.npm-packages:/usr/local/sbin:/Users/cj/.rbenv/shims:/Users/cj/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin:/Users/cj/.rvm/bin:/Users/cj/Library/Android/sdk/tools:/Users/cj/Library/Android/sdk/platform-tools"
/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 -fmodules-cache-path=/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/ModuleCache/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 -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Index/DataStore -iquote /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/RollbarReactNative-generated-files.hmap -I/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/RollbarReactNative-own-target-headers.hmap -I/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/RollbarReactNative-all-target-headers.hmap -iquote /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/RollbarReactNative-project-headers.hmap -I/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Products/Debug-iphonesimulator/include -I/Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios/../node_modules/rollbar-react-native/ios -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios/../../../React -I../../react-native/React -I../../react-native/React/Base -I../../react-native/React/CxxBridge -I../../react-native/React/CxxModule -I../../react-native/React/CxxUtils -I../../react-native/React/DevSupport -I../../react-native/React/Executors -I../../react-native/React/Inspector -I../../react-native/React/Modules -I../../react-native/React/Profiler -I../../react-native/React/Views -I. -IFrameworks -IRollbarReactNative.xcworkspace -I/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/DerivedSources/x86_64 -I/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/DerivedSources -F/Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Products/Debug-iphonesimulator -F/Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios/../node_modules/rollbar-react-native/ios -F/Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios -F. -FFrameworks -FRollbarReactNative.xcworkspace -F/Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios/Frameworks -MMD -MT dependencies -MF /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/Objects-normal/x86_64/RollbarReactNative.d --serialize-diagnostics /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/Objects-normal/x86_64/RollbarReactNative.dia -c /Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios/RollbarReactNative.m -o /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/Objects-normal/x86_64/RollbarReactNative.o
In file included from /Users/cj/WebstormProjects/my_rewards_mobile_app/node_modules/rollbar-react-native/ios/RollbarReactNative.m:1:
RollbarReactNative.h:6:9: fatal error: 'Rollbar/Rollbar.h' file not found
#import <Rollbar/Rollbar.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/cj/WebstormProjects/my_rewards_mobile_app/ios/build/Build/Intermediates.noindex/RollbarReactNative.build/Debug-iphonesimulator/RollbarReactNative.build/Objects-normal/x86_64/RollbarReactNative.o RollbarReactNative.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
This is fixed with the most recent release, there are instructions for how to get things linked properly in the README
I don't see how this is resolved... I am using the latest version and have linked it according to the readme... but the header file is still not found.
@rokob Please check this out again
I think this has been an issue that comes up again when you are using jest to test, I believe there should be a test for it in your library or better still provide a mock for it
I am experiencing the Rollbar: Native client not found
error on Android.
Is there a solution for this already?
I am using RN 0.51.0 btw.
Thanks
Hi @markronquillo, are you using jest for testing?
Yes there is jest
and i suspect it's jest issue
Should I just remove jest from dependencies?
I tried removing jest but the problem still persist. I can provide more info on my current setup just tell me what you need to know.
Btw, this only happens on android (device), I tried on iOS and I was able to run it smoothly.
Thanks.
Unfortunately the SDK engineer who knows the most about this is out for about a month. We will have to wait to address this issue until then. I'm sorry for the delay!
@rivkahstandig3636 hi thanks for the reply, actually I have fixed the issue.
I think the issue happens when we override the createAdditionalReactPackages()
in the MainApplication.java
.
So for anyone who experiences the Rollbar: Native client not found error
in android. You just need to
In your MainApplication.java file, include import com.rollbar.RollbarReactNativePackage;
in the top of the file.
Include the RollbarReactNativePackage in the createAdditionalReactPackages
override function.
Something like this.
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new RollbarReactNativePackage(),
// other packages if you have
);
}
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
Oh great, I'm glad you were able to figure it out!
Hey guys!
I'm getting this "Rollbar: Native client not found. Did you run react-native link?" error on iOS.
I have installed version 0.3.3 and did run react-native link rollbar-react-native
. Is there anything else to do that I don't know about @rokob @rivkahstandig3636 ?
@lnavry Did you find a solution for iOS?
Fixed for me with manual linking. https://facebook.github.io/react-native/docs/linking-libraries-ios
@EdwardReed I tried that manual linking and it didn't work for me. In the "drag the static library from the Products folder" part of the link you shared, I found that libRollbar.a was already there but libRollbarReactNative.a wasn't, so I added that. Still didn't work though. Did you go through those same steps?
Am getting error "Rollbar: Native client not found. Did you run react-native link?" I have also tried "react-native link" command but still getting same error. If anyone know, please reply. Thanks