Hi everyone,
I’m encountering a critical issue when running workflows in queue mode using the Postgres node. As soon as a workflow is activated and runs in production, the following error appears:
Error
Cannot read properties of undefined (reading ‘execute’)
Error: Cannot read properties of undefined (reading ‘execute’)
at Queue.onFailed (/usr/local/lib/node_modules/n8n/node_modules/bull/lib/job.js:516:18)
at Queue.emit (node:events:536:35)
at Object.module.exports.emitSafe (/usr/local/lib/node_modules/n8n/node_modules/bull/lib/utils.js:50:20)
at EventEmitter.messageHandler (/usr/local/lib/node_modules/n8n/node_modules/bull/lib/queue.js:476:15)
at EventEmitter.emit (node:events:524:28)
at DataHandler.handleSubscriberReply (/usr/local/lib/node_modules/n8n/node_modules/ioredis/built/DataHandler.js:80:32)
at DataHandler.returnReply (/usr/local/lib/node_modules/n8n/node_modules/ioredis/built/DataHandler.js:47:18)
at JavascriptRedisParser.returnReply (/usr/local/lib/node_modules/n8n/node_modules/ioredis/built/DataHandler.js:21:22)
at JavascriptRedisParser.execute (/usr/local/lib/node_modules/n8n/node_modules/redis-parser/lib/parser.js:544:14)
at Socket. (/usr/local/lib/node_modules/n8n/node_modules/ioredis/built/DataHandler.js:25:20)
It seems like the node tries to execute something that is undefined, causing the entire execution to fail immediately.
This only happens in queue mode in production, in regular and test mode, everything works fine. I suspect this might be a bug related to how the Postgres node is handled within the worker.
Is anyone else experiencing this? Any ideas or suggestions on how to fix?
Thanks.
Information on your n8n setup
- n8n version: 1.91.2
- Database (default: SQLite): PostgreSQL
- Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted queue mode