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);
}
}