Sentry-react-native: iOS: Undefined symbols for architecture x86_64 in v0.14.0

Created on 29 Jun 2017  路  11Comments  路  Source: getsentry/sentry-react-native

Sentry v0.14.0 does not build on iOS Simulator. Is it possible to distribute this library with simulator support?

Build error is:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RNSentry", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64

Update:

It seems that problem is that libRNSentry.a was not added Linked Frameworks and Libraries.

Most helpful comment

Make sure u added "RNSentry.xcodeproj" to Libraries And libRNSentry.a to "Linked Frameworks and Libraries", that fixed the issue for me

All 11 comments

Have you called react-native link react-native-sentry ?

I have the same problem with 0.14.5 after react-native link react-native-sentry

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_BugsnagReactNative", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_KSCrash", referenced from:
      objc-class-ref in libRNSentry.a(SentryContext.o)
      objc-class-ref in libRNSentry.a(SentryClient.o)
  "_OBJC_CLASS_$_KSCrashInstallation", referenced from:
      _OBJC_CLASS_$_SentryKSCrashInstallation in libRNSentry.a(SentryKSCrashInstallation.o)
  "_OBJC_METACLASS_$_KSCrashInstallation", referenced from:
      _OBJC_METACLASS_$_SentryKSCrashInstallation in libRNSentry.a(SentryKSCrashInstallation.o)
ld: symbol(s) not found for architecture x86_64

XCode 8.3.3, RN 0.46.1

I've had the same issue after upgrading to v0.14.5, unlinking and linking react-native-sentry did not solve the problem

XCode 8.3.3, RN 0.46.2

I think there is currently a bug in react-native with the link step.
Can you try patching this file locally in you node_modules folder and see if link works?
https://github.com/facebook/react-native/pull/14863

I am closing this issue for now since I am pretty confident that it is a linking issue.
It seems react-native also resolved their issue.
If you are still having trouble, feel free to comment again.

I am having this problem. The app builds but produces this failure. Can you explain what you mean by "patching the file locally in your node_modules"?

@CoreyAR Hey, can you zip up your project folder and send it to me via email [email protected]
I am really eager to reproduce this issue but never encountered it, I really need to have the exact same env.

This issue occurs again.

react-native-sentry: v0.35.3
react-native: v0.54.2
xCode: 9.2

Make sure u added "RNSentry.xcodeproj" to Libraries And libRNSentry.a to "Linked Frameworks and Libraries", that fixed the issue for me

I had the same issue when I upgraded sentry from v0.36.0 to v0.39.0. I removed RNSentry.xcodeproj and libRNSentry.a and added it back solved the issue. react-native unlink react-native-sentry and react-native link react-native-sentry should work as well.

I had the same issue. I saw that the Wizard put the Sentry dependency on the TvOS tests. I've put it out, cleared and reinstalled my Pods, and it worked !

Was this page helpful?
0 / 5 - 0 ratings