Search code examples
androidfirebasepush-notificationfirebase-cloud-messagingandroid-push-notification

Android devices not receiving 5% of push sent with Firebase Cloud Messaging


The graph below from Firebase Cloud Messaging (FCM) Console shows how only ~95% of our push are being received by the phones. This is causing lots of issues for us as we're creating a VoIP app and need the push to be received immediately. Can anyone explain why this is happening and how to get this rate closer to 100%?

Some important notes:

  • All phones are Android
  • All phones had our app open at the time they received the push or up to 2 minutes prior
  • All push are data push (i.e. no body/title) with priority high
  • The push is sent with expiration 10 seconds to prioritize them following Android docs
  • We had ~30 errors (registration-token-not-registered and internal-error) sending push in the same period, which is nothing compared to the ~500 undelivered push

Screenshot from FCM Console


Solution

  • pir,

    As far as I understand, there are many reasons why a message might not be delivered. I think without looking at your specific data, it is going to be difficult for anyone to give a conclusive answer.

    What I do recommend is that you spend some time reading Understanding message delivery on the Firebase Documentation. Although I recommend you read the entire article, of particular interst for you will probably be the BigQuery data export section. This covers exporting your message data to BigQuery. Data exported to BigQuery is covered in the What data is exported to BigQuery? section. I think you're going to be interested in the event field which holds data about the type of event that occurred. These events types include:

    • MESSAGE_ACCEPTED: the message was received by the FCM server and the request is valid;
    • MESSAGE_DELIVERED: the message has been delivered to the app's FCM SDK on the device. By default, this field is not propagrated. To enable, follow the instructions provided in setDeliveryMetricsExportToBigQuery(boolean)).
    • MISSING_REGISTRATIONS: the request was rejected due to a missing registration;
    • UNAUTHORIZED_REGISTRATION: the message was rejected because the sender is not authorized to send to the registration;
    • MESSAGE_RECEIVED_INTERNAL_ERROR: there was an unspecified error when processing the message request;
    • MISMATCH_SENDER_ID: the request to send a message was rejected due to a mismatch between the sender id sending the message, and the one declared for the end-point;
    • QUOTA_EXCEEDED: the request to send a message was rejected due to insufficient quota;
    • INVALID_REGISTRATION: the request to send a message was rejected due to an invalid registration;
    • INVALID_PACKAGE_NAME: the request to send a message was rejected due to an invalid package name;
    • INVALID_APNS_CREDENTIAL: the request to send a message was rejected due to an invalid APNS certificate;
    • INVALID_PARAMETERS: the request to send a message was rejected due to invalid parameters;
    • PAYLOAD_TOO_LARGE: the request to send a message was rejected due to a payload larger than the limit;
    • AUTHENTICATION_ERROR: the request to send a message was rejected due to an authentication error (check the API Key used to send the message);
    • INVALID_TTL: the request to send a message was rejected due to an invalid TTL.

    I hope this helps. Good luck!