With a fresh install of n8n, when I attempt to save a workflow I get:
ERROR RESPONSE
TypeError: Cannot read property 'toString' of undefined
at /usr/local/lib/node_modules/n8n/dist/src/Server.js:290:35
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:76:26
I also receive this if I go to save a 2nd flow:
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
code: 'ER_DUP_ENTRY',
errno: 1062,
sqlState: '23000',
sqlMessage: "Duplicate entry '0' for key 'PRIMARY'",
query: 'INSERT INTO `workflow_entity`(`id`, `name`, `active`, `nodes`, `connections`, `createdAt`, `updatedAt`, `settings`, `staticData`) VALUES (DEFAULT, ?, ?, ?, ?, ?, ?, ?, DEFAULT)',
parameters: [
'asdf',
0,
'[{"parameters":{},"name":"Start","type":"n8n-nodes-base.start","typeVersion":1,"position":[250,300]}]',
'{}',
2021-05-19T06:05:44.301Z,
2021-05-19T06:05:44.301Z,
'{}'
]
}
I have wiped my mysqldb and reinstalled. Same thing. I’m only able to save one flow (with a toString error). Afterwards, I’m unable to save anymore due to this PRIMARY violation.
phpMyAdmin shows 1 record in workflow_entity,
Tried on both n8n Version: 0.112.0 and 0.120.0



