Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in Android when calling displayMessenger due to code shrinking #383

Open
cerealexx opened this issue Nov 23, 2023 · 12 comments
Open
Labels
crash Something is crashing platform-android Specific to Android platform

Comments

@cerealexx
Copy link

Strange enough, it works without --release mode.
I'm using JVM17 and AGP8 btw.

java.lang.IncompatibleClassChangeError: Class 'android.content.res.XmlBlock$Parser' does not implement interface 'hk.a' in call to 'int hk.a.next()' (declaration of 'h1.a' appears in base.apk)
       at h1.a.a(SourceFile:6)
       at u1.e.c(SourceFile:66)
       at u1.e.d(SourceFile:113)
       at io.intercom.android.sdk.m5.components.HomeItemKt.HomeItem(SourceFile:112)
       at io.intercom.android.sdk.m5.home.ui.components.SpacesCardKt$SpacesCard$1.invoke(SourceFile:50)
       at io.intercom.android.sdk.m5.home.ui.components.SpacesCardKt$SpacesCard$1.invoke(SourceFile:1)
       at t0.b.e(SourceFile:50)
       at t0.b.invoke(SourceFile:1)
       at g0.b2$a.invoke(SourceFile:40)
       at g0.b2$a.invoke(SourceFile:1)
       at t0.b.e(SourceFile:50)
       at t0.b.invoke(SourceFile:1)
       at m0.v.a(SourceFile:41)
       at g0.b2.a(SourceFile:466)
       at g0.j.a(SourceFile:146)
       at io.intercom.android.sdk.m5.home.ui.components.SpacesCardKt.SpacesCard(SourceFile:111)
       at io.intercom.android.sdk.m5.home.ui.HomeContentScreenKt.HomeContentScreen(SourceFile:52)
       at io.intercom.android.sdk.m5.home.ui.HomeScreenKt$HomeScreen$2$2$2.invoke(SourceFile:40)
       at io.intercom.android.sdk.m5.home.ui.HomeScreenKt$HomeScreen$2$2$2.invoke(SourceFile:1)
       at t0.b.d(SourceFile:50)
       at t0.b.invoke(SourceFile:2)
       at q.j.a(SourceFile:726)
       at q.j.c(SourceFile:357)
       at io.intercom.android.sdk.m5.home.ui.HomeScreenKt$HomeScreen$2.invoke(SourceFile:47)
       at io.intercom.android.sdk.m5.home.ui.HomeScreenKt$HomeScreen$2.invoke(SourceFile:1)
       at t0.b.d(SourceFile:50)
       at t0.b$a.invoke(SourceFile:2)
       at t0.b$a.invoke(SourceFile:1)
       at m0.d2.h(SourceFile:15)
       at m0.n.a1(SourceFile:97)
       at m0.n.x1(SourceFile:38)
       at m0.n.q0(SourceFile:192)
       at m0.n.X0(SourceFile:40)
       at m0.s.s(SourceFile:13)
       at m0.g2.i0(SourceFile:72)
       at m0.g2.J(Unknown Source:0)
       at m0.g2$k$a.invoke(SourceFile:71)
       at m0.g2$k$a.invoke(SourceFile:1)
       at androidx.compose.ui.platform.q0$c.doFrame(Unknown Source:10)
       at androidx.compose.ui.platform.o0.M1(SourceFile:34)
       at androidx.compose.ui.platform.o0.G1(Unknown Source:0)
       at androidx.compose.ui.platform.o0$d.doFrame(SourceFile:17)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1106)
       at android.view.Choreographer.doCallbacks(Choreographer.java:866)
       at android.view.Choreographer.doFrame(Choreographer.java:792)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
       at android.os.Handler.handleCallback(Handler.java:938)
       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:8751)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
       Suppressed: aj.i: [m0.s1@3c1edc6, androidx.compose.ui.platform.w1@d28c187, r2{Cancelling}@abbb8b4, o0@36cacdd]
@deepak786
Copy link
Collaborator

This might be related to the #371

@cerealexx Have you reported this issue to Intercom Support?

@deepak786 deepak786 added bug Something isn't working platform-android Specific to Android platform native-sdk Specific to native sdk labels Nov 24, 2023
@cerealexx
Copy link
Author

@deepak786 kinda related... It compiles with JVM 17 and AGP 8 without problems so in that way is different to #371 . It even shows a loading UI from Intercom when displaying the messenger but then crashes.
I'm waiting my topic to be published in the Intercom community and will share any updates if I have any.

