Skip to content

Inconsistent behaviour between platforms - attachScreenshot is redacted on iOS but not Android #5014

@liamjones

Description

@liamjones

What React Native libraries do you use?

React Native without Frameworks, React Navigation, Hermes

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

6.18.0

How does your development environment look like?

⬇  Place the `npx react-native@latest info` output here. ⬇ 
System:
  OS: macOS 15.5
  CPU: (12) arm64 Apple M4 Pro
  Memory: 135.39 MB / 48.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.12.0
    path: ~/.volta/tools/image/node/22.12.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.volta/tools/image/yarn/1.22.22/bin/yarn
  npm:
    version: 10.9.0
    path: ~/.volta/tools/image/node/22.12.0/bin/npm
  Watchman:
    version: 2025.07.21.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.25410.109.2511.13752376
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /Users/liam.jones/.sdkman/candidates/java/17.0.13-zulu/bin/javac
  Ruby:
    version: 3.3.6
    path: /Users/liam.jones/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.0
    wanted: 18.3.0
  react-native:
    installed: 0.74.6
    wanted: 0.74.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: true
  newArchEnabled: false

Some of this ☝️ is incorrect;

  • Cocoapods is 1.16.2 (via bundler)
  • Android SDK - multiple versions; 33, 34, 35
  • @react-native-community/cli 13.6.9 (installed in project, not global)
  • Android: hermesEnabled - true
  • Android: newArchEnabled - false

Sentry.init()

    Sentry.init({
        enabled: true,
        dsn: 'https://97b571d75a5a430b93d70785c6c1281b@o169785.ingest.sentry.io/5536147',
        environment: 'default',
        sendDefaultPii: true,
        debug: true,
        spotlight: true,
        attachScreenshot: true,
        tracesSampler: tracesSamplerCallback,
        enableUserInteractionTracing: true, // Only applies if tracing is also enabled
        beforeSend: sentryBeforeSendCallback,
        integrations: [
            routingInstrumentation,
            Sentry.reactNativeTracingIntegration({
                shouldCreateSpanForRequest: (url) => url !== config.livingWithPlatform.defaultHealthCheckUrl.value,
            }),
        ],
    })

Steps to Reproduce

  1. Trigger error on iOS & Android

Expected Result

This works on both platforms but behaves inconsistently and feels like it might be a bug? I'd expect the same UI redaction behaviour on both platforms - either both redacted (matching up with what Replay is meant to do) or neither redacted

Actual Result

iOS is redacted, Android isn't

iOS:
Image

Android:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions