question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Random crash related with In-App Messaging

See original GitHub issue

[REQUIRED] Step 2: Describe your environment

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

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

I set up campaign which should show “modal” triggered by “on_foreground” event. From time to time I receive below crash. There are no reasonable reproduce steps. It just happens. I have found that the same issue was reported on picasso project: https://github.com/square/picasso/issues/2002

11-02 12:43:13.888 27311-27311/pl.allegro.sale.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: pl.allegro.sale.debug, PID: 27311
android.view.WindowManager$BadTokenException: Unable to add window – token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:849)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:337)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at com.google.firebase.inappmessaging.display.internal.FiamWindowManager.show(com.google.firebase:firebase-inappmessaging-display@@17.0.3:62)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$5.onSuccess(com.google.firebase:firebase-inappmessaging-display@@17.0.3:385)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.loadNullableImage(com.google.firebase:firebase-inappmessaging-display@@17.0.3:418)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.inflateBinding(com.google.firebase:firebase-inappmessaging-display@@17.0.3:324)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay.access$400(com.google.firebase:firebase-inappmessaging-display@@17.0.3:73)
at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay$2.run(com.google.firebase:firebase-inappmessaging-display@@17.0.3:267)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:37 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
Ein6teincommented, Mar 14, 2019

So… Is it going to be fixed? We cannot use in-app messages because of it - it causes mass crashes in our app and we cannot even handle it.

As far as I understood, the problem is with Picasso - maybe you should switch to Glide? Or fix the issue by adding a simple null check for activity?

3reactions
CharlieReececommented, Sep 18, 2019

@vkryachko @samtstern @MeghaB @JasonAHeron please re-open this issue, it’s not fixed & still occurring.

I do not think they care about this and that is why I will stop using Firebase In-App Messaging and I will make my own one. It is sad: I was supposed to save time using Firebase features 😐

Read more comments on GitHub >

github_iconTop Results From Across the Web

9 Best Fixes for Android Messages Keeps Crashing Issue
9 Best Fixes for Android Messages Keeps Crashing Issue · 1. Restart Phone · 2. Delete Old Messages · 3. Grant Necessary Permissions...
Read more >
Why do my apps keep crashing on Android, How to fix it
Force stop the app​​ To do this, go to Settings -> Apps and select the app that keeps crashing. Tap on the app's...
Read more >
Why Do My Apps Keep Crashing on Android? - Avast
Apps on Android can crash because of low storage space, too many apps running simultaneously, a weak internet connection, or not having the ......
Read more >
How to Fix Crashing Apps on an iPhone or Android?
Sometimes app-crashing is not caused by your phone, but rather the app itself. An internal error, or bug, may have brought the app...
Read more >
Detect and diagnose crashes - Android Developers
There are many situations that can cause a crash in your app. Some reasons are obvious, like checking for a null value or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found