I have an Expo app, added Sentry, but as soon as I enable the Sentry.Native.ReactNativeTracing integration, it gets into an infinite loop of errors.
LOG Sentry Logger [log]: Integration installed: ModulesLoader LOG Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry. LOG Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers LOG Sentry Logger [log]: Integration installed: Release LOG Sentry Logger [log]: Integration installed: InboundFilters LOG Sentry Logger [log]: Integration installed: FunctionToString LOG Sentry Logger [log]: Integration installed: Breadcrumbs LOG Sentry Logger [log]: Integration installed: Dedupe LOG Sentry Logger [log]: Integration installed: HttpContext LOG Sentry Logger [log]: Integration installed: NativeLinkedErrors LOG Sentry Logger [log]: Integration installed: EventOrigin LOG Sentry Logger [log]: Integration installed: SdkInfo LOG Sentry Logger [log]: Integration installed: ReactNativeInfo LOG Sentry Logger [log]: Integration installed: DebugSymbolicator LOG Sentry Logger [log]: Integration installed: RewriteFrames LOG Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized. LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: a7bae05c7f745660 LOG Sentry Logger [log]: [Tracing] starting navigation transaction - Route Change LOG Sentry Logger [log]: Starting heartbeat LOG Sentry Logger [log]: pinging Heartbeat -> current counter: 0 LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope LOG Sentry Logger [log]: Integration installed: ReactNativeTracing LOG Sentry Logger [log]: Integration installed: ExpoManagedIntegration LOG Sentry Logger [log]: Integration installed: react-navigation-v5 LOG Sentry Logger [log]: Integration installed: ReactNativeUserInteractionTracing ERROR Sentry Logger [error]: [ReactNativeTracing] Error while fetching native frames: SentryError: Native is disabled LOG Sentry Logger [log]: [Tracing] pushActivity: a8b90f2e57a3d4c4 LOG Sentry Logger [log]: [Tracing] new activities count 1 LOG Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'Route Change' (a7bae05c7f745660). LOG Sentry Logger [log]: [Tracing] pushActivity: a9286f6ffee98601 LOG Sentry Logger [log]: [Tracing] new activities count 2 LOG Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'Route Change' (a7bae05c7f745660). LOG Sentry Logger [log]: [Tracing] pushActivity: af6b790f32eefc62 LOG Sentry Logger [log]: [Tracing] new activities count 3 LOG Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'Route Change' (a7bae05c7f745660). LOG Sentry Logger [log]: [Tracing] popActivity a8b90f2e57a3d4c4 LOG Sentry Logger [log]: [Tracing] new activities count 2 ERROR Sentry Logger [error]: [ReactNativeTracing] Error while fetching native frames: SentryError: Native is disabled LOG Sentry Logger [log]: [Tracing] pushActivity: 8bebd01e9ff1b77a LOG Sentry Logger [log]: [Tracing] new activities count 3 LOG Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'Route Change' (a7bae05c7f745660). LOG Sentry Logger [log]: [Tracing] popActivity a9286f6ffee98601 LOG Sentry Logger [log]: [Tracing] new activities count 2 ERROR Sentry Logger [error]: [ReactNativeTracing] Error while fetching native frames: SentryError: Native is disabled LOG Sentry Logger [log]: [Tracing] pushActivity: a68f7f0efbec741a LOG Sentry Logger [log]: [Tracing] new activities count 3 LOG Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'Route Change' (a7bae05c7f745660). LOG Sentry Logger [log]: [Tracing] popActivity af6b790f32eefc62 LOG Sentry Logger [log]: [Tracing] new activities count 2 ERROR Sentry Logger [error]: [ReactNativeTracing] Error while fetching native frames: SentryError: Native is disabled LOG Sentry Logger [log]: [Tracing] pushActivity: 90fdf22a5d90fb8f LOG Sentry Logger [log]: [Tracing] new activities count 3 LOG Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'Route Change' (a7bae05c7f745660). LOG Sentry Logger [log]: [Tracing] popActivity 8bebd01e9ff1b77a LOG Sentry Logger [log]: [Tracing] new activities count 2 ERROR Sentry Logger [error]: [ReactNativeTracing] Error while fetching native frames: SentryError: Native is disabledI've tried reading the expo documentation about Sentry, the Sentry documentation, random GitHub issues, but couldn't figure out what's causing this error.
My routingInstrumentation setup looks like this:
import * as Sentry from 'sentry-expo';// Construct a new instrumentation instance. This is needed to communicate between the integration and Reactconst routingInstrumentation = new Sentry.Native.ReactNavigationInstrumentation();const Root = () => { const [isFetchingToken, setIsFetchingToken] = useState(true); const authCtx = useContext(AuthContext); if (isFetchingToken) return (<View><Text>Loading...</Text></View> ); // Checking auth state, fetching token etc... return (<NavigationContainer ref={navigationRef} onReady={() => { // Register the navigation container with the instrumentation routingInstrumentation.registerNavigationContainer(navigationRef); }}> {authCtx.isAuthenticated ? <MainStackNavigator /> : <AuthNavigator />}</NavigationContainer> );My Sentry.init:
Sentry.init({ dsn: 'my-dsn', enableInExpoDevelopment: true, enableNative: true, debug: !isProduction, // * If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production // * Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. // * We recommend adjusting this value in production. sampleRate: isProduction ? 0.2 : 1.0, tracesSampleRate: isProduction ? 0.2 : 1.0, integrations: [ new Sentry.Native.ReactNativeTracing({ routingInstrumentation, enableAppStartTracking: false, enableStallTracking: true, enableUserInteractionTracing: true, enableNativeFramesTracking: true, }), ],});Already tried it with Sentry.Native.init too, still infinite loop.






