firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Firebase in-app messaging THROWS NULL POINTER EXCEPTION

Open bolds07 opened this issue 7 years ago • 6 comments

[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)

bolds07 avatar Mar 12 '19 19:03 bolds07

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Mar 12 '19 19:03 google-oss-bot

@bolds07 thanks for the report!

@JasonAHeron somehow a null instance of InAppMessage is getting into this app.

samtstern avatar Mar 12 '19 19:03 samtstern

Thanks for reporting!

MeghaB avatar Mar 12 '19 19:03 MeghaB

is this issue solved yet?

Sadmansamee avatar Sep 23 '19 12:09 Sadmansamee

Hey guys, we're suffering the same problem with v18.0.1. Any updates?

scm573 avatar Sep 25 '19 01:09 scm573

Hey yes in the latest versions of our SDK this should be fixed.

JasonAHeron avatar Mar 04 '20 19:03 JasonAHeron