Session Replay is unable to mask content when using the Camera
Integration
sentry-android
Build System
Gradle
AGP Version
8.7.3
Proguard
Enabled
Version
8.11.1
Steps to Reproduce
- Enable Sentry's Session Replay Feature
- Launch the Camera from your app similar to https://developer.android.com/media/camera/camera-intents
- Trigger an error / crash
- 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?
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.
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.
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.
@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:
Would you mind providing a reproducible sample/giving more details into your setup?
(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)
@chris-mitchell I'm closing this issue due to the lack of reproduction but feel free to comment here with more details. Thanks!