[Session Replay][iOS] Errors from session didn't merge in one record
What React Native libraries do you use?
React Native without Frameworks, React Navigation, Hermes
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.7.0
How does your development environment look like?
OS: MacOS 15.3.2 Yarn: 1.22.22 Node: 20.17.0 RN: 0.71.12 React: 18.3.1 hermes: true new architecture: false
Sentry.init()
Sentry.init({
dsn,
environment: env,
enableNative: true,
enableNativeCrashHandling: true,
enabled: true,
release,
ignoreErrors: IGNORE_ERRORS,
dist,
tracesSampleRate: 0.1,
integrations: [
Sentry.mobileReplayIntegration({
maskAllText: false,
}),
],
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
})
AppRegistry.registerComponent('react_app', () => {
// Have to call before Sentry.wrap!
SentryHelper.setup(); <-------- here call Sentry.init
//@ts-ignore
return CodePush(codePushOptions)(Sentry.wrap(withPendoRN(App, null)));
});
Steps to Reproduce
- Just add throw new Error('Some text') in some places of your code in some handlers for raising error. Click these handlers for raising error and look at Sentry replay.
Expected Result
All errors should be merged in 1 record as on Android now
Actual Result
For iOS all errors are separate.
Hi @vladyslav-honchenko, thank you for the message,
is the throw new Error('Some text') unhandled and crashes the application, or do you catch it and call Sentry.captureException?
Do you observe this in the debug build with the metro dev server, in the release, or both?
Hi @vladyslav-honchenko, thank you for the message,
is the
throw new Error('Some text')unhandled and crashes the application, or do you catch it and callSentry.captureException?Do you observe this in the debug build with the metro dev server, in the release, or both?
@krystofwoldrich
- "is the throw new Error('Some text') unhandled and crashes the application" - unhandled and crashes the application
- Do you observe this in the debug build with the metro dev server - yes, Session Replay is not in prod we are on develop stage
const onItemPressed = useCallback((): void => {
// Sentry.nativeCrash();
if (OHSelectedOrderId !== order.id) {
getOrderDetails(order.id);
throw new Error(
'Error when try to go to NEW UpdateOrderHistoryDetails',
);
}
@vladyslav-honchenko thanks for the details, we'll look into this!
@romtsn Hello. Do you have an estimation or priority of this bugfix? Did you have a chance to reproduce it? If you have any questions, please tag me. This bug is actual even in 6.10.0. I have checked it.
@vladyslav-honchenko sorry I haven't had time to look into this, but it's on my list for this week. I will tag you if anything comes up, thanks!
This happens when the uncaught JS error doesn't crash the RN application, by default this happens in development builds.
In production this is not an issue unless the default behavior is changed and uncaught JS errors are not crashing the RN app.
This happens when the uncaught JS error doesn't crash the RN application, by default this happens in development builds.
In production this is not an issue unless the default behavior is changed and uncaught JS errors are not crashing the RN app.
Closing this, as it is non-actionable for now. Feel free to leave a comment, and we’ll be happy to iterate on it 🙇