Skip to content

iOS: JS error screenshots ignore <Sentry.Mask> when screenshot.maskAllText is false #6970

Open

Description

@lisakikoda

What React Native libraries do you use?

React Navigation, Hermes, RN New Architecture, Expo Application Services (EAS), Expo (mobile only)

Are you using sentry.io or on-premise?

sentry.io (SaS)

Are you using any other error monitoring solution alongside Sentry?

No

Other Error Monitoring Solution Name

No response

@sentry/react-native SDK Version

8.33.0

How does your development environment look like?

Expo SDK 53.0.27, react-native 0.79.6, Hermes, New Architecture on
sentry-cocoa 9.32.0 (bundled by @sentry/react-native 8.33.0)
EAS development build; device: iPhone 15 Pro Max (iPhone16,2), iOS 27.0.1
Compared against: Motorola moto g power 5G (2024), Android 15, same build


Sentry.init()

Sentry.init({
  dsn: '…',
  attachScreenshot: true,
  screenshot: { maskAllText: false },
  integrations: (integrations) => [
    ...integrations,
    Sentry.mobileReplayIntegration({ maskAllText: false, maskAllImages: false, maskAllVectors: false }),
  ],
  // other options unrelated to screenshots omitted
});

Steps to Reproduce

  1. Set attachScreenshot: true and screenshot: { maskAllText: false } in Sentry.init.
  2. Render a screen where some <Text> is wrapped in <Sentry.Mask> and some is not.
  3. Cold-start the app, so the native SDK picks up the options.
  4. From JS, call Sentry.captureException(new Error('test')).
  5. Open the event in Sentry → Attachments → screenshot.png.

Expected Result

Text inside <Sentry.Mask> is masked in the error screenshot; other text is readable. This is what Android does since 8.33.0 (#6930: "Honors <Sentry.Mask> / <Sentry.Unmask> in screenshots").

Actual Result

On iOS, all text in the error screenshot is readable, including the text inside <Sentry.Mask>. On Android, the same build and screen mask the wrapped text and show the rest.

With maskAllText left at its default (true), iOS masks all text as expected, so the gap is only in honoring <Sentry.Mask> / <Sentry.Unmask>.

From reading the 8.33.0 source, RNSentryReplay.mm registers RNSentryReplayMask as the redact container class for Session Replay; the error screenshot path (RNSentry.mm captureScreenshot → RNSentryInternalWrapper captureScreenshots) doesn't appear to use it.

Activity

  1. linear-code commented on Oct 29, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions