Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Messaging] sendEachForMulticast with a lot of tokens throws error

Đang mở
#2,943 1 bình luận 0 reaction 2 người được giao Xem trên GitHub

@jonathanedey đang làm issue này rồi.

Từ ngày 24/6/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

api: messaging
[READ] Step 1: Are you in the right place?
  • For issues related to the code in this repository file a Github issue.
  • If the issue pertains to Cloud Firestore, read the instructions in the "Firestore issue"
    template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.
[REQUIRED] Step 2: Describe your environment
  • Operating System version: Docker version 28.0.1, build 068a01e (image is: oven/bun:1.2.12-alpine)
  • Firebase SDK version: 13.4.0
  • Firebase Product: messaging
  • Node.js version: v20.18.0
  • NPM version: 10.8.2
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:

When using Http/2 with sendEachForMulticast will throw an error (Error while making requests: GOAWAY - exceeded_max_concurrent_streams, Error code: 1) when sending with a lot fcm tokens (lowest that i have tested that got rejected is 214)

if legacy http transport is enabled, this issue does not occur.

best guess why this happens is the fact that it sends a request for every token, therefore sending up to 500 requests at once which is too many for the http/2 implemenation of it.

Relevant Code:
const app = admin.initializeApp();
const messaging = app.messaging();

const tokens = []; // List of a lot of FCM tokens

try {
    const result = await messaging.sendEachForMulticast({ tokens });
} catch (err) {
    console.error(err);
}
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
4 ngày 20 giờ
Pull request đã merge (30 ngày)
16

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/firebase-admin-node

Tất cả issue của firebase/firebase-admin-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.