Firebase in-app messaging THROWS NULL POINTER EXCEPTION
[REQUIRED] Step 2: Describe your environment
Android Studio version: 3.2 Firebase Component: In-App Messaging Component version: 17.1.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce: I set up campaign which should show "modal" triggered by "on_foreground" event. From time to time I receive below crash. There are no reasonable reproduce steps.
Relevant Code:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.inappmessaging.model.MessageType com.google.firebase.inappmessaging.model.InAppMessage.getMessageType()' on a null object reference
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.extractActions(SourceFile:449)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.inflateBinding(SourceFile:317)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.access$400(SourceFile:82)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$2.run(SourceFile:292)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5753)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
@bolds07 thanks for the report!
@JasonAHeron somehow a null instance of InAppMessage is getting into this app.
Thanks for reporting!
is this issue solved yet?
Hey guys, we're suffering the same problem with v18.0.1. Any updates?
Hey yes in the latest versions of our SDK this should be fixed.