- 
                Notifications
    You must be signed in to change notification settings 
- Fork 163
Description
Summary
The Intercom Android SDK crashes with a NullPointerException when users tap on "recent messages" or try to access previous chat conversations. The crash occurs in the TopAppBarUiState constructor when it receives a null subtitle parameter.
Environment
SDK Version: intercom_flutter: ^9.4.6
Platform: Android
Flutter Version: 3.6.0+
Target SDK: 34
Min SDK: 24
Steps to Reproduce
Initialize Intercom in the app
Open Intercom messenger (this works fine)
Create message ("test" for example) and go back to main page
Tap on "recent messages" or try to access previous chat conversations
App crashes immediately with the stack trace below
Expected Behavior
Users should be able to access their previous chat conversations and recent messages without the app crashing.
Actual Behavior
App crashes with NullPointerException when trying to load conversation history, specifically when the SDK attempts to create the top app bar state for the conversation view.
Stack Trace
E/AndroidRuntime(27242): FATAL EXCEPTION: main
java.lang.NullPointerException: Parameter specified as non-null is null: method io.intercom.android.sdk.m5.conversation.states.TopAppBarUiState.<init>, parameter subtitle
E/AndroidRuntime(27242): 	at io.intercom.android.sdk.m5.conversation.states.TopAppBarUiState.<init>(Unknown Source:7)
E/AndroidRuntime(27242): 	at io.intercom.android.sdk.m5.conversation.reducers.HeaderReducerKt.reduceTopAppBarUiState(HeaderReducer.kt:45)
E/AndroidRuntime(27242): 	at io.intercom.android.sdk.m5.conversation.reducers.ConversationReducer.computeUiState$intercom_sdk_base_release(ConversationReducer.kt:68)
E/AndroidRuntime(27242): 	at io.intercom.android.sdk.m5.conversation.ConversationViewModel$special$$inlined$map$1$2.emit(Emitters.kt:220)
E/AndroidRuntime(27242): 	at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:392)
E/AndroidRuntime(27242): 	at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
E/AndroidRuntime(27242): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime(27242): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
E/AndroidRuntime(27242): 	at android.os.Handler.handleCallback(Handler.java:1087)
E/AndroidRuntime(27242): 	at android.os.Handler.dispatchMessage(Handler.java:125)
E/AndroidRuntime(27242): 	at android.os.Looper.dispatchMessage(Looper.java:333)
E/AndroidRuntime(27242): 	at android.os.Looper.loopOnce(Looper.java:263)
E/AndroidRuntime(27242): 	at android.os.Looper.loop(Looper.java:367)
E/AndroidRuntime(27242): 	at android.app.ActivityThread.main(ActivityThread.java:9230)
E/AndroidRuntime(27242): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(27242): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
E/AndroidRuntime(27242): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)