"Cannot read properties of undefined (reading 'execute')" Error in Production Mode Only

Hi,

I’m encountering a frustrating issue where my workflow executes perfectly in Test mode but consistently fails in Production mode with the following error:

Cannot read properties of undefined (reading 'execute')

Environment Details:

  • n8n version: 1.98.1 (Self Hosted)
  • Key nodes used: HTTP Request, Information Extractor, AI Agent, MCP Client Tool, Code nodes
  • LangChain nodes: Several OpenRouter Chat Model nodes and information extractors

The Problem:

My workflow scrapes data, processes it with AI, and returns results. The strange part is that it runs flawlessly when testing individual nodes or parts of the workflow, but fails when running in production mode.

What I’ve Tried:

  • Verified all credentials are valid
  • Confirmed external services are accessible (ngrok endpoints)
  • Added error handling to critical nodes
  • Simplified parts of the workflow

Observations:

  • No specific node is identified in the error message
  • The error occurs consistently in production but never in test mode
  • The error appears related to node initialization/execution rather than data processing

Questions:

  1. What are the key differences between Test and Production mode that could cause this?
  2. Are there known issues with certain node types (particularly LangChain/AI nodes) in production?
  3. Could node references (like $('Webhook').first()) be causing issues in production context?
  4. Are there recommended debugging approaches for production-only errors?

Any insights or suggestions would be greatly appreciated. I’m happy to provide additional details if needed.

Thank you!

Hey @Joaquim_Breno_Brito,

I’ve never experienced anything like this before. It’s difficult to debug or provide any feedback without taking a look at your workflow.

I was thinking of asking you to share your workflow here, but I don’t think that would be very helpful either…

Hmm… would you be open to a quick chat on Google Meet? I’ll try my best to help.

DM me here, and I’ll share the link with you.

1 Like

I encountered the same thing when my workflow was incomplete. To be exact: I copied another workflow json to create a new workflow, but it somehow couldn’t add the ‘merge’ nodes properly. I didn’t spot immediately that there were invalid and unconnected nodes in there and got the same error as you. Was resolved when I fixed these nodes.

The update 1.99 solve the problem
idk why

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.