Handle invalid token responses in FCM
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- java
- Ambito
- backend-api-design
Direzione di ricerca
Inizia dalla documentazione collegata sulla gestione dei token Firebase e segui come IncomingHttpResponse diventa una FirebaseMessagingException. Confronta le risposte UNREGISTERED e INVALID_ARGUMENT nell’issue, quindi determina come l’implementazione dovrebbe distinguere i token di registrazione non validi dagli altri errori INVALID_ARGUMENT senza basarsi sulle stringhe dei messaggi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 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.
Content: {
"error": {
"code": 400,
"message": "The registration token is not a valid FCM registration token",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "INVALID_ARGUMENT"
}
]
}
}
What is the proper way to handle these errors?
Does 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.
- Lingua principale
- Java
- Stelle
- 620
- Fork
- 305
- Merge medio
- 4g 9h
- PR unite (30g)
- 4
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebase-admin-java
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 commenti · 1 assegnatario ·
-
api: remoteconfig
firebase/firebase-admin-java#1196 · 1 commento · 2 assegnatari ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
firebase/firebase-admin-java#1192 · 3 commenti ·
-
needs-triage type: feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
firebase/firebase-admin-java#1149 · 1 commento ·
Tutte le issue di firebase/firebase-admin-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elastic/gradle-plugins#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cryptomator/hub#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·