Error starting 1.47.0

Describe the problem/error/question

Installed 1.47.0, trying to start it

What is the error message (if any)?

1|n8n    | User settings loaded from: /home/ec2-user/.n8n/config
1|n8n    | Initializing n8n process
1|n8n    | ♥
1|n8n    | n8n ready on 0.0.0.0, port 5678
1|n8n    | Version: 1.47.0
1|n8n    | TypeError: Cannot read properties of null (reading 'data')
1|n8n    |     at /home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/src/databases/repositories/execution.repository.ts:162:32
1|n8n    |     at Array.map (<anonymous>)
1|n8n    |     at ExecutionRepository.findMultipleExecutions (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/src/databases/repositories/execution.repository.ts:158:22)
1|n8n    |     at processTicksAndRejections (node:internal/process/task_queues:95:5)
1|n8n    |     at ExecutionService.findAllEnqueuedExecutions (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/src/executions/execution.service.ts:457:10)
1|n8n    |     at Start.runEnqueuedExecutions (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/src/commands/start.ts:346:22)
1|n8n    |     at Start.run (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/src/commands/start.ts:294:4)
1|n8n    |     at Start._run (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/command.js:311:22)
1|n8n    |     at Config.runCommand (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/config/config.js:433:25)
1|n8n    |     at run (/home/ec2-user/.nvm/versions/node/v20.14.0/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:92:16)
1|n8n    | Error: Exiting due to an error.
1|n8n    | TypeError: Cannot read properties of null (reading 'data')

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.47.0
  • **Database (default: SQLite):Postgres (Aurora)
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):OWN
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):NPM
  • **Operating system:AWS AMI 2023

hello @Kool_Baudrillard

have you tried to use the Docker version?

The stacktrace points to this line, which fails if there is no matching row in the execution_data table for a entry in the execution_entity table.

Did you make any changes in the DB manually?

I migrated the data from sqlite to Postgres, but this was on Version 1.44.0 and all other updates passed.

Yes, and I did copy data from sqlite to Postgres based on an example in here.

So waht can I do to fix this and is this something new, because it didn’t fail up to 1.46.0?

You could delete all the data from the execution_entity table, and then restart the instance. That should most likely fix this issue.

That did the trick, thx a lot!

@netroy Ok, this still persists. After restart and ~30k entries in execution_entity table it fails to start with the same error.

that sounds like something is deleting execution data, but not the execution entities. I don’t know of any part of the code that should be doing that.
Either way, I’ll add a check to prevent this error, and try to get the fix out in next week’s release.

Can you please share debug logs for shutdown and startup? Never mind
Execution data should not be deleted independently of the execution entity.

@Kool_Baudrillard I think we might have figured out why this might be happening. It’s likely in an issue in the code that restarts enqueued execution at startup. We are working on a potential fix.

New version n8n@1.48.3 got released which includes the GitHub PR 9903.