We have been running a lot of workflows in n8n without any issues until ~2 weeks ago. We love the tool!
2 weeks ago we started experiencing connectivity issues, and last week all of the CODE NODES, across ALL workflows stopped working. Workflows get stuck in the code nodes, and we are not able to use any of our implementations.
Can someone from the n8n team help us look into this? I imagine it has to do with a bug in the new version, but I do not have enough technical knowledge to debug it.
Thanks in advance!
Information on your n8n setup
n8n version: 1.103.2
Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
Disclaimer: I am a community member, not an n8n core team member.
Could you please provide more details as to what your code nodes do, example of such code nodes, preferably steps to reproduce. Were you able to boil it down to a specific action in the code node that causes the error?
Whether it is a bug in n8n or in the code or even in general approach to building a workflow is something that can only be determined when enough information is shared.
We have a lot of code nodes, and none are working.
For example, this is a code node that received 4k items, and before was running fine and fast, and now gets stuck. I am not able to see where inside the code node it is happening:
return items.filter(item => {
const text = item.json.DATA_Ingredients; // Change ātextā to the actual field name
if (typeof text === āstringā) {
return text.length < 300;
}
return false;
});
That said, it is happening across all code nodes, across all workflows. So it might be something related to the version of n8n we are using.
Any suggestions on what other specific information would be helpful to understand what is happening?
If I were you, what I would do Iād explore the idea, that the issue could also be related to the data which is processed by the node. Did its content change significantly since the āgoodā times? Is it always a lot of data? Was the data smaller before (when the code node wasnāt giving you any head ache)? Could this be related to the resource bottlenecks of the instance running n8n? See some resource limitations here.
In order to understand whether the issue could be related to the environment limits, you could:
try to run against a smaller datasets, to see if that eliminates the problem (the issue then could be with the amount of data). See other approaches on the base linked above.
attempt to break down the code node into multiple code nodes to pin point the issue with better precision
Regarding the code above. If this is the only content of the code node, you could easily change it to the filter node.
We have tried with less data, and every single node code gets stuck.
Before we had the same exact data types and quantity, and it was running fine.
For example, I just tried again running the code I shares above, passing only 6 items, and it gets stuck indefinitely.
Thanks for the suggestion on how to replace this specific code node. I will do so, definitely. But we have 20+ workflows with code nodes, which in some cases are quote complex, and I want to avoid having to re do all workflows
I am having the same issue. Since updating to the latest a few weeks ago, a code node with JavaScript that returns a simple āhello worldā will run and hang indefinitely. If I change the node to Python (Beta) and convert the code to Python, the same simple return of āhello worldā completes successfully.
I have redeployed the latest version of n8n as of today and still receive the same issue. It also occurs on all workflows, not just a specific one. I am in the process of converting my JavaScript code to Python however I feel like an update to n8n broke the environment and I would like to know more. Any ideas on how to do a deeper debug of this issue?
Any progress on this issue? Iām experiencing the exact same problem and I donāt have any starting points to conduct any serious diagnosing.
I might add that when I run a code node with JS, i can cancel it. Afterwards (without restarting containers) the code node with python doesnāt run either.