-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Sentry replay Native Crash java.lang.IndexOutOfBoundsException #4234
Comments
Hey, So a little bit of investigation led me to try to set Once I reloaded my app on this new liveUpdate from EAS, the crash did not occur when the app was background and I was able to send a fake crash to sentry.io and see that my replay was there too. So, it looks like the SDK did not reboot after the live update (js code push), so I was able to use the same one, as long I do not reboot the app. However, I cannot keep it that way because it has no way to auto start from fresh boot. I need SDK to stop when I call ExpoUpdates.reloadAsync(). I still call flush just before it, but it does nothing. import { flush as SentryFlushPendingEventsBeforeExpoUpdatesAsync } from '@sentry/react-native';
import { reloadAsync } from 'expo-updates';
export const _reloadNativeApp = async (): Promise<void> => {
await SentryFlushPendingEventsBeforeExpoUpdatesAsync();
await reloadAsync();
}; Btw, I read here that |
Hi @vooban-work, The #1279 is an old issue, the RN SDK has Can you try with In RN SDK V5 have you used the What was the V5 version? Would you be able to share with us the missing part of the stack trace?
|
yes I tried it, it did not resolve the issue, so that's why I thought the method did not do anything like the issue #1279 said.
no, before this issue we never had to use flush or close. sentry was able to close the first instance and open a new one on the new update
5.34.0 - "@sentry/integrations": "7.110.1",
- "@sentry/react-native": "5.34.0",
- "@sentry/tracing": "7.110.1",
+ "@sentry/integrations": "7.114.0",
+ "@sentry/react-native": "6.1.0",
+ "@sentry/tracing": "7.114.0", here the json sentry issue, hope it helps |
@vooban-work we'll try to reproduce and fix the issue this week, thanks for all the details! |
New steps to reproduce from #4241
|
What React Native libraries do you use?
Expo (mobile only), React Navigation, Hermes, Expo Application Services (EAS)
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.1.0
How does your development environment look like?
I'm using VSCode with EAS to build the native app and live update to push code.
Sentry.init()
Steps to Reproduce
But here are the steps I did:
_experiments: { replaysSessionSampleRate: 0, replaysOnErrorSampleRate: 0, },
_experiments: { replaysSessionSampleRate: 1, replaysOnErrorSampleRate: 1, },
import { reloadAsync } from 'expo-updates';
0
1
it won't crash if I do not callExpoUpdates.reloadAsync()
, once I call it even if I do not have a pending updates, once the app reboots if I go background, it will crash again then reboot, then I'm good to set it background again, and so on...I tried to run
await Sentry.flush()
before runningawait ExpoUpdates.reloadAsync()
without successExpected Result
To be able to uses replay session on all sessions? We were using replays on v5 but migrating v5 to v6 we get those native exception below.
Actual Result
The text was updated successfully, but these errors were encountered: