we have self hosted sentry server (Sentry 21.11.0 172bad1), our react native SDK is : "@sentry/react-native": "^3.0.2"
sentry can detect all crashes all over the app ( because events logs are available in beforeSend function ) but only crashes in those components that registered before react navigation NavigationContainer , report crashes on sentry panel, and crashed accrued in react navigation screens are not reported PS : enabling navigation integration does not help
PS1: our init funtion is :
export const initCrashReportServices = () => {
const information = {
dsn: 'XXXX',
debug: ENVIRONMENT === 'STG',
environment: ENVIRONMENT,
attachStacktrace: true,
beforeSend: async event => {
console.log(event, 'event');
return event;
},
};
codePush
.getUpdateMetadata()
.then(update => {
alert(`${update.appVersion}+codepush:${update.label}`);
if (update) {
information.release = `${update.appVersion}+codepush:${update.label}`;
}
Sentry.init(information);
})
.catch(() => {
Sentry.init(information);
});
};
PS2: App.js :
export default codePush({
checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
})(
Sentry.withErrorBoundary(App, { fallback: ErrorBoundaryComponent }),
);