N8n docker suddenly stops working

Hi,

I was running n8n docker on ubuntu server succesfully then out of blue it stopped working. Whenever I want to start it now, I get the following error:

(node:6) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'type' of undefined
    at NodeTypesClass.getByName (/usr/local/lib/node_modules/n8n/dist/src/NodeTypes.js:21:41)
    at new Workflow (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:16:39)
    at WebhookModel1592445003908.up (/usr/local/lib/node_modules/n8n/dist/src/databases/sqlite/migrations/1592445003908-WebhookModel.js:21:38)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:6) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
(node:6) UnhandledPromiseRejectionWarning: Error: There was an error: Cannot read property 'type' of undefined
    at Object.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/errors/lib/index.js:26:15)
    at Start.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/command.js:60:23)
    at /usr/local/lib/node_modules/n8n/dist/commands/start.js:114:22
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

Can someone help me out with this? Thanks

Welcome to the community @mikeriss!

You seem to have the same problem as in this topic:

2 Likes

And I can confirm I didn’t have any issues with the upgrade form 0.74 to 0.75.

1 Like

Thanks for confirming. Normally that should be just an issue once. After the migration did run once it does not have to run again. Made a slight improvement to the code. Starting from 0.75.0 it should now display which node is unknown and so causes the issue which will make it easier for other people that upgrade now from earlier versions.

1 Like

My solution was as follows. I deactivated the active workflow on the database level.

Hey @mikeriss,

Good to hear that there is a way around this . Would be able to expand on this a bit more? What steps did you take and how would someone else who is experiencing this issue be able to reproduce your solution?

Thanks in advance!

I fixed the issue as follows

  1. On the path /root/.n8n/ I downloaded the database database.sqlite
  2. Open the file database.sqlite with the application “DB Browser for SQLite”
  3. tempsnip
  4. open the table workflow_entity and change the column active to 0

I hope this helps

2 Likes

Hey @mikeriss,

Nice hack! Just goes to show that is is often worth getting your hands dirty and finding out what is going on “under the hood”!

Thanks for sharing that with the community!