Skip to main content

Our Android app is integrated with Intercom and everythign works well on Compose Version 1.3.3, but when updated to 1.4.0 intercom keeps crashing when we try to show the messenger.

This is the stacktrace

java.lang.NoSuchMethodError: No virtual method getOffset()Landroidx/compose/runtime/State; in class Landroidx/compose/material/ModalBottomSheetState; or its super classes (declaration of 'androidx.compose.material.ModalBottomSheetState' appears in /data/app/~~z4UTrvmcfPy_7KD14FmyyA==/com.pleny.tst-yaxEdFlvh_1wkGx-0_Cr-A==/base.apk)
at io.intercom.android.sdk.m5.IntercomStickyBottomSheetKt.getEquivalentCorner(IntercomStickyBottomSheet.kt:175)
at io.intercom.android.sdk.m5.IntercomRootActivity$onCreate$1$1.invoke(IntercomRootActivity.kt:102)
at io.intercom.android.sdk.m5.IntercomRootActivity$onCreate$1$1.invoke(IntercomRootActivity.kt:48)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.material.MaterialTheme_androidKt.PlatformMaterialTheme(MaterialTheme.android.kt:23)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:82)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:81)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material.TextKt.ProvideTextStyle(Text.kt:363)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:72)
at io.intercom.android.sdk.m5.IntercomThemeKt.IntercomTheme(IntercomTheme.kt:83)
at io.intercom.android.sdk.m5.IntercomRootActivity$onCreate$1.invoke(IntercomRootActivity.kt:48)
at io.intercom.android.sdk.m5.IntercomRootActivity$onCreate$1.invoke(IntercomRootActivity.kt:47)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:194)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:123)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:122)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:114)
2023-03-27 17:52:33.964 15765-15765 AndroidRuntime com.pleny.tst E at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:156)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:155)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:155)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:140)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3352)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3342)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3342)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3277)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:587)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:966)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1099)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:131)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:181)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:138)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1174)
at android.view.View.dispatchAttachedToWindow(View.java:22468)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3686)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3695)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3695)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3695)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3695)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3544)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2991)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10665)
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:8741)
2023-03-27 17:52:33.964 15765-15765 AndroidRuntime com.pleny.tst E 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:1067)

 

Hey @amrhany Racheal from the support engineer team here👋 

It looks like we have an open issue logged with the team relating to this error. I’ve gone ahead and sent in a message on your behalf so we can get you added to the issue, that way we can let you know of any updates!


Hi there! We are also facing exact same issue. Please, let me know if any solution will be applied


We have had a ticket open for a few weeks now, looking forward to this update to bring Articles into our app! (Currently we can only display on iOS)


Hi. We’ve just updated to v14.2.0 of the Android SDK which states “Fixed an issue that caused a crash when opening the Help Centre”, which I assumed was this issue… But unfortunately it’s still crashing.

It’s been broken for over a month now, and is blocking us from using any features of the new SDK which would help us a lot. Please could this be prioritised.

Thanks!


This is still an issue on https://github.com/intercom/intercom-android/releases/tag/14.2.0

Downgrading androidx.compose.material:material from 1.4.0 to 1.3.1 works.


Any news about this issue?


Hi, this issue still doesn’t appear to be solved with 14.2.0. I’ve tried with both ` androidx.compose.material:material` on 1.4.0 and 1.3.1. I’m the original compose ModalBottomSheetState error.


@Amrish We are also facing this issue surprisingly only in one of two apps which use the same intercom sdk version. (14.2.0) I will see if i can find out more what difference on both might cause this. 

 


@Courtney you might need to enforce the use of `1.3.1` because another library might be requesting `1.4.0`:

