a month ago
When using a chat + ai agent, in the dashboard the process works without any problems. When I use embedded or hosted chat the process breaks if a tool is connected to the agent (without a tool, it works). It does not matter how simple or what the tool is there is an error. On the chat bot the error is: { "message": "Error in workflow" }.
Attempted to use chatapt/gemini to go through the error.
logs: logs of railway: Cannot read properties of undefined (reading 'supplyData'); error in n8n dashboard (agent response): TypeError: Cannot read properties of undefined (reading 'supplyData') at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/get-input-connection-data.js:30:32) at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/execute-context.js:36:73) at getConnectedTools (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/helpers.js:132:39) at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js:72:58) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/agents/Agent/Agent.node.js:379:20) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:632:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:890:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1224:20;
1 Replies
a month ago
Cannot read properties of undefined (reading 'supplyData')
at ExecuteContext.getInputConnectionData
...
at getConnectedTools
shows that the agent is trying to connect to some tool but there’s no valid input. I suggest putting an if node to check validity (according to google and n8n docs) before moving on to the next step.