-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Remove unregistered FCM tokens #9085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening this issue!
|
Would very much like this feature merged in, so I think I'll look into this soon. FCM returns the following error object when not registered: So could perhaps simply add an additional check on the |
Yes, the errors are passed in an array from the push adapter to Parse Server, which then removes the tokens based on the error message. You could just add the error text to that logic I've mentioned above. Side note: the current solution is not elegant, because the logic in which the errors are parsed is in Parse Server, but it seems that it should be in the push adapter, since these errors are push API specific. Opened parse-community/parse-server-push-adapter#244. |
I think we urgently need this fix, as developers will need to adopt the push adapter 6.2.0 due to the API sunset. In addition, Parse Server 7.1.0 comes with push adapter 6.2.0 integrated. In short, the FCM API v1 error codes do not apply to FCM API v2. |
🎉 This change has been released in version 7.1.0-alpha.13 |
🎉 This change has been released in version 7.2.0-beta.1 |
🎉 This change has been released in version 7.2.0 |
New Feature / Enhancement Checklist
Current Limitation
Google notified in April 2024 that:
It doesn't seem that Parse Server would be properly handling this
UNREGISTERED
error, but it's hard to tell how these errors provided by the push adapter translate to the existing error strings:parse-server/src/StatusHandler.js
Lines 240 to 243 in 2420024
Feature / Enhancement Description
Ensure that Parse Server deletes "unregistered" tokens.
3rd Party References
The text was updated successfully, but these errors were encountered: