Summary
dd-sdk-android-compose:3.7.1 crashes silently at runtime when the consuming app uses Compose UI 1.8.0 or newer, causing Compose gesture/tap tracking to be completely non-functional. The KCP compile-time instrumentation works correctly, but the runtime hit-testing always fails.
Root Cause
LayoutNodeUtils.getLayoutNodeBoundsInWindow() accesses LayoutNode.layoutDelegate via Kotlin's @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") mechanism:
// dd-sdk-android-compose/internal/utils/LayoutNodeUtils.kt
fun getLayoutNodeBoundsInWindow(node: LayoutNode): Rect? {
return runSafe("getLayoutNodeBoundsInWindow") {
node.layoutDelegate.outerCoordinator.coordinates.boundsInWindow()
}
}
The JVM getter for this @InternalComposeApi property is getLayoutDelegate$ui_release(). This method was removed in Compose UI 1.8.0 as part of an internal layout system refactoring.
At runtime, every call throws:
java.lang.NoSuchMethodError: No virtual method getLayoutDelegate$ui_release()
Landroidx/compose/ui/node/LayoutNodeLayoutDelegate;
in class Landroidx/compose/ui/node/LayoutNode;
or its super classes
This exception is caught by runSafe, which returns null. The hit-testing in ComposeActionTrackingStrategy then returns false for every node, and no Compose taps are ever attributed — producing the log message: "We could not find a valid target for the gesture event. Compose actions tracking not enabled, or the compose view is not tagged."
Affected Versions
| Component |
Version |
dd-sdk-android-compose |
3.7.1 |
dd-sdk-android-gradle-plugin (KCP) |
1.23.0 |
androidx.compose.ui:ui (consuming app) |
1.10.0 (BOM 2025.12.01) |
androidx.compose.ui:ui (SDK compiled against) |
1.5.4 (BOM 2023.10.01) |
The break was introduced in Compose UI 1.8.0 (BOM 2025.04.01). The last working Compose BOM is 2025.04.00 (Compose UI 1.7.8).
Impact
- Compile-time KCP instrumentation (
Modifier.instrumentedDatadog injection) works correctly — bytecode inspection confirms invokestatic DatadogModifierKt.instrumentedDatadog calls are present in all feature module composables.
- Runtime gesture/tap tracking via
RumConfiguration.Builder.enableComposeActionTracking() is completely broken for any app on Compose UI 1.8+.
- Downgrading Compose is not feasible: the app uses
lifecycle:2.10.0 which requires Compose UI 1.8+.
Suggested Fix
Update LayoutNodeUtils.getLayoutNodeBoundsInWindow() to use the public coordinates.boundsInWindow() API without accessing layoutDelegate directly, or use a reflection-based fallback that targets the new internal structure introduced in Compose UI 1.8.0.
Reproduction
Any Android app that:
- Uses
dd-sdk-android-compose:3.7.1 with enableComposeActionTracking()
- Depends on
androidx.compose.ui:ui:1.8.0 or newer (e.g. via Compose BOM 2025.04.01+)
Summary
dd-sdk-android-compose:3.7.1crashes silently at runtime when the consuming app uses Compose UI 1.8.0 or newer, causing Compose gesture/tap tracking to be completely non-functional. The KCP compile-time instrumentation works correctly, but the runtime hit-testing always fails.Root Cause
LayoutNodeUtils.getLayoutNodeBoundsInWindow()accessesLayoutNode.layoutDelegatevia Kotlin's@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")mechanism:The JVM getter for this
@InternalComposeApiproperty isgetLayoutDelegate$ui_release(). This method was removed in Compose UI 1.8.0 as part of an internal layout system refactoring.At runtime, every call throws:
This exception is caught by
runSafe, which returnsnull. The hit-testing inComposeActionTrackingStrategythen returnsfalsefor every node, and no Compose taps are ever attributed — producing the log message: "We could not find a valid target for the gesture event. Compose actions tracking not enabled, or the compose view is not tagged."Affected Versions
dd-sdk-android-compose3.7.1dd-sdk-android-gradle-plugin(KCP)1.23.0androidx.compose.ui:ui(consuming app)1.10.0(BOM2025.12.01)androidx.compose.ui:ui(SDK compiled against)1.5.4(BOM2023.10.01)The break was introduced in Compose UI 1.8.0 (BOM
2025.04.01). The last working Compose BOM is2025.04.00(Compose UI1.7.8).Impact
Modifier.instrumentedDatadoginjection) works correctly — bytecode inspection confirmsinvokestatic DatadogModifierKt.instrumentedDatadogcalls are present in all feature module composables.RumConfiguration.Builder.enableComposeActionTracking()is completely broken for any app on Compose UI 1.8+.lifecycle:2.10.0which requires Compose UI 1.8+.Suggested Fix
Update
LayoutNodeUtils.getLayoutNodeBoundsInWindow()to use the publiccoordinates.boundsInWindow()API without accessinglayoutDelegatedirectly, or use a reflection-based fallback that targets the new internal structure introduced in Compose UI 1.8.0.Reproduction
Any Android app that:
dd-sdk-android-compose:3.7.1withenableComposeActionTracking()androidx.compose.ui:ui:1.8.0or newer (e.g. via Compose BOM2025.04.01+)