intercom_flutter
intercom_flutter copied to clipboard
java.lang.IllegalStateException - ViewTreeLifecycleOwner not found
Crash happens as soon as I launch the app on Android
Android 13 Galaxy S23 Ultra
Fatal Exception: java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.FrameLayout{b75b00b V.E...... ......ID 0,0-1440,2920 #7f080165 app:id/intercom_overlay_root} at androidx.compose.ui.platform.WindowRecomposer_androidKt.b(:162) at androidx.compose.ui.platform.WindowRecomposer_androidKt.c(:11) at androidx.compose.ui.platform.o2$a$a.a(:7) at androidx.compose.ui.platform.p2.a(:13) at androidx.compose.ui.platform.WindowRecomposer_androidKt.h(:23) at androidx.compose.ui.platform.a.resolveParentCompositionContext(:41) at androidx.compose.ui.platform.a.ensureCompositionCreated(:8) at androidx.compose.ui.platform.a.createComposition(:16) at androidx.compose.ui.platform.ComposeView.setContent(:19) at io.intercom.android.sdk.m5.notification.InAppNotificationCardKt.addTicketHeaderToCompose(:23) at io.intercom.android.sdk.overlay.ChatNotification.populateViewsWithData(:77) at io.intercom.android.sdk.overlay.ChatNotification.display(:66) at io.intercom.android.sdk.overlay.InAppNotificationPresenter.addNewNotifications(:127) at io.intercom.android.sdk.overlay.InAppNotificationPresenter.displayNotificationsAfterAttach(:39) at io.intercom.android.sdk.overlay.InAppNotificationPresenter$1.run(:6) at io.intercom.android.sdk.utilities.ViewUtils$1.onGlobalLayout(:7) at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1084) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4298) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3112) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10881) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309) at android.view.Choreographer.doCallbacks(Choreographer.java:923) at android.view.Choreographer.doFrame(Choreographer.java:852) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8747) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
@michaeljajou Which version are you using?
will updating to 7.6.9 fix the issue?
I'm also getting this issue when using 7.6.8
@michaeljajou @totzk9 Could you please test the example app and see if the same issue happens? https://github.com/v3rm0n/intercom_flutter/tree/master/intercom_flutter/example
I have a new update. Apparently, the issue did not occur again after closing all the chats in the Intercom Dashboard.
It's a weird bug that I can't understand.
I got the same crash and stack trace when my app got an in-app notification about creating a ticket ("Setting" -> "your workspace data" -> "Ticket types" feature) in the chat. The fix for me is to return back the FlutterFragmentActivity as it was in the docs before this commit
any updates ?