npm @sentry/react-native 8.16.0

4 hours ago

Features

  • Capture errors that hit Expo Router's per-route ErrorBoundary (#6318)

    Wrap the boundary with Sentry.wrapExpoRouterErrorBoundary in your route file:

    // app/_layout.tsx
    import { ErrorBoundary as ExpoErrorBoundary } from 'expo-router';
    import * as Sentry from '@sentry/react-native';
    
    export const ErrorBoundary = Sentry.wrapExpoRouterErrorBoundary(ExpoErrorBoundary);

    Render-phase errors that reach the boundary are captured with route context (route.name, route.path, route.params), the in-flight navigation transaction is tagged as errored, and a breadcrumb is emitted. Concrete paths and params are gated behind sendDefaultPii.

Fixes

  • Fix fatal NSInvalidArgumentException crash in RNSentryReplayBreadcrumbConverter when a touch breadcrumb path contains a non-dictionary element (#6346)
  • Apply SENTRY_ENVIRONMENT, SENTRY_RELEASE and SENTRY_DIST build-time overrides to the JS bundled options to match the native SDKs (#6330)
  • Fix user geo being dropped from the native scope by forwarding it as a structured object instead of a JSON string (#6309)
  • Remove unused React/RCTTextView.h import that broke iOS builds on React Native 0.87, where the header was removed as part of the legacy architecture cleanup (#6322)

Internal

  • Hide the dataCollection option until it is fully supported in React Native. It is exposed by @sentry/core but is not yet honored by the native SDKs (iOS/Android) nor by the RN-specific sendDefaultPii gates, so setting it would silently have no effect. Use sendDefaultPii instead. (#6345)

Dependencies

Don't miss a new react-native release

NewReleases is sending notifications on new releases.