-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attachScreenshot
option can result in a blank UI on Android
#3314
Comments
Also, something I noticed while building this repro, |
Thank you for the information and the reproducible example, |
I believe screenshots should not be taken when SDK is disabled, let's handle this as a separate issue. |
Though the consts are machine-dependent I'm posting the config I manager to reproduce the issue with. const INTERVAL_FOR_TAKING_SCREENSHOTS = 5;
const TIMEOUT_TO_STOP_CAPTURING_SCREENSHOTS_AFTER_DETAILS_SCREEN_IS_RENDERED = 100;
const HOW_MANY_SVGS_TO_RENDER_ON_DETAILS_SCREEN = 100; |
Sure, I'll get one raised. |
Using the https://github.com/getsentry/sentry-java/tree/feat/pixel-copy-api-for-screenshots |
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)SDK version: 5.9.2
react-native
version: 0.71.13Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
N/A
Configuration:
(
@sentry/react-native
)I have following issue:
There seems to be a timing-related issue between
@sentry/react-native
(orsentry-android
) andreact-native-screens
/@react-navigation/native-stack
on Android. If Sentry tries to capture a screenshot near to/during navigation occurring and a new activity being mounted the activity's view becomes invisible (but it is still possible to interact with the invisible elements).Steps to reproduce:
attachScreenshot
optionSentry.captureException()
while navigation is occuring.Actual result:
UI displays blank. See video below.
Expected result:
attachScreenshot
does not interfere with the rendering of the UI.Minimal repro:
Clone https://github.com/liamjones/sentry-screenshot-bug, build & launch the app then tap the Navigate button. If the problem doesn't happen try tweaking the constants in the top of
App.tsx
. Since it's a timing-related issue it's a fine balance between triggering the issue reliably vs asking the JS thread to do too much. I think it's also related to the layout of the newly mounted screen taking a long time (hence rendering a bunch of SVGs in the screen in the repro). Video using the repo which shows it happening 2 out of 3 times: https://drive.google.com/file/d/14p0Cv60Gv1rLcVLHaT7YHKDxT-RmrbxD/view?usp=sharingThe text was updated successfully, but these errors were encountered: