Legacy Flow not running correctly

I have a flow that is pre v1.0 and was working correctly before we updated to v1.0. Since the update the execution order has not been working correctly for legacy. It was mentioned that all legacy flows can use the old execution order but this not the case.

Sorry to hear but sadly is there nothing we can do with the information provided. We actually do not even have any information what exactly is going wrong, like what error message you get. Please provide an example workflow where we can see test it ourselves. Only like that will we be able to debug and see what is going wrong. Thanks!


image

I ripped a part out of my main flow for an example.

The javascript nodes are as following:

if (Object.keys($input.all()[0].json).length === 0) {
return [
{
json: {
results: 0,
}
}
]
}
return [
{
json: {
results: $input.all().length,
}
}
];

Yes ,that his does not work anymore makes sense. Before version 1 that kind of workflows did not fail but still did not work as expected. They rather returned wrong results as expressions silently failed.

That change is mentioned here as a breaking change:

Please make sure to also check all the other breaking changes.

1 Like

Correct for new flows. However my team has 20+ flows on the previous version that are not working now. This is taken word for word from that link you just sent? Our flows are set to legacy but are executing like they are v1.0.

“Your existing workflows will use the legacy order, while new workflows will execute using the v1 order. You can configure the execution order for each workflow in”

That are sadly two totally different things.

Legacy mode will only ensure that n8n still runs the nodes in the same old order + nodes with multiple inputs still behave the same.

The issue you describe however is part of the breaking changes and the breaking change break things between versions. They will break no matter which mode is set. Everybody that upgrades to v1 has to change their workflows and has to review them. This and other changes we particularly did not do earlier and rather waited for v1 as they were breaking. In the end was that one of the reasons why we released v1 to do some breaking changes.

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