-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Disable Native SDK initialization from React Native and use an existing instance #1248
Comments
You actually don't need to call Otherwise, if you need to specify your own options on the native layer or need to use sentry-react-native/ios/RNSentry.m Lines 43 to 47 in 667bc21
|
@jennmueng Thank you very much for your response. Our app is primarily a native app, in which some functionality is implemented with react-native. So, a lot happens before before JS (react-native) starts. I know, under the hood, Ideally, what we expect to have is: when JSCRuntime starts and How I approached that:
The project compiled and the native crashes kept captured the way they used to be caught and symbolised. That was cool and easy. Then I approached the JS side: I added calling The following combinations give same outcome:
The only way to get Sentry to process JS stacktraces nicely and have breadcrumbs that are added via JS available is to completely disable calling With any combination, I've never had any event duplicated. How can I get TIA |
Hmm there's currently no way to have the React Native SDK not initialize the native SDK and use an existing one. I'm adding this to our TODO. |
Closing as the PR introducing feature has been merged. |
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)sentry-cocoa
(6.0.9)react-native-sentry
(<= 0.43.2)SDK version:
@sentry/react-native
2.1.0sentry-cocoa
6.0.9react-native
version: 0.60.5 (also tried to upgrade to 0.62.2 - the same outcome as with 0.60.5)Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
When the native one is initialised first and JS one is the second:
https://sentry.io/organizations/vladislav-churakov/issues/2096897776/?project=1834395&query=is%3Aunresolved
When no native one is used, one JS one:
https://sentry.io/organizations/vladislav-churakov/issues/2094670206/?project=1834395&query=is%3Aunresolved
Configuration:
(
@sentry/react-native
)(
sentry-cocoa
in AppDelegate.swift)I have following issue:
Given there's an iOS native app that uses sentry-cocoa and all the native stacktraces are nicely symbolised with some functionality done with react-native (a "hybrid" app).
When
SentrySDK.start
is called inAppDelegate.swift
the first (we need this as we need to see native crashes) and thenSentry.init
is called in JS as react-native starts , the JS stacktrace looks very bad in Sentry:Obviously, there can not be an attempt to process it with JS sourcemaps.
However, when the native
SentrySDK.start
is disabled, and we only callSentry.init
in JS, the same JS error stacktrace looks way better:Thought sourcemaps weren't applied in this case (just because there hadn't been uploaded), there was an attempt to process this stacktrace, and this definitely looks like a usual JS issue in Sentry
Steps to reproduce:
SentrySDK.start
is called inAppDelegate
@sentry/react-native
into this project (now sentry-cocoa is added again)Sentry.init
in JSActual result:
Expected result:
The text was updated successfully, but these errors were encountered: