bolt-js icon indicating copy to clipboard operation
bolt-js copied to clipboard

Blocks too long error at ~13200 characters

Open zhenguwu opened this issue 8 months ago • 3 comments

(Filling out the following with as much detail as you can provide will help us solve your issue sooner.)

@slack/bolt version

4.2.1

Node.js runtime version

v22.14.0

Steps to reproduce:

Using WebClient app.client we try to call client.chat.postMessage with blocks that are over ~13,200 in character length.

There are multiple blocks (markdown, section, divider, header, etc) in the arguments and the sum of all the character lengths is ~13,200.

Expected result:

The message is posted. The only limits documented I can find in the slack API is 40,000 character limit total, 12,000 characters for a single markdown block, and 3,000 characters for a single section block. Limits of 50 blocks per message (we only have 2-4). We are well below any of these individual limits

Actual result:

We are hit with a msg_blocks_too_long

@slack/web-api/dist/WebClient.js:28:58) at processTicksAndRejections (node:internal/process/task_queues:95:5)","code":"slack_webapi_platform_error","data":{"ok":false,"error":"msg_blocks_too_long"

If we only use markdown blocks, I find that the exact character limit is at 13297 characters before we run into that error. If we add a divider block in addition to the markdown blocks, the error starts occuring at 13172 characters.

We aren't hitting any documented limits of this API yet it's being rejected and we cannot even narrow it down to an exact limit as it seems to change with the content of the message.

Potentially related?

Image

zhenguwu avatar Apr 24 '25 20:04 zhenguwu

Hi there!

Thanks for raising this; looks like we have a known issue where messages that contain rich text blocks are capped at the 13,200 total character limit (12,000 text characters with a buffer for block containers) rather than the larger intended limit for use in automations. I've bumped this with the internal team!

For now you could try removing any rich text blocks from your message, or abide by the current limit

vegeris avatar Apr 27 '25 23:04 vegeris

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

github-actions[bot] avatar Jun 02 '25 00:06 github-actions[bot]

Any updates? I am also affected by this.

enialm avatar Jun 08 '25 04:06 enialm

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

github-actions[bot] avatar Jul 14 '25 00:07 github-actions[bot]

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

github-actions[bot] avatar Jul 28 '25 00:07 github-actions[bot]

Any updates here? Thank you.

orinciog avatar Aug 07 '25 15:08 orinciog

any updates?

praskr-wisdom avatar Aug 09 '25 11:08 praskr-wisdom

I'm also hitting this issue with the Python library.

colinodell avatar Oct 22 '25 11:10 colinodell