Handle invalid token responses in FCM
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu với tài liệu quản lý token Firebase được liên kết và lần theo cách IncomingHttpResponse trở thành một FirebaseMessagingException. So sánh các phản hồi UNREGISTERED và INVALID_ARGUMENT trong issue, sau đó xác định cách phần triển khai nên phân biệt các token đăng ký không hợp lệ với các lỗi INVALID_ARGUMENT khác mà không dựa vào các chuỗi thông báo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 620
- Fork
- 305
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-java
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 bình luận · 1 người được giao ·
-
[BUG] RemoteConfig unit tests fail in non-English (e.g., Korean) Locales due to Date Parsing Đang mởapi: remoteconfig
firebase/firebase-admin-java#1196 · 1 bình luận · 2 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1192 · 3 bình luận ·
-
needs-triage type: feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1149 · 1 bình luận ·
Tất cả issue của firebase/firebase-admin-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FasterXML/jackson-databind#6229 ·