Title: Handle invalid token responses in FCM · Issue #1064 · firebase/firebase-admin-java · GitHub
Open Graph Title: Handle invalid token responses in FCM · Issue #1064 · firebase/firebase-admin-java
X Title: Handle invalid token responses in FCM · Issue #1064 · firebase/firebase-admin-java
Description: As per the documentation a token could be invalid if you have two error codes: UNREGISTERED (HTTP 404) INVALID_ARGUMENT (HTTP 400) However INVALID_ARGUMENTS can be caused by other errors. At the moment we receive the content below from t...
Open Graph Description: As per the documentation a token could be invalid if you have two error codes: UNREGISTERED (HTTP 404) INVALID_ARGUMENT (HTTP 400) However INVALID_ARGUMENTS can be caused by other errors. At the mo...
X Description: As per the documentation a token could be invalid if you have two error codes: UNREGISTERED (HTTP 404) INVALID_ARGUMENT (HTTP 400) However INVALID_ARGUMENTS can be caused by other errors. At the mo...
Opengraph URL: https://github.com/firebase/firebase-admin-java/issues/1064
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Handle invalid token responses in FCM","articleBody":"As per the [documentation](https://firebase.google.com/docs/cloud-messaging/manage-tokens#ensuring-registration-token-freshness) a token could be invalid if you have two error codes:\n\n- UNREGISTERED (HTTP 404)\n- INVALID_ARGUMENT (HTTP 400) \n\nHowever INVALID_ARGUMENTS can be caused by other errors.\n\nAt the moment we receive the content below from the `IncomingHttpResponse` which is also the error message from the `FirebaseMessagingException`. What we do is to check the string of the message in order to delete these tokens.\n\n\n```\nContent: {\n \"error\": {\n \"code\": 400,\n \"message\": \"The registration token is not a valid FCM registration token\",\n \"status\": \"INVALID_ARGUMENT\",\n \"details\": [\n {\n \"@type\": \"type.googleapis.com/google.firebase.fcm.v1.FcmError\",\n \"errorCode\": \"INVALID_ARGUMENT\"\n }\n ]\n }\n}\n```\n\n\nWhat is the proper way to handle these errors?\nDoes it make sense to update FirebaseMessagingException to provide more information about which field is invalid or perhaps have a new error code - INVALID_TOKEN? This would remove a lot of unambiguity as to when it is needed to manage the token.","author":{"url":"https://github.com/yanikapitanov","@type":"Person","name":"yanikapitanov"},"datePublished":"2025-01-24T12:16:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1064/firebase-admin-java/issues/1064"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:749cee57-d66c-7530-f3e0-fc8f62f68359 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C05C:8C242:1704131:1DC3929:698FD846 |
| html-safe-nonce | f3ca92e8f8a9215f030b542aa3f642fe1444ef3b654b4cbf830602e981458650 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDVDOjhDMjQyOjE3MDQxMzE6MURDMzkyOTo2OThGRDg0NiIsInZpc2l0b3JfaWQiOiIxODU3MTMzNDg4MjE1NDE0ODU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f93ebd1dfcf35a69ceb809e2dd7dab86d63ee2ac249ae56f9a729942f9eb0ce8 |
| hovercard-subject-tag | issue:2809306021 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/firebase/firebase-admin-java/1064/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ed6b2170f056198d565ad6f1dddb31ae08e90e95f5e2b5846cb1144fc5aec621/firebase/firebase-admin-java/issues/1064 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ed6b2170f056198d565ad6f1dddb31ae08e90e95f5e2b5846cb1144fc5aec621/firebase/firebase-admin-java/issues/1064 |
| og:image:alt | As per the documentation a token could be invalid if you have two error codes: UNREGISTERED (HTTP 404) INVALID_ARGUMENT (HTTP 400) However INVALID_ARGUMENTS can be caused by other errors. At the mo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yanikapitanov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/firebase/firebase-admin-java git https://github.com/firebase/firebase-admin-java.git |
| octolytics-dimension-user_id | 1335026 |
| octolytics-dimension-user_login | firebase |
| octolytics-dimension-repository_id | 84979119 |
| octolytics-dimension-repository_nwo | firebase/firebase-admin-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 84979119 |
| octolytics-dimension-repository_network_root_nwo | firebase/firebase-admin-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d320682233dfd4d28c0b30554a564c2fcd229032 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width