Skip to content
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

NullPointerException at AbtIntegrationHelper.setExperimentActive #4716

Closed
OlehHaidaienko opened this issue Feb 24, 2023 · 17 comments
Closed
Labels
api: inappmessaging type: bug Something isn't working

Comments

@OlehHaidaienko
Copy link

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Android Studio Electric Eel | 2022.1.1 Patch 1
  • Firebase Component: In-App Messaging
  • Component version: 20.3.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

I can't reproduce. Please take a look at the log and screenshot from Firebase Crashlytics

Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void java.util.concurrent.Executor.execute(java.lang.Runnable)' on a null object reference
       at com.google.firebase.inappmessaging.internal.AbtIntegrationHelper.setExperimentActive(AbtIntegrationHelper.java:94)
       at com.google.firebase.inappmessaging.internal.InAppMessageStreamManager.triggeredInAppMessage(InAppMessageStreamManager.java:363)
       at com.google.firebase.inappmessaging.internal.InAppMessageStreamManager.lambda$getTriggeredInAppMessageMaybe$27(InAppMessageStreamManager.java:346)
       at com.google.firebase.inappmessaging.internal.InAppMessageStreamManager.$r8$lambda$w4tUspl0-bTh48AvRyCAZ0a1mSM(InAppMessageStreamManager.java)
       at com.google.firebase.inappmessaging.internal.InAppMessageStreamManager$$InternalSyntheticLambda$1$4b09f0da19d4914563fbc47a8eb385ca850290e0e2e34b6d79e30263981ca83c$3.apply(InAppMessageStreamManager.java:6)
       at io.reactivex.internal.operators.maybe.MaybeFlatten$FlatMapMaybeObserver.onSuccess(MaybeFlatten.java:88)
       at io.reactivex.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onNext(FlowableElementAtMaybe.java:80)
       at io.reactivex.internal.operators.flowable.FlowableFlattenIterable$FlattenIterableSubscriber.drain(FlowableFlattenIterable.java:312)
       at io.reactivex.internal.operators.flowable.FlowableFlattenIterable$FlattenIterableSubscriber.onNext(FlowableFlattenIterable.java:174)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:56)

image

@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.

@igoralvess
Copy link

I'm having the same issue :(

@hallefy
Copy link

hallefy commented Feb 24, 2023

The same issue here, almost 60k users crashing 💣

@argzdev
Copy link
Contributor

argzdev commented Feb 27, 2023

Hi all, did you happen to use an earlier version prior to encountering this problem? Would it be possible for you to provide us with the previous version that was working?

However, if there were no changes made to the version before the problem occurred, it's possible that the issue is related to the backend. In that case, please reach out to our Firebase support team. They can assist you better since you'll be able to share project details and campaign configurations.

@OlehHaidaienko
Copy link
Author

OlehHaidaienko commented Feb 27, 2023

@argzdev Hi, we have this crash only in the latest versions of the app where we updated Firebase BoM from 29.2.0 to 31.1.1. As I see the In-App Message was updated from 20.1.2 to 20.2.0

@OlehHaidaienko
Copy link
Author

@argzdev HI, after monitoring this issue for a while I can confirm that it appears only in versions where Firebase BoM was updated.
We're gonna update BoM to 31.2.3 and will check if the crash still exists

@argzdev
Copy link
Contributor

argzdev commented Mar 17, 2023

Hey @OlehHaidaienko, sorry for the radio silence here. We're still investigating this. Thanks for the extra details.

Here are some of my findings:

  • Changes made between versions 20.1.2 to 20.2.0 is during the commit dates between Mar. 10, 2022 - Oct. 12, 2022.
  • History of commits for firebase-inappmessaging shows around 10-11 commits during this timeline (Mar - Oct 2022).
  • All commits in the given timeline doesn't seem to have any changes made to the AbtIntegrationHelper and InAppMessageStreamManager

We'll reply back here once once we get some further updates.

@OlehHaidaienko
Copy link
Author

Hi @argzdev
We started rolling out a new app version with updated Firebase BoM 31.2.3 but the issue still exists
Currently, 16k crash events affecting ~2.7k users.
I could provide some extra logs if you need

@argzdev
Copy link
Contributor

argzdev commented Mar 27, 2023

Hi guys, we're still investigating this. Any chance you could share with us the setup of your campaign. Please do remove any PII (personal identifiable information) if needed. This might give us an idea what's causing the issue.

Yes, those extra logs will be helpful, @OlehHaidaienko. Thanks!

@OlehHaidaienko
Copy link
Author

@argzdev What information do you need regarding campaign setup?
Btw I checked all active campaigns that we have and wasn’t able to reproduce the crash but I noticed something weird.
In InAppMessageStreamManager.triggeredInAppMessage method I see that abtIntegrationHelper.executor is null.
image
Seems if this condition will be true you should get NPE content.getPayloadCase().equals(ThickContent.PayloadCase.EXPERIMENTAL_PAYLOAD)
Maybe this information will help

@OlehHaidaienko
Copy link
Author

@argzdev Hi, please try the following steps to reproduce the issue:

  1. Create an experiment for in-app messages with multiple variants(images in our case)
  2. Activate the experiment
  3. Open the app
  4. Observe crash

Note: App won't crash if you added your device as a test device in the experiment because of the check !content.getIsTestCampaign()

if (!content.getIsTestCampaign()) {
    abtIntegrationHelper.setExperimentActive(
        content.getExperimentalPayload().getExperimentPayload()
    )
}

I hope it will help to investigate the issue

@argzdev
Copy link
Contributor

argzdev commented Apr 18, 2023

Sorry for the radio silence here. Really appreciate the updates, @OlehHaidaienko. I was able to reproduce the same behavior from your steps to reproduce the issue. I'll bring this up to our engineers and see what we can do here.

@argzdev argzdev added type: bug Something isn't working and removed needs-attention labels Apr 18, 2023
@FelipeLimaDeSouza
Copy link

I have the same problem

@argzdev
Copy link
Contributor

argzdev commented Apr 19, 2023

Hi all, a fix is on the way #4913. Thank you for your patience.

@eldhosembabu
Copy link
Contributor

Fix merged. Will be available in next release.

@FelipeLimaDeSouza
Copy link

Fix merged. Will be available in next release.

When the new version will be released?

@argzdev
Copy link
Contributor

argzdev commented May 2, 2023

Hi all, this fix is now release on Firebase BoM version 32.0.0 or In-App Messaging version 20.3.2. You may check out the release notes for more information. I'll close this issue now. Thanks!

@argzdev argzdev closed this as completed May 2, 2023
@firebase firebase locked and limited conversation to collaborators Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: inappmessaging type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants