Firebase · sdk · fg-0185

admin.messaging().sendMulticast is not a function after upgrading firebase-admin to v13

If you see TypeError: admin.messaging(...).sendMulticast is not a function, the cause and the fix for Firebase are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
TypeError: admin.messaging(...).sendMulticast is not a functionsendToDevice, sendToTopic, and sendAll are also undefinedPush code broke on an npm update with no other change
Cause
firebase-admin 13.0.0 removed the FCM methods built on the legacy HTTP API, which Google shut down, including sendAll, sendMulticast, sendToDevice, sendToDeviceGroup, sendToTopic and sendToCondition.
Fix
Use send for one message and sendEachForMulticast or sendEach for batches, with the HTTP v1 message shape.
Apply
import { getMessaging } from 'firebase-admin/messaging'; const res = await getMessaging().sendEachForMulticast({ tokens, notification: { title: 'Hi', body: 'There' }, data: { orderId: '42' }, }); res.responses.forEach((r, i) => { if (!r.success) console.warn(tokens[i], r.error?.code); });
Affected
firebase-admin 13.0.0 and later (released 2024-11-12)
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun