Issue with nodes not executing

Hello Everyone,
Not sure why but after a switch node the second output doesn’t execute the next node inline. It doesn’t matter what node i put there it. It will work a few times then just stop. Works if i hit the play button at top of the node. Some times it will execute the top path through the flow then the bottom but it doesn’t always happen. The node is set to retry on errors but doesn’t seem to fix the issue. Worried about the reliability in a production environment as I’m building it to process orders.

This is a self hosted n8n. The only errors are in the docker log. Which doesn’t seem to be about the node. The node itself doesn’t output an error.

node execution output incorrect data Error: node execution output incorrect data at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1219:6) at processTicksAndRejections (node:internal/process/task_queues:105:5) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1581:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2157:11 B

Information on n8n setup

  • **n8n version:Version 1.103.1
  • **Database (default: SQLite):N/A
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):cron
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • **Operating system:ubuntu Server

Hey @Oeq06 hope all is well, welcome to the community..

If you need to execute a second branch of the flow, put a merge node after XML1 and Move binary Data and merge them together before proceeding with Aggregate node.

There are multiple modes depending on what outputs you need and how you need them to be formatted coming out of the merge node.

You can read more about the node here:

I can’t merge them because each item is an individual order. The file formats are separated to convert to json. Also the aggregate node isn’t necessary I was trying to get the node to execute but couldn’t without manually executing it.

This is how it originally is set up.

You don’t have to merge them in a way that makes two order into one, you can merge by appending one after another for instance.

If I understand correctly, the workflow is doing the following:

  • list the files on ftp/sftp server
  • downloads certain files
  • depending on the file format (I guess) it takes one of two branches

What do you want to happen after that?

After that

  • both branches convert to json.
  • the code node creates a standard json and filters and correct wrong addresses.
  • Database is checked if order is already in the system.
  • Merges the results using the po
  • switch whether true or false
  • Switch depends on customer determents the type of import statement (due to requirements) to database.
  • Get the id of the import header
  • Merge results with import data
  • filter line items depending on customer.
  • Import line items.

Really having to do extra steps because i cant using two import statements in sql like node red By getting last inserted id.

I see, in this case you are right, and now looking at the flow again, I see the merge node is not really needed here as it is either one of the other branch is going to be executed at a single time, right, it is never both Extract from File and Move Binary Data for the same file.

Have you look at the execution logs to see where the error happens? Also you mentioned that sometimes the next node is not executed. This usually happens when the previous node doesn’t produce any output as only the input is triggering the action of a node. If no output is expected the way to go about it is to enable “Always output” under settings:

This way if there is no output the empty output is produced and the next node gets to be executed with no input context.

I can’t output bland data but i do have output errors, but nothing is ever outputted in the error section. The previous node which is "Switch 3 does out put the data. It is just the next doesn’t always process it.

So from the screenshot I assume the data from FTP server is 3 files, which are split at the switch node into 2 which go to the top branch and 1 which go to the bottom branch. The top proceeds to the end and the bottom never pass the Move Binary Data Node?

how does this look?

That is correct. The top converts xml to json and the bottom converts binary to json. The bottom on is the only one with intermittent issues.

Regarding the errors I have the output errors selected in the settings. But it never outputs the error when it doesn’t process the input.

It just struck me - I see you have a “Move Binary Data” node in your workflow. How old is your n8n?.. In the initial post it says Version 1.103.1, but this node was renamed in… 2023? Did you create or copy this workflow?

I used the Docker run command from the quick start guide. The version is what i found in the settings on the bottom of the side panel. The move Binary Data node was copied off a post on one of the forum. But the issue happens with any node. So if i put the file node there and use the transform json it will stop and do the same thing.

Can you show us your workflow by embed it here? Maybe I can help you to make it run with the latest version

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