implementation("androidx.compose.material:material") {
version {
strictly('1.3.1)
}
}

Hopefully it doesn’t break the other library 😅


@Seb @Courtney 

In our case it was accompanist-swiperefresh which dependended on a newer material version. 

Resolving to strictly 1.3.1 wasn’t possible as it broke the screen using accompanist. 

We downgraded the accompanist version for now since it depends on a compatible material compose version. 

./gradlew dependencies 

Should help identify which of your dependencies might bring in an incompatible material compose version. 


@Racheal can we please be added to the open issue as well? we’re also experiencing this problem


I didn’t get - why the issue is solved? Downgrading 3rd-party library is not an option.


@Racheal I was neither added to the open issue, nor was this issue resolved on 14.2.0.


@Racheal  Is there any progress on the issue? We're currently blocked by a version and downgrading the compose library isn't a viable solution


@Racheal yet another customer has this issue. We just stumbled upon a crash caused by this. Are there any updates on this?


Hey @amrhany@bkolarov-phyre , @JuanFraga,  @Anton Dudakov, @Mobile Team@Support Bot, @Corwin Perdomo, @Kavi, @Seb, @Junior Vansuita, @Konstantin Otte tagging you all here to make sure you get the ping!
 

To clarify- the answer was marked as solve because I’ve forwarded the original poster’s conversation into Intercom to look into further for them, the issue is still open. To be added to the issue please feel free to open up a conversation with support so we can update you of any progress, or fixes.

 

Sorry for any confusion here and definitely understand this has been a pain for all of you. Please know that I have advocated to weight this as heavily as possible in our Engineering team’s current prioritization of work to be done. And, once you are added to the issue we’ll be sure to relay any new updates—or ideally a resolution—that is surfaced from our engineers.

   


@Racheal I was neither added to the open issue, nor was this issue resolved on 14.2.0.

It looks like my teammate Ayk replied to your conversation on March 28th and let you know that he has added you to the issue. If you didn’t receive the reply, can you check your email (that you have used to sign up for the community here)?


Hey @amrhany@bkolarov-phyre , @JuanFraga,  @Anton Dudakov@Mobile Team@Support Bot@Corwin Perdomo@Kavi@Seb@Junior Vansuita@Konstantin Otte tagging you all here to make sure you get the ping!
 

To clarify- the answer was marked as solve because I’ve forwarded the original poster’s conversation into Intercom to look into further for them, the issue is still open. To be added to the issue please feel free to open up a conversation with support so we can update you of any progress, or fixes.

 

Sorry for any confusion here and definitely understand this has been a pain for all of you. Please know that I have advocated to weight this as heavily as possible in our Engineering team’s current prioritization of work to be done. And, once you are added to the issue we’ll be sure to relay any new updates—or ideally a resolution—that is surfaced from our engineers.

   

@Racheal Thank you for your reply. I sent a message through your support chat and I’m waiting to be added to the issue. Still, is there an estimated release date for this? 


Hey all 👋🏼 back with an exciting update. I’ve just got word from our engineers they have created a fix for this and we will release a new version on May 9.

 


Hello @Racheal,
I tested the latest version 15.0.0. The problem seems to be solved. Thank you.


I still have the issue:
 

E/AndroidRuntime( 9304): java.lang.NoSuchMethodError: No virtual method getOffset()Landroidx/compose/runtime/State; in class Landroidx/compose/material/ModalBottomSheetState; or its super classes (declaration of 'androidx.compose.material.ModalBottomSheetState' appears in /data/app/cz.pixelfield.teki-_35AFOosN-CwvzaYgLXU2g==/base.apk)
E/AndroidRuntime( 9304): at io.intercom.android.sdk.m5.IntercomStickyBottomSheetKt.getEquivalentCorner(IntercomStickyBottomSheet.kt:175)
E/AndroidRuntime( 9304): at io.intercom.android.sdk.m5.IntercomRootActivity$onCreate$1$1.invoke(IntercomRootActivity.kt:102)
E/AndroidRuntime( 9304): at io.intercom.android.sdk.m5.IntercomRootActivity$onCreate$1$1.invoke(IntercomRootActivity.kt:48)
E/AndroidRuntime( 9304): at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)

 


Hey all 👋🏼 back with an exciting update. I’ve just got word from our engineers they have created a fix for this and we will release a new version on May 9.

 

@Racheal Thanks for your message. For us, the Intercom.client().present(IntercomSpace.Messages) does not crash our app anymore, but for some accounts, the list of messages will show for a split second and then it is replaced with a “No messages” screen. Are you aware of this problem?


Reply