FCM: send()/sendEachForMulticast() with `fid` return NotRegistered for a FID that Console delivers to at the same moment
Maintainer thường phản hồi trong vòng 1 ngày
@Doris-Ge đang làm issue này rồi.
Từ ngày 21/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
The failing calls are Messaging.send() with fid and Messaging.sendEachForMulticast() with fids, both returning messaging/installation-id-not-registered with a 404. Start by reproducing with a FID from a fresh client register() call, then compare results under the emulator's user credentials and under a deployed function's service account, since the reporter has not yet tested the latter. Done means either a credential-identity explanation confirmed by the reporter or a reproducible SDK-side cause with a fix.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[READ] Step 1: Are you in the right place?
Yes — this is about the code in firebase-admin-node itself (Messaging.send() / Messaging.sendEachForMulticast() FID targeting).
[REQUIRED] Step 2: Describe your environment
- Operating System version: Ubuntu 24.04.4 LTS (WSL2, kernel 6.6.114.1-microsoft-standard-WSL2)
- Firebase SDK version:
firebase-admin14.5.0 (also reproduces on^14.4.0); client-sidefirebase12.19.0 /@firebase/messaging0.13.3 - Firebase Product: Cloud Messaging (FCM) — Firebase Installation ID (FID) targeting
- Node.js version: 22.23.x
- NPM version: 10.8.2 (package management via pnpm workspaces; npm version given for reference)
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
- Client registers for push notifications using the new FID-based API:
register(messaging, { vapidKey, serviceWorkerRegistration })fromfirebase/messaging.
onRegisteredfires with FIDceewOt8IieuDcWg1YUkduN. - In the Firebase Console → Cloud Messaging → Compose notification → Send test message, the same FID is pasted into "Firebase Installation ID or FCM registration
token". Delivery succeeds. - From a Node backend using
firebase-admin, both of the following are called for the same FID and both fail:
Both reject / returnawait getMessaging().send({ fid: 'ceewOt8IieuDcWg1YUkduN', notification: { title, body }, }); // and await getMessaging().sendEachForMulticast({ fids: ['ceewOt8IieuDcWg1YUkduN'], notification: { title, body }, });success: falsewith aNotRegisterederror (see Relevant Code for the full error object). - Immediately after step 3's failure (within the same minute), repeating step 2 (Console test send) with the identical FID succeeds again.
This rules out:
- Propagation delay (Console succeeds within the same minute as the failed Admin SDK calls, both before and after).
- A multicast-specific bug (reproduces identically on both
send()andsendEachForMulticast()). - Project/config mismatch (
firebase useconfirms the same project,refpro-app-staging, as the client'sVITE_FIREBASE_PROJECT_ID).
Note: this reproduction was observed while running the backend via the Firebase Functions emulator (firebase emulators:start --only functions), authenticated
via a firebase login user session (no GOOGLE_APPLICATION_CREDENTIALS / gcloud ADC configured locally) rather than a deployed function's service account.
Re-testing against a real deployed Cloud Function (with its actual runtime service account) is still pending on our side — flagging this in case the discrepancy turns
out to be credential-identity-related rather than an SDK bug; will update this issue once confirmed either way.
Possibly related: #2970 reports Console succeeding while Admin SDK's sendEachForMulticast() fails with a 404, but with a different error shape (raw HTML, not a
structured NotRegistered error) and using legacy tokens rather than FIDs — closed by the reporter without explanation, so inconclusive whether it's the same root
cause.
Relevant Code:
import { getMessaging } from 'firebase-admin/messaging';
const response = await getMessaging().sendEachForMulticast({
fids: ['ceewOt8IieuDcWg1YUkduN'],
notification: { title: 'Test', body: 'Test' },
});
// response.responses[0] => { success: false, error: FirebaseMessagingError }
FirebaseMessagingError: NotRegistered
code: 'messaging/installation-id-not-registered',
cause: RequestResponseError: Server responded with status 404.
httpResponse: { status: 404, ... }
codePrefix: 'messaging'
- Ngôn ngữ chính
- TypeScript
- Star
- 1.7k
- Fork
- 423
- Merge trung bình
- 1 ngày 54 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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-node
-
Password policy violation is reported as `auth/internal-error` instead of a specific error codeCó thể đã có người làm @lahirumaramba đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
firebase/firebase-admin-node#3265 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
getToken() replays a failed token refresh to later callers while a valid token is cachedCó thể đã có người làm @GUMBOKIM đã nhận 69 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
firebase/firebase-admin-node#3234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Misleading error message for THIRD_PARTY_AUTH_ERROR: raw "OAuth 2 access token" text surfaced instead of the APNs-specific messageCó thể đã có người làm @milcho0604 đã nhận 71 ngày trước. Đang mởapi: messaging
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
firebase/firebase-admin-node#3215 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api: messaging
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
firebase/firebase-admin-node#3214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Firestore] Re-export functions from '@google-cloud/firestore/pipelines'Có thể làm lại được @jonathanedey đã nhận 115 ngày trước và không có pull request nào đang mở. Đang mởapi: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/firebase-admin-node
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
source-cooperative/docs.source.coop#41 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Nimblesite/SharpLsp#468 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
solidjs-community/solid-primitives#1082 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày