-
-
Notifications
You must be signed in to change notification settings - Fork 351
Milestone
Description
Environment
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK and version?
e.g: Sentry React Native 3.3.3
Steps to Reproduce
Sample code:
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: 'https://d870ad989e7046a8b9715a57f59b23b5@o447951.ingest.sentry.io/5428561',
debug: true,
});
Sentry.captureException(new Error(`${Date.now()}: a test error occurred`),
context => context.addBreadcrumb({ message: 'error with breadcrumbs' }));
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Expected Result
The exception captured with the breadcrumb error with breadcrumbs
Actual Result
Breadcrumb got removed
https://sentry.io/organizations/sentry-sdks/issues/3114951206/?project=5428561&query=is%3Aunresolved&statsPeriod=1h
sentry-react-native/src/js/wrapper.ts
Lines 108 to 110 in a085ec4
if (event.exception?.values?.[0]?.mechanism?.handled) { | |
event.breadcrumbs = []; | |
} |
This code doesnt differentiate from synced breadcrumbs and local breadcrumbs, resulting on local breadcrumbs getting removed when setting an isolated scope/context.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done