From 86d0af17b75f5887142fc957b787b5fdece31bc2 Mon Sep 17 00:00:00 2001 From: tsushanth <78000697+tsushanth@users.noreply.github.com> Date: Wed, 1 Jul 2026 19:12:25 -0700 Subject: [PATCH 1/3] fix(compose): add isImportantForBounds() to SentryTagModifierNode for compose-ui 1.11+ compose-ui 1.11 added SemanticsModifierNode.isImportantForBounds() as an abstract method. SentryTagModifierNode was compiled against compose-ui 1.6.x, where the method does not exist, so its bytecode lacks an implementation. When an accessibility client (TalkBack, UiAutomator, adb uiautomator dump) traverses the Compose semantics tree at runtime on 1.11+, the JVM cannot find the method and throws AbstractMethodError. Adding fun isImportantForBounds(): Boolean = false without the override keyword (since the method is absent from the 1.6.x compile-time dependency) places the method in the class bytecode. The JVM satisfies the abstract method requirement via signature matching at runtime. SentryTagModifierNode stores only a semantic tag with no layout/visual effect, so false is the correct return value. --- .../kotlin/io/sentry/compose/SentryModifier.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt b/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt index 3fec407987b..704273b5e07 100644 --- a/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt +++ b/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt @@ -53,5 +53,16 @@ public object SentryModifier { override fun SemanticsPropertyReceiver.applySemantics() { this[SentryTag] = tag } + + // SemanticsModifierNode.isImportantForBounds() was added as an abstract method in + // compose-ui 1.11. Classes compiled against earlier versions lack this method in + // their bytecode, which causes AbstractMethodError when the accessibility tree is + // traversed on 1.11+ runtimes. We can't use the `override` keyword here because + // the method doesn't exist in the compile-time dependency (compose-ui 1.6.x), but + // the JVM satisfies the abstract-method requirement at runtime via signature + // matching. SentryTagModifierNode only stores a semantic tag and has no visual + // effect on layout, so it is not important for bounds. + @Suppress("unused") + fun isImportantForBounds(): Boolean = false } } From 24f231b52d6561170fdeb70b333e0cbc639d00c3 Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Thu, 2 Jul 2026 09:31:57 +0200 Subject: [PATCH 2/3] fix formatting --- .../src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt b/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt index 704273b5e07..787c66b3b0b 100644 --- a/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt +++ b/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt @@ -62,7 +62,6 @@ public object SentryModifier { // the JVM satisfies the abstract-method requirement at runtime via signature // matching. SentryTagModifierNode only stores a semantic tag and has no visual // effect on layout, so it is not important for bounds. - @Suppress("unused") - fun isImportantForBounds(): Boolean = false + @Suppress("unused") fun isImportantForBounds(): Boolean = false } } From 032e0a6bf63b89e50210078eccfa6d45ffe7f884 Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Thu, 2 Jul 2026 09:42:05 +0200 Subject: [PATCH 3/3] chore(changelog): Add Changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73bb2ef396e..f2f4154db2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Don't start a redundant UI interaction transaction when a transaction is already bound to the Scope ([#5491](https://github.com/getsentry/sentry-java/issues/5491)) - Previously, `SentryGestureListener` always started a UI transaction and only afterwards skipped binding it to the Scope when a manually-bound transaction already existed, leaving the new transaction to be dropped as an idle transaction without children. - Fix potential NPE within `Scope.endSession()` ([#5657](https://github.com/getsentry/sentry-java/pull/5657)) +- Fix AbstractMethodError when compose-ui 1.11+ is used in combination with `Modifier.sentryTag()` or the Sentry Kotlin compiler plugin ([#5672](https://github.com/getsentry/sentry-java/pull/5672)) ### Performance