160002227: Attempt to invoke virtual method 'com.google.firebase.inappmessaging.model.MessageType com.google.firebase.inappmessaging.model.InAppMessage.getMessageType()' on a null object reference
See original GitHub issue[REQUIRED] Step 2: Describe your environment
- Android Studio version: 3.6
- Firebase Component: inappMessaging
- Component version: 19.0.7
[REQUIRED] Step 3: Describe the problem
Steps to reproduce: I set up campaign which should show modal triggered by “on_foreground” + “app_launch” + custom event from Tag Manager. When opening an application, on the main screen the crash happens.
Steps to reproduce:
After publishing a test campaign the following error leads to app crash.
Relevant Code:
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(FirebaseInAppMessagingDisplay.java:445)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.inflateBinding(FirebaseInAppMessagingDisplay.java:313)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.access$000(FirebaseInAppMessagingDisplay.java:81)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$1.run(FirebaseInAppMessagingDisplay.java:289)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16 (5 by maintainers)
Top Results From Across the Web
firebase In-App Messaging throws NullPointerException on ...
I was one of the engineers on FIAM for the initial SDK release. There are definitely still some bugs in the product and...
Read more >InAppMessage | Firebase - Google
firebase.inappmessaging.model ... Encapsulates a Firebase In App Message. ... Use the message specific methods (see CardMessage , ModalMessage ...
Read more >NullPointerException in com.google.firebase.database
NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference.
Read more >[Solved] Android app crash when one signal notification sent
It crashes because of the. java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String
Read more >InAppMessageResult - Android Developers
Returns response code for the in-app messaging API call. ... Was this helpful? No recommendations at this time. Try signing in to your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still occurs in 19.1.3 FirebaseInAppMessagingDisplay.java line 439 com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.extractActions
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(FirebaseInAppMessagingDisplay.java:439) at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.inflateBinding(FirebaseInAppMessagingDisplay.java:310) at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.access$000(FirebaseInAppMessagingDisplay.java:80) at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$1.run(FirebaseInAppMessagingDisplay.java:288) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5769) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Not sure yet, but it looks like it happens only for release version… For debug version seems fine. Need to double check, but I will probably tell it more next week