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

[SR] Opening Android Web Browser Custom Tabs stops replay and does not resume

Open krystofwoldrich opened this issue 1 year ago • 1 comments

Description

Opening https://developer.chrome.com/docs/android/custom-tabs using expo-web-browser stops replay and shows App In Background breadcrumbs, but after closing the in-app browser the replay does not resume.

Using https://github.com/getsentry/sentry-java/releases/tag/7.12.0-alpha.4 and https://github.com/getsentry/sentry-react-native/pull/3930/commits/e9c611678d832d3d30ba674caf70ccd58cec8ab0

This example is from my build of https://github.com/krystofwoldrich/bluesky-social-app/pull/1

https://sentry-sdks.sentry.io/replays/b29f68e9b2c24e2880f2fd40f0fe3735

krystofwoldrich avatar Jul 10 '24 10:07 krystofwoldrich

Maybe we could have a public API like doNotEndWithSession or something that keeps the replay running. There will be a gap in the replay, but it's still the same one after returning back to the app from another process

romtsn avatar Mar 26 '25 14:03 romtsn

This might also relate to https://github.com/getsentry/sentry-react-native/issues/4954 were Browser Custom Tabs are used.

antonis avatar Jul 14 '25 16:07 antonis

So I tested this and it is indeed the case, because custom tabs launches in a separate process which we have no control over and cannot record it:

Image

So if a user spends more than 30s in the custom tab we'll end the session and the replay. But this is expected behavior and the moment and we'd need to think of how to better address this. I think this can be addressed both by #2934 and #4794. But as for this issue we can close it in favour of those two, as this is intended behavior.

romtsn avatar Oct 09 '25 16:10 romtsn