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.

Firebase Push Notifications NPE

See original GitHub issue

I’m getting 100s of NPEs from sending push notifications. My suspicion is that it has something to do with the image push notifications that Firebase now supports. These crashes don’t seem to be user facing which is good. Unfortunately, Google counts crashes in app store rankings so I’m scared about the amount of crashes I’m getting.

Here’s the crash logs:

java.lang.NullPointerException: 
  at com.android.okhttp.okio.Buffer.write (Buffer.java:1182)
  at com.android.okhttp.okio.Buffer.read (Buffer.java:1221)
  at com.android.okhttp.okio.RealBufferedSource.read (RealBufferedSource.java:65)
  at com.android.okhttp.internal.http.Http1xStream$FixedLengthSource.read (Http1xStream.java:602)
  at com.android.okhttp.internal.Util.skipAll (Util.java:172)
  at com.android.okhttp.internal.Util.discard (Util.java:154)
  at com.android.okhttp.internal.http.Http1xStream$FixedLengthSource.close (Http1xStream.java:619)
  at com.android.okhttp.okio.RealBufferedSource.close (RealBufferedSource.java:421)
  at com.android.okhttp.okio.RealBufferedSource$1.close (RealBufferedSource.java:409)
  at com.google.android.gms.internal.firebase_messaging.zzk.zza
  at com.google.firebase.messaging.zzi.close
  at com.google.firebase.messaging.zzb.zza
  at com.google.firebase.messaging.FirebaseMessagingService.zzc
  at com.google.firebase.messaging.zzg.run
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at com.google.android.gms.common.util.concurrent.zza.run (Unknown Source:6)
  at java.lang.Thread.run (Thread.java:764)

This error occurs on a range of devices.

I’m sending the notifications from the Firebase console and using the latest Firebase Messaging SDK v19.0.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:34 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
aguatnocommented, Dec 3, 2019

Hi All, our engineering team continues to investigate the issue internally using this bug#141328496. I’ll let you know as soon as I have more information.

6reactions
aguatnocommented, Dec 10, 2019

The issue has been identified and fixed internally. Currently waiting when would be the external release date.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About FCM messages | Firebase Cloud Messaging - Google
FCM automatically displays the message to end-user devices on behalf of the client app. Notification messages have a predefined set of user-visible keys...
Read more >
Null Pointer Exception when implementing Notifications with ...
I am implementing notifications in my app using firebase cloud ... NullPointerException: Attempt to invoke virtual method 'java.lang.
Read more >
Using Push Notifications with Firebase in an Ionic Angular App
One of the most common features provided by application developers to their users is push notifications. In this tutorial, we'll walk through all...
Read more >
Firebase Cloud Messaging (FCM) vs. OneSignal
Compare Firebase Cloud Messaging and OneSignal and learn how to choose the best push notification platform for your business.
Read more >
Cloud Messaging | React Native Firebase
The remoteMessage property contains all of the information about the message sent to the device from FCM, including any custom data (via the...
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