After update, all waiting executions fail to continue with previous execution data

First of all, thank you so much for all the great work you’re putting into n8n,

Describe the issue/error/question

After updated to 0.181.2 (we’ve been a few numbers down), we’ve got all our waiting executions crashing when they resumed from the wait. It concerns all the wait nodes that had a javascript expression that looked for execution data, for instance whenever the wait node had an expression like :

Resume at Date and Time : {{$json["deliver_at"]}}

What is the error message (if any)?

The main error displayed is always :

There was a problem executing the workflow:
"Cannot read properties of undefined (reading ‘main’)"

However it is always an error in the wait node config, when there’s an expression using Nodes data (like {{$json["deliver_at"]}} ), it says in the result box :

[invalid (Cannot read properties of undefined (reading ‘hasOwnProperty’))]

Please share the workflow

The workflow looks like this, and the wait node was waiting until : {{$json["deliver_at"]}}

Share the output returned by the last node

Here is the execution data retrieved with the API :

{
"id": 9265,
"data": {
"startData": {...}, // 0 keys
"resultData": {
"runData": {
"Webhook leon sent": [...], // 1 items
"leon_id": [...], // 1 items
"Get leon details": [
{
"startTime": 1654840694992,
"executionTime": 66,
"data": {
"main": [
[
{
"json": {
"leonId": "5B30152E-F21B-4D2B-AD9E-B899599C0BEB",
"leon_id": "5B30152E-F21B-4D2B-AD9E-B899599C0BEB",
"sender_id": "6B2B953B-2992-4A11-A97A-2C78934A8E8A",
"recipient_id": "DB090C58-F73C-49B6-9D90-3E9E2438F7E4",
"email": null,
"deliver_at": "2022-06-14T08:26:36.000Z"
}
}
]
]
}
}
],
"run mail.leon-sent-sequence": [...], // 1 items
"Wait deliver_at": [
]
},
"lastNodeExecuted": "Wait deliver_at",
"error": {
"message": "Cannot read properties of undefined (reading 'main')",
"stack": "TypeError: Cannot read properties of undefined (reading 'main') at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1019:73 at processTicksAndRejections (node:internal/process/task_queues:96:5)"
}
},
"executionData": {
"contextData": {...}, // 0 keys
"nodeExecutionStack": [...], // 0 items
"waitingExecution": {...} // 0 keys
}
},
"finished": false,
"mode": "webhook",
"retryOf": null,
"retrySuccessId": null,
"startedAt": "2022-06-14T08:26:40.000Z",
"stoppedAt": "2022-06-14T08:26:40.000Z",
"workflowId": "25",
"waitTill": null
}

We see that the previous node did return the correct data, including the key required, but it wasn’t able to continue the node and crashed when it tried. The “Wait deliver_at” node doesn’t have a Main section in the execution data above.

Information on your n8n setup

  • n8n version: 0.181.2
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

Question

What can I do to repair this behaviour ? We have hundreds of pending execution that are continuously crashing, and I can’t find any documentation on the issue.

Thank you for your help
Pierre

Welcome to the community @branche and great to hear that you enjoy using n8n.

We will have a look at the issue and try to fix asap. In the meantime I would however downgrade asap to version 0.179.0

2 Likes

Thanks a lot Jan for your quick feedback! Will do.

Fix got released with [email protected]

1 Like

This error persists in version 0.183.1. Take a look as soon as you can.

Welcome to the community @hugoperes!

I did just test it again.

  1. Opened older n8n version
  2. Created a workflow that contains the wait node (tested both wait for a certain amount of time and for webhook call)
  3. Started the workflow
  4. Closed n8n
  5. Started again with latest n8n version

The workflow executed both times fine (either after the amount of time set or after the webhook got called). Can you please provide additional information what is not working for you that we can debug. Thanks!