Edit image node: ERROR: Stream yields empty buffer

Trying to fill a number into Edit image note via normal expression, but strangly it’s giving out this error

What is the error message (if any)?

Error: Stream yields empty buffer
at Socket. (/usr/local/lib/node_modules/n8n/node_modules/gm/lib/command.js:56:21)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.228.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via - Docker:

Hey @ManyQuestions,

Are you using a custom docker image? Does the node work if you don’t use expressions?

1 Like

Should be normal docker. Node works, when i enter a fixed number.

@ManyQuestions is the number actually a number or is it a string?

It’s the output of a function node.


That looks like a number, Can you share the full workflow?

1 Like

The number is coming from this code node. It’s caluation it, from the input number. Maybe it’s because the node is rounding the number. Not sure:

Can’t share the workflow. To much sensitive information. But i can send you the relevant part via message.

Hey @ManyQuestions,

Are you able to create a smaller workflow that reproduces the issue maybe?

1 Like

Thought i might be harder, but yes:

Hey @ManyQuestions,

The example is incomplete so I had a quick play with it and came up with the below workflow which oddly works as expected, Can you give it a go and see if it works for you? It could be that this is something that has been fixed since 0.228.2.

1 Like


If i understood correctly, this expression in the edit image node: “.first()” is only working for the first item right? Is it possible, to have it take the text size number of the run for all output items of the text size node? It produces more than on item. (i changed the workflow a little.). I tried “.all()” instead, but it’s not working.

@Jon So i realized that it’s taking the different numbers of the runs correctly, when i enter:
{{ $json[“output”] }}

But when i enter:
{{ $node[“Text size1”].json[“output”] }} , it is only taking the last number.

In my production workflow, the nodes are not next to each other. So that’s causing the issues.

1 Like

Hey @ManyQuestions,

That could be it, The problem we had is we can only work from what we have been given :slightly_smiling_face:

Looking at the second example you sent there are more issues to look at but it sounds like you are on the right track now.

I did found the error. Something wasn’t wired up correctly. This can be closed.

1 Like

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