Error updating to v0.143.0 / v0.150.0

Hey guys,

we’re trying to update our installation from v0.132.2 to v0.150.0. We are facing the following error while executing the migration script to v0.143.0:

UnhandledPromiseRejectionWarning: TypeError: nodes.forEach is not a function
n8n             |     at /usr/local/lib/node_modules/n8n/dist/src/databases/mysqldb/migrations/1630451444017-UpdateWorkflowCredentials.js:22:19

It seems like our database is expected to return a json object rather than a string. Any ideas? We are using MariaDB 10.5.8.

Best regards

Even tried with MySQL 5.7.36, same problem.

Problem occurs in file

on line 27

nodes.forEach(node) => {

When we change line 25 from

const nodes = workflow.nodes;


const nodes = JSON.parse(workflow.nodes);

everything is fine.

The same problem occurs at further parts of the script.

Hi @BenW, just wanted to let you know that I’ve flagged this with the team as unfortunately I am not very familiar with MySQL (and don’t know if for example a not-updated datatype could cause this behaviour or what else might cause this).

Would this also happen in a fresh database? This has helped another MySQL user here: