- 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