Skip to content

NPE in In-App Messaging component, possibly related to activity switching. #130

@littleariel

Description

@littleariel

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 3.2
  • Firebase Component: In-App Messaging
  • Component version: 17.0.3

[REQUIRED] Step 3: Describe the problem

NullPointerException happening in Firebase's in-app message code:

java.lang.RuntimeException: 
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:3788)
  at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3828)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3036)
  at android.app.ActivityThread.-wrap11 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6938)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Caused by: java.lang.NullPointerException: 
  at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.showActiveFiam
  at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.onActivityResumed
  at android.app.Application.dispatchActivityResumed (Application.java:240)
  at android.app.Activity.onResume (Activity.java:1364)
  at android.support.v4.app.FragmentActivity.onResume (FragmentActivity.java:485)
  at com.MYAPP.MYACTIVITY.onResume (MyActivity.java:58)
  at android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1361)
  at android.app.Activity.performResume (Activity.java:7353)
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:3763)

Steps to reproduce:

Not 100% sure but we're seeing this happen fairly frequently in our app in production. Our current hunch is that it's related to an in-app message we have scheduled and the crash may occur if the user switches activity while the in-app message is supposed to be displayed.

Not sure it's relevant, but we are using the "top banner" type of message.

Relevant Code:

None - using the stock implementation of the In-App Messaging component.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions