Android -Crash in Intercom SDK – ViewTreeLifecycleOwner not found (Compose-related crash in View-based app)-17.0.0 | Community
Skip to main content

 

Hi Intercom Support Team,

We’re encountering a runtime crash in our Android application after integrating the latest version of the Intercom SDK.

Although our app is developed using Kotlin with traditional View-based UI (not Jetpack Compose), the crash appears to be originating from Compose-related code within the Intercom SDK.

Crash Details (from Firebase Crashlytics):
 

java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.FrameLayout{654c395 V.E...... ........ 0,0-2171,1080 #7f0b04aa app:id/intercom_overlay_root viewInfo = } at androidx.compose.ui.internal.InlineClassHelperKt.throwIllegalStateExceptionForNullCheck(InlineClassHelper.kt:32) at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer(WindowRecomposer.android.kt:455) at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer$default(WindowRecomposer.android.kt:321)

Environment:

  • Language: Kotlin
  • UI Framework: View-based (no Jetpack Compose)
  • Android Version: 15
  • Intercom SDK Version: 17.0.0
  • Crash Occurrence: Observed in production via Firebase Crashlytics

Description:

This crash seems to be caused when Intercom initializes a view (intercom_overlay_root) that internally relies on Compose APIs requiring a ViewTreeLifecycleOwner. Since our app doesn’t use Compose, this lifecycle context isn’t present, leading to a fatal exception.

Request:

Please advise on:

  • Whether this is a known issue in the latest Intercom SDK
  • If there is a recommended workaround or patch
  • Whether a fix is planned in an upcoming release

We’re happy to provide more device-specific logs or configuration details if needed.

Best regards,
Harendra Yadav

Hey there ​@Harendra, Emily here from Support Engineering at Intercom 👋🏼

 

We’ve identified the root cause of this crash and it's related to Intercom in-app notifications on certain screens. The issue stems from how we render in-apps using Jetpack Compose, which gets added to the activity using the addView method.


The team confirmed that a fix was shipped for this and updating to the latest version of the Android SDK, v17.0.2, should resolve the issue. Let me know if you still see issues after updating though! 🙏


Reply