Short answer
Your message payload is over FCM’s limit: 4096 bytes for a message to a device, 2048 bytes to a topic, keys included. Send only what the app needs to show the notification plus an ID, and have the app fetch the rest from your server or database when it opens.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
What makes the payload too big, and the fix
01
Whole records sent in the data payload
“The limit is 4096 bytes for most messages.” Firebase, FCM error codes (messaging/payload-size-limit-exceeded)
Putting a full chat message history, an order with all its items or a user profile in data can go over the limit. Send an ID and a short title instead, and let the app load the record when the user opens the notification.
02
A topic message, with the lower limit
“For messages sent to topics, the limit is 2048 bytes.” Firebase, FCM error codes (messaging/payload-size-limit-exceeded)
The same payload can work for one device and fail for a topic, because topic messages get half the room. Keep topic broadcasts to a title, a short body and an ID.
03
Long keys, images or JSON inside strings
“The total payload size includes both keys and values.” Firebase, FCM error codes (messaging/payload-size-limit-exceeded)
Keys count as well as values, and a base64 image or a JSON string inside a data value is large. Use short keys, send an image URL instead of the image, and measure the payload in bytes, not characters, since emoji and non-Latin text take more than one byte each.
// Conservative estimate: measures notification and data together const size = Buffer.byteLength(JSON.stringify({ notification: message.notification, data: message.data }), 'utf8'); if (size > 4000) console.warn('FCM payload near the limit:', size, 'bytes');
Checked against the vendor’s docs on : Firebase docs: FCM error codes (Admin SDK); Firebase docs: FCM HTTP v1 ErrorCode.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: FCM invalid registration token · FCM QUOTA_EXCEEDED · FCM registration token not registered · Firestore document too large