Skip to content

Confirm how this library handles 404 from FCM #880

@marcshilling

Description

@marcshilling

Describe the feature you would like to see

Email sent from Firebase today:

We're writing to inform you that we will be garbage collecting all expired Firebase Cloud Messaging registration tokens and topic subscriptions starting May 15, 2024.

What you need to know
Starting May 15, 2024, the stale tokens and topic subscriptions for devices, which have not been connected to FCM in over 270 days, will be considered as expired and invalid. If a request is sent to an invalid token, it will be rejected with a 404 (UNREGISTERED) error.

Regarding topic sends or notification campaigns, it is possible that you may observe a decrease in the time taken for fanouts to complete. This could be attributed to the removal of expired subscriptions and a reduction in the number of messages sent.

This process will help improve fanout performance for your campaigns and identify the undeliverable registration tokens.

What you need to do
We recommend you to confirm that your service handles 404 error codes from FCM correctly. Please delete your record of any tokens with a 404 response code because they will not be valid again.

I'm currently catching the NotFound errors to detect invalid tokens:

try {
    $this->messaging->send($message);
} catch (\Kreait\Firebase\Exception\Messaging\NotFound $e) {
    // Purge these push tokens from the DB
} 

Can someone please confirm if this will be impacted by the just announced Firebase change? Or will a change be needed to handle these new 404 errors?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions