Most of the FCM device Tokens are Blocked

441 views
Skip to first unread message

cms support

unread,
Aug 5, 2024, 10:16:08 AMAug 5
to Firebase Google Group
Hi,
  I have web application having more than 100000 user based & suddenly from August 1st 2024 its been dropped to 30000 when i debug found FCM server response has blocked most of the user.
[0]=> array(1) { ["error"]=> array(4) { ["code"]=> int(404) ["message"]=> string(31) "Requested entity was not found." ["status"]=> string(9) "NOT_FOUND" ["details"]=> array(1) { [0]=> array(2) { ["@type"]=> string(51) "type.googleapis.com/google.firebase.fcm.v1.FcmError" ["errorCode"]=> string(12) "UNREGISTERED" } } } }

But same was working before.
Can someone help on this?

xenon pro

unread,
Aug 6, 2024, 10:32:04 AMAug 6
to fireba...@googlegroups.com

hi how r u..?
  It looks like you’re encountering an issue with Firebase Cloud Messaging (FCM) where the server is responding with a 404 NOT_FOUND error and an UNREGISTERED error code. This usually indicates that the registration tokens for some of your users are no longer valid or have been unregistered. Here’s a breakdown of what might be causing this issue and how to address it:

hi check below code -this will probably help u,..
 
$response = json_decode($fcmResponse, true);

if (isset($response['error'])) {
    $errorCode = $response['error']['code'];
    $details = $response['error']['details'][0]['errorCode'];

    if ($errorCode == 404 && $details == 'UNREGISTERED') {
        // Remove or update the token in your database
        removeTokenFromDatabase($token);
    } else {
        // Handle other types of errors
        handleOtherErrors($errorCode, $details);
    }
}
  By addressing these areas, you should be able to manage and mitigate the issues related to invalid FCM tokens and maintain the reliability of your notification system.  
 

Joe Spiro

unread,
Aug 6, 2024, 2:23:57 PMAug 6
to Firebase Google Group
Please describe what you mean by blocked. Based on this description my assumption would be that the tokens are stale or expired and could be addressed as described above.

If the app is uninstalled, even if the token is new, it is unregistered and therefore invalid.

cms support

unread,
Aug 7, 2024, 11:22:35 AMAug 7
to Firebase Google Group
HI,
    yes I mean Most of the subscribed users response is coming as 'Unregistered' . even new registered users as well. But am not able to find out why this happened suddenly from 1st August.Its still going one. when am pushing any notification then for most of the users response is coming as 'Unregistred'

Joe Spiro

unread,
Aug 7, 2024, 11:23:57 AMAug 7
to Firebase Google Group
Ahh understood. In that case, it sounds less likely to be a configuration error (the type of things we help with in this forum) and more a bug aka something you should report to Firebase Support for FCM.
Reply all
Reply to author
Forward
0 new messages