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

Firebase IAM(In-App Messaging) Crash 💣 BUG #5567

Open
pom1004 opened this issue Nov 21, 2023 · 11 comments
Open

Firebase IAM(In-App Messaging) Crash 💣 BUG #5567

pom1004 opened this issue Nov 21, 2023 · 11 comments

Comments

@pom1004
Copy link

pom1004 commented Nov 21, 2023

Basic info:
Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 4
Firebase Component: In-App Messaging
Component version: firebase-bom:32.3.1
Describe the problem
We created a new campaign and for some of the users, the application failed during the showing In-App Message.

Here is the crash from crashlytics:

Caused by android.view.WindowManager$BadTokenException
Unable to add window -- token null is not valid; is your activity running?
android.view.ViewRootImpl.setView (ViewRootImpl.java:1395)
android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:411)
android.view.WindowManagerImpl.addView (WindowManagerImpl.java:150)
com.google.firebase.inappmessaging.display.internal.FiamWindowManager.show (FiamWindowManager.java:67)
com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$4$4.run (FirebaseInAppMessagingDisplay.java:416)
android.app.Activity.runOnUiThread (Activity.java:7620)
com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$4.onSuccess (FirebaseInAppMessagingDisplay.java:412)
com.google.firebase.inappmessaging.display.internal.FiamImageLoader$Callback.onResourceReady (FiamImageLoader.java:157)
com.google.firebase.inappmessaging.display.internal.FiamImageLoader$Callback.onResourceReady (FiamImageLoader.java:135)
com.bumptech.glide.request.SingleRequest.onResourceReady (SingleRequest.java:631)
com.bumptech.glide.request.SingleRequest.onResourceReady (SingleRequest.java:575)
com.bumptech.glide.load.engine.EngineJob.callCallbackOnResourceReady (EngineJob.java:158)
com.bumptech.glide.load.engine.EngineJob$CallResourceReady.run (EngineJob.java:424)
android.os.Handler.handleCallback (Handler.java:958)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:205)
android.os.Looper.loop (Looper.java:294)
android.app.ActivityThread.main (ActivityThread.java:8177)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:971)

Steps to reproduce:
I can give you all devices which were affected, and maybe it can be helpful for you:
57% - Samsung
image
15% - Google
image
10% - Motorola
image
9% - Xiaom
image
9% - Other (3)
[4% - Sanmu - FIH Foxconn
3% - LGE
2% - TCT Mobile Limited (Alcatel)]

Relevant Code:
Nothing to share, it was implemented according to your documentation.

@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 Nov 21, 2023

Hey @pom1004, thanks for reaching out. I noticed that in the stacktrace it looks like you're loading an image with a URL com.bumptech.glide.request.SingleRequest.onResourceReady. The crash may be due to a slow response of the URL to return the image. This can happen when the URL response itself is slow or if there is a massive influx of requests all at the same time. In this case, you should be able to get around this by uploading an actual image instead of using a URL. Let me know if this helps. Thanks!

@winsontan520
Copy link

@argzdev
I also encounter the same issue with this. For our case, the image is uploaded via the Firebase in-app messaging dashboard, the image url link is under domain "...firebasestorage.googleapis.com...." and folder FIAMImages which can be found under Firebase Storage.
Is that means the Firebase Storage services unable to handle the massive influx of requests all at the same time? Should I report to Firebase Storage support?

@argzdev
Copy link
Contributor

argzdev commented Nov 23, 2023

Ah that is an interesting point, I was going to recommend using the image upload might help with the issue. But if the issue is still occurring even with this setup then there's definitely something wrong here. Let me bring this up to our engineering sync and see if we can get some feedback regarding this.

@argzdev
Copy link
Contributor

argzdev commented Nov 24, 2023

Upon further investigation, this issue might be fixed with #5504. I'll reach out to our engineers and see if this is a plausible fix for this.

@winsontan520
Copy link

Upon further investigation, this issue might be fixed with #5504. I'll reach out to our engineers and see if this is a plausible fix for this.

@argzdev thanks for the follow up. Based on you experiences, do you know how long usually it would take for the fixes to be released? Because I need to plan for alternative solution for the business as it is impacting the users.

@argzdev
Copy link
Contributor

argzdev commented Nov 27, 2023

We expect merged fixes to be in a release that is targeted for next week. However, in this case, the fix has yet to be validated and merged by our engineer. Our engineers haven't replied yet but let me see if we could it merged before the code freeze date.

@winsontan520
Copy link

@argzdev just to update to prevent ticket auto closed, did the fixes in the targeted release last week?

@argzdev
Copy link
Contributor

argzdev commented Dec 8, 2023

Hey @winsontan520, thanks for bringing this up again. Given the scenario that there's no clear steps to reproduce this behavior, currently, our tests are unsuccessful, and we are unable to verify and merge this fix. That said, could you try testing out the fix on your end and see if it works? You'll be able to do this by cloning the SDK, applying the code fix, and then publishing a snapshot of the repository. This will allow you to have a local copy of the SDK that you can add as a dependency in your app.

@winsontan520
Copy link

@argzdev I am using com.google.firebase:firebase-bom:32.0.0 how can i checkout this version from this repo?

@winsontan520
Copy link

any update for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants