sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

[iOS] Gallery content not masked when using react-native-image-crop-picker

Open Kobby-Bawuah opened this issue 4 months ago • 2 comments

What React Native libraries do you use?

Expo (mobile only)

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

6.18.1

How does your development environment look like?


React Native project using react-native-image-crop-picker for image selection and cropping.

SDK updated recently.

Sentry.init()

Sentry.init({
  dsn: 'https://[email protected]/...'
  // other options
});

Steps to Reproduce

  • Open an iOS app using react-native-image-crop-picker.
  • Trigger the image picker to upload a profile picture (gallery opens).
  • Observe the replay recording.

Expected Result

The iOS gallery should not be captured in Session Replay (either excluded or masked).

Actual Result

The iOS gallery content is visible in the replay and not masked. Sentry.Mask is working inside the app but not applied when the gallery opens.

Please check the Zendesk ticket or Linear ticket for the replay link provided by the customer.

Kobby-Bawuah avatar Aug 20 '25 19:08 Kobby-Bawuah

  1. SDK version - 6.20.0
  2. Sentry init
Sentry.init({
  dsn: senrty_dsn,
  tracesSampleRate: 0.8,
  environment: 'production',
  appHangTimeoutInterval: 5,
   replaysSessionSampleRate: 1.0,
  replaysOnErrorSampleRate: 1.0,
  integrations: [Sentry.mobileReplayIntegration({  maskAllText: false,
    maskAllImages: false,
    maskAllVectors: false,})],
    beforeSend(event , hint){
      console.log(event,hint,"senrtylog");
    }
  // uncomment the line below to enable Spotlight (https://spotlightjs.com)
  // enableSpotlight: __DEV__,
});
  1. metro.config -
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');

const {withSentryConfig} = require('@sentry/react-native/metro');

/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * @type {import('@react-native/metro-config').MetroConfig}
 */
const config = {};

module.exports = withSentryConfig(withSentryConfig(
  mergeConfig(getDefaultConfig(__dirname), config),
));

Akanksha-Deshmukh2608 avatar Aug 21 '25 05:08 Akanksha-Deshmukh2608