@cerealexx
Copy link
Author

Hey @deepak786, I'm still waiting for an official answer from Intercom (not the quickest support...)
I'm still confused about the fact that the plugin straight up works in dev mode but crashes in release mode. Does that ring a bell to you? Shouldn't it crash in both modes?

@deepak786
Copy link
Collaborator

In the release build, code is obfuscated but not in the debug mode.
I'm not sure but you may need to add some Proguard rules?

@cerealexx
Copy link
Author

Hey @deepak786. The Intercom team has opened an issue regarding this but for the time being they pointed me into this stackoverflow thread:
https://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror

Not sure if I can do anything on my end since it's talking about libraries though.

@powilliam
Copy link

powilliam commented Feb 4, 2024

Yep. I'm still facing this even tho updating intercom_flutter to 8.0.7 as pointed on #324 did not fix. I could easily disable our intercom integration on Android using a feature flag until a fix comes

Fatal Exception: java.lang.IncompatibleClassChangeError: Class 'android.content.res.XmlBlock$Parser' does not implement interface 'bm.a' in call to 'int bm.a.next()' (declaration of 'o1.a' appears in base.apk)
       at androidx.compose.ui.graphics.vector.compat.XmlVectorParser_androidKt.seekToStartTag(XmlVectorParser.android.kt:1)
       at androidx.compose.ui.res.PainterResources_androidKt.loadVectorResource(PainterResources.android.kt:1)
       at androidx.compose.ui.res.PainterResources_androidKt.painterResource(PainterResources.android.kt:1)
       at io.intercom.android.sdk.m5.components.intercombadge.IntercomBadgeKt$IntercomBadge$1.invoke(IntercomBadge.kt:2)
       at io.intercom.android.sdk.m5.components.intercombadge.IntercomBadgeKt$IntercomBadge$1.invoke(IntercomBadge.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.material.SurfaceKt$Surface$1.invoke(Surface.kt:2)
       at androidx.compose.material.SurfaceKt$Surface$1.invoke(Surface.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:1)
       at androidx.compose.material.SurfaceKt.Surface-F-jzlyU(Surface.kt:1)
       at androidx.compose.material.CardKt.Card-F-jzlyU(Card.kt:1)
       at io.intercom.android.sdk.m5.components.intercombadge.IntercomBadgeKt.IntercomBadge(IntercomBadge.kt:1)
       at io.intercom.android.sdk.m5.home.ui.HomeScreenKt$HomeScreen$2.invoke(HomeScreen.kt:2)
       at io.intercom.android.sdk.m5.home.ui.HomeScreenKt$HomeScreen$2.invoke(HomeScreen.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:2)
       at androidx.compose.foundation.layout.BoxWithConstraintsKt$BoxWithConstraints$1$1$measurables$1.invoke(BoxWithConstraints.kt:2)
       at androidx.compose.foundation.layout.BoxWithConstraintsKt$BoxWithConstraints$1$1$measurables$1.invoke(BoxWithConstraints.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:2)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:1)
       at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:1)
       at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:1)
       at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:1)
       at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:1)
       at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1)
       at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:1)
       at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:1)
       at androidx.compose.foundation.layout.BoxWithConstraintsKt$BoxWithConstraints$1$1.invoke-0kLqBqw(BoxWithConstraints.kt:1)
       at androidx.compose.foundation.layout.BoxWithConstraintsKt$BoxWithConstraints$1$1.invoke(BoxWithConstraints.kt:1)
       at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1.measure-3p2s80s(SubcomposeLayout.kt:1)
       at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:2)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.animation.AnimatedEnterExitMeasurePolicy.measure-3p2s80s(AnimatedVisibility.kt:1)
       at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:1)
       at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$1.invoke-3p2s80s(AnimatedContent.kt:1)
       at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$1.invoke(AnimatedContent.kt:1)
       at androidx.compose.ui.layout.LayoutModifierImpl.measure-3p2s80s(LayoutModifier.kt:1)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:2)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.animation.AnimatedContentMeasurePolicy.measure-3p2s80s(AnimatedContent.kt:1)
       at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:2)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1.measure-3p2s80s(Box.kt:1)
       at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:1)
       at androidx.compose.foundation.layout.FillNode.measure-3p2s80s(Size.kt:1)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:1)
       at androidx.compose.foundation.layout.InsetsPaddingModifier.measure-3p2s80s(WindowInsetsPadding.kt:1)
       at androidx.compose.ui.node.BackwardsCompatNode.measure-3p2s80s(BackwardsCompatNode.kt:1)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:2)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1.measure-3p2s80s(Box.kt:1)
       at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:1)
       at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:1)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:2)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.layout.RootMeasurePolicy.measure-3p2s80s(RootMeasurePolicy.kt:1)
       at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:2)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2.invoke(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1)
       at androidx.compose.ui.node.LayoutNode.remeasure-_Sx5XlM$ui_release(LayoutNode.kt:1)
       at androidx.compose.ui.node.MeasureAndLayoutDelegate.doRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:1)
       at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureOnly(MeasureAndLayoutDelegate.kt:1)
       at androidx.compose.ui.node.MeasureAndLayoutDelegate.recurseRemeasure(MeasureAndLayoutDelegate.kt:1)
       at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureOnly(MeasureAndLayoutDelegate.kt:1)
       at androidx.compose.ui.platform.AndroidComposeView.onMeasure(AndroidComposeView.android.kt:104)
       at android.view.View.measure(View.java:27129)
       at androidx.compose.ui.platform.AbstractComposeView.internalOnMeasure$ui_release(ComposeView.android.kt:63)
       at androidx.compose.ui.platform.AbstractComposeView.onMeasure(ComposeView.android.kt:3)
       at android.view.View.measure(View.java:27129)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7980)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:197)
       at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:154)
       at android.view.View.measure(View.java:27129)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7980)
       at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
       at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
       at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
       at android.view.View.measure(View.java:27129)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7980)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:197)
       at android.view.View.measure(View.java:27129)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7980)
       at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
       at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
       at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
       at android.view.View.measure(View.java:27129)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7980)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:197)
       at com.android.internal.policy.DecorView.onMeasure(DecorView.java:1278)
       at android.view.View.measure(View.java:27129)
       at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4541)
       at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:3233)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3538)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2924)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10513)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1108)
       at android.view.Choreographer.doCallbacks(Choreographer.java:866)
       at android.view.Choreographer.doFrame(Choreographer.java:797)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
       at android.os.Handler.handleCallback(Handler.java:938)
       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:8751)
       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:1135)

