Skip to content

Session Replay: VerifyError in ComposeViewHierarchyNode (androidx.compose.ui.geometry.Rect) under DexGuard/R8 obfuscation #5497

Description

@Kobby-Bawuah

Integration

sentry-android

Build System

Gradle

AGP Version

Release build with DexGuard 9.13.2 (aggressive obfuscation/optimization)

Proguard

Enabled

Other Error Monitoring Solution

No

Version

8.25.0 (the affected code path is unchanged on main/8.43.0 — see below)

Steps to Reproduce

Steps to Reproduce:

  1. Compose app (androidx.compose.ui 1.7.2), Session Replay enabled.
  2. Release build with aggressive obfuscation (DexGuard / R8 full mode).
  3. Launch the app; Replay captures the first Compose screen.

Expected Result

Replay captures the Compose screen without crashing.

Actual Result

Fatal VerifyError at class load when Replay traverses the Compose tree:
java.lang.VerifyError: Verifier rejected class io.sentry.android.replay.viewhierarchy.<obf>: ... <m>(androidx.compose.ui.node.LayoutNode, <obf>, int, boolean, io.sentry.SentryOptions) failed to verify: [0x65] 'this' argument 'Unresolved Reference: androidx.compose.ui.geometry.Rect' not instance of 'Reference: <obf>' at io.sentry.android.replay.util.ViewsKt.traverse(Views.kt:36) at io.sentry.android.replay.screenshot.PixelCopyStrategy...onPixelCopyFinished(...) at android.view.PixelCopy$1.lambda$onCopyFinished$0(PixelCopy.java:193)

Deobfuscated, the rejected method maps to ComposeViewHierarchyNode.fromComposeNode(...).

What I've found so far:

Note on upgrading: The boundsInWindow → localBoundingBoxOf → Rect reference is still present on main/8.43.0, and sentry-android-replay/proguard-rules.pro doesn't appear to keep the Compose geometry/layout/node classes, so upgrading alone may not resolve it. Flagging in case a keep-rule or guarding change is needed; we'll defer to you on the right fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions