Executing workflow fails

Describe the issue/error/question

Hey, I’ve been using the execute workflow node quite a lot to split up my codebase but one thing that I regularly come across, is seeing this node fail in the automated executions (mostly triggered by webhooks). I don’t quite know why this is happening and would love to get some pointers on how to fix this

What is the error message (if any)?

TypeError: Cannot read properties of undefined (reading 'stack')
    at Object.executeWorkflow (/usr/local/lib/node_modules/n8n/dist/src/WorkflowExecuteAdditionalData.js:552:66)
    at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteWorkflow/ExecuteWorkflow.node.js:162:34)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:451:47

Please share the workflow

I don’t think that these specific nodes matter too much, I’ve had it happen multiple times already in different workflows, in different constellations as well. Anyways, this time it was the second node that produced the error message

Information on your n8n setup

  • n8n version: 0.169.0
  • Database you’re using (default: SQLite): default
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: cloud

Hey @jodeldiplomant, I am sorry to hear you’re having trouble. I did not run into this problem on my own side, even when executing several thousand sub-workflows.

As an initial pointer, could you check the execution data of your sub-workflow? Which node errors in your sub-workflow and what’s the error message?

Thats the weird part… The subworkflow got executed without any problems, but almost half an hour later. The workflow with the node which failed ran for 3.3 seconds, so the delay in time doesn’t make any sense. The subworkflow has a wait node which is supposed to wait for 10 minutes, but the workflow took 0.3 seconds to execute according to the execution history.
In the startnode of the subworkflow, the passed data is:

[
{
"error": "Cannot read properties of undefined (reading 'stack')"
}
]

All of these things really aren’t adding up…
Let me know your thoughts, in case you understand what is going on here…

I am also experiencing this issue with the “Execute workflow” node.

“ERROR: Cannot read properties of undefined (reading ‘stack’)”

This just started happening out of the blue, and it is not preventing the executed workflow from being executed successfully… it just shows as an error in my execution log.

Hi @matt.dick,

How do you have n8n installed / running? Are you also using a workflow to trigger another one?

@jon
We are using n8n cloud. After further investigation, this error happens when we trigger a different workflow with long Wait nodes from inside the erroring workflow. Our solve was to replace Execute Workflow node with a webhook. Is this best practice?

Hey @matt.dick,

Cloud is a bit different as I think there are execution timeouts so you could be hitting those limits.

You should be able to still use the execute workflow option but maybe check the wait times and tweak them or depending on the flow maybe implement some kind of batch processing to store them somewhere and run in one hit.