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

Created on 20 Apr 2020  路  3Comments  路  Source: firebase/firebase-android-sdk

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

messaging

Most helpful comment

That's correct. This has been fixed and released in the latest version.

All 3 comments

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

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.

Was this page helpful?
0 / 5 - 0 ratings