Skip to content

Firebase Cloud Messaging errorFCM “messaging/payload-size-limit-exceeded” (message too big)

A push fails with messaging/payload-size-limit-exceeded from the Admin SDK, or HTTP 400 INVALID_ARGUMENT from the HTTP v1 API, because the message is too big. FCM caps the payload at 4096 bytes for most messages and 2048 bytes for messages sent to topics, counting keys and values. Here are the limits in Firebase’s words, and how to slim the message, or hand it over at a fixed price.

Rather hand it over? App Fix Ticket: One reproducible bug in an existing mobile or web app, diagnosed and fixed.

Full refund if Simon can’t take it on once he sees your project, or if you cancel before work starts. Refund terms.

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

  1. 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.

  2. 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.

  3. 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.

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: FCM invalid registration token · FCM QUOTA_EXCEEDED · FCM registration token not registered · Firestore document too large

Questions

More on this error

Is the size check exact?

The snippet above is an estimate of the JSON your server sends. FCM counts the payload data, keys and values, against 4096 bytes, or 2048 for topics, so leave some margin rather than sending right up to the limit.

What other payload mistakes give INVALID_ARGUMENT?

Firebase lists a reserved data key (such as from, gcm or anything starting with google), a TTL that is not between 0 and 2,419,200 seconds (4 weeks), and parameters with the wrong name or type. The error message names the field.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. 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.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.