Repository navigation
fix(replay): Mask the whole Compose view when traversing it fails (JAVA-552) - #6679
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
When the Compose tree can't be traversed, for example with an unsupported Compose version, fromView returned false. The view was then walked as a plain ViewGroup, whose children don't include the composables, so their text and images were recorded unmasked. The whole Compose view is now masked instead. Screenshot masking shares this traversal, so it fails closed too. Refs #5513 Refs JAVA-552 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 19, 2026
📲 Install BuildsAndroid
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
When the Compose tree of a view can't be traversed, for example with an unsupported Compose version,
ComposeViewHierarchyNode.fromViewreturnedfalse. The view was then walked as a plainViewGroup. Its children don't include the composables, so their text and images were recorded unmasked.The whole Compose view is now masked instead. Screenshot masking uses the same traversal, so it fails closed too.
This happens on
9.x.xtoday for any traversal failure, independently of the other PRs. #6666 makes one more failure reach this path: aLinkageErrorfromfindPainternow aborts the traversal instead of being swallowed.This PR changes 1 site, the traversal catch in
fromView. #6666 also changes that catch, to handleLinkageErrorfirst. The two PRs edit different lines of it.💡 Motivation and Context
This is part of the
catch (Throwable)audit. A review of #6666 asked what happens to the frame when the Compose traversal fails.This PR is independent of its siblings and they can merge in any order:
rethrowIfFatalat boundary sitesLinkageErrorisn't fatalUserInteractionTeststhread-safe list💚 How did you test it?
sentry-android-replay, plus detekt.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The changelog entry for the whole set is in #6665.
#skip-changelog
🤖 Generated with Claude Code