Skip to content

Commit 2c42e02

Browse files
fix(sample): Disable global promise patch (#4249)
1 parent 1e318ee commit 2c42e02

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

samples/react-native/src/App.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { logWithoutTracing } from './utils';
3535
import { ErrorEvent } from '@sentry/types';
3636
import HeavyNavigationScreen from './Screens/HeavyNavigationScreen';
3737
import WebviewScreen from './Screens/WebviewScreen';
38+
import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment';
3839

3940
LogBox.ignoreAllLogs();
4041
const isMobileOs = Platform.OS === 'android' || Platform.OS === 'ios';
@@ -91,6 +92,13 @@ Sentry.init({
9192
Sentry.appStartIntegration({
9293
standalone: false,
9394
}),
95+
Sentry.reactNativeErrorHandlersIntegration({
96+
patchGlobalPromise: Platform.OS === 'ios' && isTurboModuleEnabled()
97+
// The global patch doesn't work on iOS with the New Architecture in this Sample app
98+
// In
99+
? false
100+
: true,
101+
}),
94102
);
95103
return integrations.filter(i => i.name !== 'Dedupe');
96104
},

0 commit comments

Comments
 (0)