Fatal error with Android SDK: java.lang.NullPointerException: ConversationHeaderV2

  • 13 March 2024
  • 3 replies

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<init>, parameter subtitle
E/AndroidRuntime(32192):     at<init>(Unknown Source:8)
E/AndroidRuntime(32192):     at
E/AndroidRuntime(32192):     at$intercom_sdk_base_release(ConversationReducer.kt:77)
E/AndroidRuntime(32192):     at$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
E/AndroidRuntime(32192):     at android.os.Handler.handleCallback(
E/AndroidRuntime(32192):     at android.os.Handler.dispatchMessage(
E/AndroidRuntime(32192):     at android.os.Looper.loopOnce(
E/AndroidRuntime(32192):     at android.os.Looper.loop(
E/AndroidRuntime(32192):     at
E/AndroidRuntime(32192):     at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32192):     at$
E/AndroidRuntime(32192):     at
E/AndroidRuntime(32192):     Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{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.


Best answer by cameron.gumley 15 March 2024, 05:17

View original

3 replies

Userlevel 2
Badge +3

Hi @Joshua Strobl -- Cam from the Intercom Engineering Support team here!

Just wanted to touch base from our team to let you know that, given Intercom does not have an official SDK built for Flutter and the Flutter package you’re using is built and managed by a third-party, we aren’t able to provide support for issues like this when they come up. That being said, perhaps the community here has some experience with this issue and can provide some advice or I’d certainly recommend reaching out to the team that built the package as they’ll be best placed to look into this for you 👍

The source code for intercom_flutter can be trivially reviewed at and

In IntercomFlutterPlugin.kt, it initializes an Android client which is provided from the Intercom Android SDK. It is effectively a fancy proxy to Intercom’s own SDK and for exposing various events, it contains a minimal set of logic for that to work. For example, it’s “displayCarousel” function calls Intercom’s own functionality: Intercom.client().presentContent(IntercomContent.Carousel(carouselId))

In intercom_flutter.dart, it’s just calling the instance for the specific mobile platform (Android or iOS). As an example, the displayCarousel function when called on Android calls intercom_flutter Android platform code, which calls out to Intercom’s SDK for Android.

We both can see from the stack trace above that the issue is triggered internally to Intercom Android SDK, not intercom_flutter. The expectation is that this will be forwarded to the team responsible for the Android SDK so they may bisect the issue raised between SDK 15.5.0 and 15.6.0 which triggers the crash. Thanks!

@Cam G. Please take a look at my message above and forward it to the team. Thanks.