Skip to content

inappmessaging NullPointerException #4607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TangAnna opened this issue Jan 30, 2023 · 2 comments
Closed

inappmessaging NullPointerException #4607

TangAnna opened this issue Jan 30, 2023 · 2 comments

Comments

@TangAnna
Copy link

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: _____2021.3.1 Patch 1
  • Firebase Component: _____ com.google.firebase:firebase-inappmessaging-display
  • Component version: _____firebase-bom:31.1.0 -inappmessaging 20.2.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Exception java.lang.NullPointerException:
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.extractActions (FirebaseInAppMessagingDisplay.java:437)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.inflateBinding (FirebaseInAppMessagingDisplay.java:308)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.access$000 (FirebaseInAppMessagingDisplay.java:79)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$1.run (FirebaseInAppMessagingDisplay.java:286)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8653)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)

FirebaseInAppMessagingDisplay.extractActions :

private List extractActions(InAppMessage message) {
List actions = new ArrayList<>();
switch (message.getMessageType()) {
case BANNER:
actions.add(((BannerMessage) message).getAction());
break;
case CARD:
actions.add(((CardMessage) message).getPrimaryAction());
actions.add(((CardMessage) message).getSecondaryAction());
break;
case IMAGE_ONLY:
actions.add(((ImageOnlyMessage) message).getAction());
break;
case MODAL:
actions.add(((ModalMessage) message).getAction());
break;
default:
// An empty action is treated like a dismiss
actions.add(Action.builder().build());
}
return actions;
}

Crash device information appears:
image
image

Relevant Code:

I just added:
implementation platform('com.google.firebase:firebase-bom:31.1.0')
implementation 'com.google.firebase:firebase-inappmessaging-display'
@google-oss-bot
Copy link
Contributor

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

@argzdev
Copy link
Contributor

argzdev commented Jan 30, 2023

Hi @TangAnna, thanks for reporting. Seems to be a duplicate. Kindly give #4214 a thumbs up, so our engineers can prioritize this accordingly. You may also continue sharing information or details that you find helpful to our investigation. Thanks again!

@argzdev argzdev closed this as completed Jan 30, 2023
@firebase firebase locked and limited conversation to collaborators Mar 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants