I am getting a crash when using the Android SDK via a Flutter-based application. This crash is occurring on a Pixel 8 running Android 14.
- intercom_flutter 8.1.1
- This uses Android SDK 15.6.3
- Also tested against intercom 8.0.9, which uses SDK 16.5.1
- Built using minSdkVersion 21, compileSdkVersion being Flutter’s compile SDK version. Java compatibility set to JavaVersion.VERSION_1_8
This crash occurs when clicking to access recent messages.
E/AndroidRuntime(32192): java.lang.NullPointerException: Parameter specified as non-null is null: method io.intercom.android.sdk.m5.conversation.states.ConversationHeaderV2.<init>, parameter subtitle
E/AndroidRuntime(32192): at io.intercom.android.sdk.m5.conversation.states.ConversationHeaderV2.<init>(Unknown Source:8)
E/AndroidRuntime(32192): at io.intercom.android.sdk.m5.conversation.reducers.HeaderReducerKt.reduceHeaderV2(HeaderReducer.kt:48)
E/AndroidRuntime(32192): at io.intercom.android.sdk.m5.conversation.reducers.ConversationReducer.computeUiState$intercom_sdk_base_release(ConversationReducer.kt:77)
E/AndroidRuntime(32192): at io.intercom.android.sdk.m5.conversation.ConversationViewModel$special$$inlined$map$1$2.emit(Emitters.kt:224)
E/AndroidRuntime(32192): at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:396)
E/AndroidRuntime(32192): at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
E/AndroidRuntime(32192): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime(32192): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/AndroidRuntime(32192): at android.os.Handler.handleCallback(Handler.java:959)
E/AndroidRuntime(32192): at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(32192): at android.os.Looper.loopOnce(Looper.java:232)
E/AndroidRuntime(32192): at android.os.Looper.loop(Looper.java:317)
E/AndroidRuntime(32192): at android.app.ActivityThread.main(ActivityThread.java:8501)
E/AndroidRuntime(32192): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32192): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/AndroidRuntime(32192): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/AndroidRuntime(32192): Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: cStandaloneCoroutine{Cancelling}@3100cb8, Dispatchers.Main.immediate]
Further investigation and testing related to Android by incrementally updating
- intercom_flutter:intercom_flutter: 8.0.4 -- does not cause crash
- intercom_flutter: 8.0.5 -- does not cause crash
- intercom_flutter: 8.0.6 -- does not cause crash
- intercom_flutter: 8.0.7 -- does not cause crash
- intercom_flutter: 8.0.8 -- FTBFS jetified error
- intercom_flutter: 8.0.9 -- crash triggered
intercom_flutter 8.0.9 updates the Android SDK to 15.6.0. 8.0.5 was the release prior that updated the Android SDK to 15.5.0, so a regression was introduced between 15.5.0 and 15.6.0.