# Button "Badly formatted buffer"

**URL:** <https://discourse.nodered.org/t/button-badly-formatted-buffer/97493>\
**Category:** Dashboard\
**Created:** [8 June 2025 21:08 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493 "2025-06-08T21:08:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hardyhove](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@Hardyhove](https://discourse.nodered.org/u/Hardyhove)\
**Post date:** [8 June 2025 21:08 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/1 "2025-06-08T21:08:44Z")

</div>

Hallo.  
I'm new here as you will recognise by my question.  
In my project a slider value shall be confirmed by pushing a button before it is sent to the PLC.

First of all: It works!

But using a debug node an error message occurs. Why? And why is the function not compromised by that error?

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/5/95981eacd431748040179359145c207c8b0745f0.png)

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d33f96000de47f2c22ceb8f02410749bd12f8bc0.png)  
Adjustment in the button node

Thanks for making me a bit less stupid.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 June 2025 07:13 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/2 "2025-06-09T07:13:23Z")

</div>

Which node is generating that error? Click on the node id above the error (9149....) and it will highlight the node. Then add a debug node showing what is going _into_ that node to see what you are feeding it.

---

<div class="post-metadata">

**Author:** ![Hardyhove](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@Hardyhove](https://discourse.nodered.org/u/Hardyhove)\
**Post date:** [10 June 2025 14:33 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/3 "2025-06-10T14:33:03Z")

</div>

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6b13e05ff9835612cf257233e401b22c9da555df.png)  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/0579c8fb344f83a0b652e960cc8a06e56dc8d9f5.png)

It's a button node. As you can see I feed a number and I get that number out, ok so far. Plus an error message that causes no trouble. But why? I could leave debug mode and forget it, but want to know, whats wrong with it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 June 2025 15:22 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/4 "2025-06-10T15:22:01Z")

</div>

Can you select that node and Export and paste it here please so we can see how it is configured. Also set Debug 1 to output the full message and show us what is there.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [10 June 2025 15:22 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/5 "2025-06-10T15:22:10Z")

</div>

> [@Hardyhove](#):
>
> ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d33f96000de47f2c22ceb8f02410749bd12f8bc0.png)

I can't see how that button node can be passing a numeric payload to the debug node, though it does give me a "badly formatted buffer" error.

Can you export those 5 nodes and paste them here (use the `</>` preformatted text button so the forum does not break the code)?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 June 2025 15:53 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/6 "2025-06-10T15:53:05Z")

</div>

The help text says that it sends whatever is configured in the node. It should not send the incoming payload. That suggests that the node is mis-configured.

---

<div class="post-metadata">

**Author:** ![Hardyhove](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@Hardyhove](https://discourse.nodered.org/u/Hardyhove)\
**Post date:** [28 June 2025 20:19 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/7 "2025-06-28T20:19:23Z")

</div>

[flows.json](https://discourse.nodered.org/uploads/short-url/qDiHCJA8CrmYSnZVNwH9I7vI3rO.json) (2.8 KB)

Hallo.  
I attaches the flow.

The error message is caused by the button node itself. It works fine, whether there is an input {msg.payload} or not. ? Whats wrong?

Thanks for help.

 ![Screenshot 2025-06-28 221202](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/09c779cd83b072503285958adb75a9d4b0c6cf5c.png)  
 ![Screenshot 2025-06-28 221218](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5adc8ba0c8f407df331a25a267a8084cee1abfc3.png)

 ![Screenshot 2025-06-28 221300](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/225cb902f5ac2a6be30787df54ba63b7155d519b.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 June 2025 21:07 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/8 "2025-06-28T21:07:29Z")

</div>

You have set the button payload type to buffer but entered `{msg.payload}` as the property.

The buffer type needs to be provided a fixed byte array e.g. `[1,2,255]`

What are you trying achieve?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [28 July 2025 21:08 UTC](https://discourse.nodered.org/t/button-badly-formatted-buffer/97493/9 "2025-07-28T21:08:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
