WakeLock under-locked wake:com.google.firebase.messaging on HUAWAI

Environment

  • Android Studio version: 3.6.1 Build #AI-192.7142.36.36.6241897
  • Firebase Component: Firebase Messaging
  • Component version: com.google.firebase:firebase-messaging:20.1.5

Describe the problem

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:

  • HUAWAI only
  • Android 8.0.0 only
  • about 200 unique users affected since 5 days
  • 10-20k potential users, 4k active (see below)

Steps to reproduce:

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.

image

Relevant Code:

No relevant code.

Additionally

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

1 possible answer(s) on “WakeLock under-locked wake:com.google.firebase.messaging on HUAWAI