@chrallard
Copy link

This is happening to me on 9.0.1.

@onewilk
Copy link

onewilk commented May 28, 2024

Try this. It works for me.

./app/build.gradle

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17.toString()
    }

    configurations.all {
        resolutionStrategy {
            // remove any force strategy of "androidx.compose.*"
           // force 'androidx.compose.x:x:x.x.x'
        }
    }
}

dependencies {
    implementation("androidx.compose.runtime:runtime:1.6.7")
    implementation("androidx.compose.compiler:compiler:1.5.14")
    implementation "androidx.compose.ui:ui:1.6.7"
    implementation "androidx.compose.animation:animation:1.6.7"
    implementation "androidx.compose.material:material:1.6.7"
}


./build.gradle

buildscript {
    ext.kotlin_version = '1.9.24'
}

@samnbd
Copy link

samnbd commented Aug 12, 2024

This issue happens only when running the app on release mode on Flutter 3.22.3. Any fix for this ?

@samnbd
Copy link

samnbd commented Aug 12, 2024

This is happening to me on Flutter 3.22.3 and intercom 9.0.8. Any solution for this, this is blocking us from releasing a critical app update

@brian-superlist
Copy link

Hey all, I ran into this as well after upgrading gradle to version 8.x. Adding this rule to proguard rules fixed it for us:

-keep class org.xmlpull.v1.** { *; }

Based on this comment from StackOverflow (the hero): https://stackoverflow.com/a/78176329

@deepak786 deepak786 changed the title Crash in Android when calling displayMessenger Crash in Android when calling displayMessenger due to code shrinking Nov 27, 2024
@deepak786 deepak786 added crash Something is crashing and removed bug Something isn't working native-sdk Specific to native sdk labels Nov 27, 2024
@deepak786
Copy link
Collaborator

The issue here is related to flutter/flutter#146266

The following solutions may work.

  1. Using the following Proguard rule may fix this.
-keep class org.xmlpull.v1.** { *; }
  1. Disabling R8's fullMode by adding the following in android/gradle.properties file may also fix this.
android.enableR8.fullMode=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Something is crashing platform-android Specific to Android platform
Projects
None yet
Development

No branches or pull requests

7 participants