Fatal Exception: java.lang.RuntimeException: WakeLock under-locked wake:com.google.firebase.messaging
at android.os.PowerManager$WakeLock.release(PowerManager.java:1619)
at android.os.PowerManager$WakeLock.release(PowerManager.java:1589)
at android.os.PowerManager$WakeLock$1.run(PowerManager.java:1484)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
We are seeing this crash lately on:
We started to use Topics, to send out notifications for different categories to our users.
Currently we only started with two topics and have about 10-20k subscribed users
to those topics. Since only about 4000 of those users are active, we assume
to reach out to ~4k, while 200 of them have this crash.
We are using data messages only, construct them on server side and send them
on the topic. The client receives the message via FirebaseMessagingService,
processes the data and displays a custom notification.
Since we doing a usually very quick API call (our api) in the time of processing,
we plotted the distribution of time to process the data message, till the send of
the notification.

No relevant code.
I'll filed a question of SOF first some days ago, to not bother you here in the first place, but got no response so far: StackOverFlow
I found a few problems with this issue:
I am not sure if this is related (@ciarand to confirm), but firebase-messaging:20.1.6 (release data April 23) will contain a fix for WakeLock issues discovered on the latest versions of firebase-messaging and firebase-iid.
That's correct. This has been fixed and released in the latest version.
Most helpful comment
That's correct. This has been fixed and released in the latest version.