Offline logging
Hello,
First, thanks a lot for Sentry SDK for RN, we really like it.
I have tried crashing my app on purpose several times while being offline, but havent received any error reports after reconnecting to the internet.
I googled a lot, but all results were related to raven-js react-native plugin (https://github.com/getsentry/raven-js/blob/master/plugins/react-native.js), which is deprecated now. I never tried the plugin, but I saw the it has methods _persistPayload and _restorePayload which use AsyncStorage, so i believe they were used for "offline logging" .
In the new SDK (https://github.com/getsentry/react-native-sentry), I cant find any piece of code which might serve for this purpose. Theres even no shouldSendCallback method, which I would use as a workaround - check the internet connection inside the method and then conditionally store error report into device, sending it later.
So I wonder, is "offline crash logging" implemented somehow? If so, how do i turn it on? If not, can we expect it to be implemented in the near future? Does anyone know some clean workaround, so I get crash reports even if client is offline? Need both, native and javascript crash reports.
Thanks in advance
react-native: 0.42.3
react-native-sentry 0.14.5
Hey, This feature should definitely work also right now, if not it's a bug. I will try this out and see what happens.
I've just tried it, the native client stores all the events locally on the device when it's offline and resends them after the first successful one. So this should work if you have the native integration enabled.