sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Session Replay is unable to mask content when using the Camera

Open chris-mitchell opened this issue 8 months ago • 3 comments

Integration

sentry-android

Build System

Gradle

AGP Version

8.7.3

Proguard

Enabled

Version

8.11.1

Steps to Reproduce

  1. Enable Sentry's Session Replay Feature
  2. Launch the Camera from your app similar to https://developer.android.com/media/camera/camera-intents
  3. Trigger an error / crash
  4. View the result in Sentry

Expected Result

Contents from the Camera would be masked as the user is capturing their image

Actual Result

Contents from the Camera are shown in the Replay

We don't have a way to filter this since we don't control the app or view class used to capture the camera. Perhaps if we launch an Activity that isn't defined in our Manifest we could block it entirely?

chris-mitchell avatar May 13 '25 16:05 chris-mitchell

Thanks for reaching out! Could you clarify if you're using Camera Intents or the Camera X library? (https://developer.android.com/media/camera/camerax)
On our end we should definitely filter out any camera views by default.

markushi avatar May 14 '25 12:05 markushi

Good question - this error was for the Camera Intents approach. However, we seem to use both in our app. We use Camera Intents in some legacy areas, and we use Camera X via MLKit.

chris-mitchell avatar May 14 '25 17:05 chris-mitchell

Good question - this error was for the Camera Intents approach. However, we seem to use both in our app. We use Camera Intents in some legacy areas, and we use Camera X via MLKit.

thanks, I believe the issue you were seeing is related to Camera X, because when you launch a camera intent we have no way to capture it as part of replay since it's in a different app process.

romtsn avatar May 15 '25 08:05 romtsn

@chris-mitchell I've tried reproducing this both using intents and Camera X (from one of the samples) but wasn't able to. The replay just shows a black screen and that's it:

Image

Would you mind providing a reproducible sample/giving more details into your setup?

romtsn avatar Oct 01 '25 16:10 romtsn

(forgot to mention - for camera intent it actually cannot event capture and just shows missing segments because camera app is a different process that we're not able to capture)

romtsn avatar Oct 01 '25 17:10 romtsn

@chris-mitchell I'm closing this issue due to the lack of reproduction but feel free to comment here with more details. Thanks!

romtsn avatar Oct 31 '25 08:10 romtsn