Cannot read properties of null (reading ‘length’) While n8n Using Self-Host LLM(vLLM)
Hi all, I am new on n8n, I already have A workflow, the Workflow are using Self Hosted LLM, The LLM is Llama 3.2 11B Vision Instruct(no Quantize), The LLM are running using vLLM and connect to LLM Gateway using LiteLLM. This is the command line to rune the vLLM.
command: [
"python3",
"-m",
"vllm.entrypoints.openai.api_server",
"--model",
"meta-llama/Llama-3.2-11B-Vision-Instruct",
"--max-model-len",
"8192",
"--dtype",
"bfloat16",
"--gpu-memory-utilization",
"1.0",
"--max-num-seqs",
"32",
"--enable-prefix-caching",
"--enable-auto-tool-choice",
"--tool-call-parser",
"llama3_json",
"--chat-template",
"/templates/tool_chat_template_llama3.2_json.jinja"
]
For The n8n I use the npx
command to install and run the n8n, the version of n8n is 1.105.3
.
What is the error message (if any)?
The error from n8n workflow is
NodeOperationError: Cannot read properties of null (reading 'length') at /Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:305:12 at Array.forEach (<anonymous>) at ExecuteContext.toolsAgentExecute (/Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:294:16) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecuteContext.execute (/Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts:117:10) at WorkflowExecute.runNode (/Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9) at /Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27 at /Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2158:11
and this for the debug log from console
11:43:54.898 debug Workflow execution finished with error { "error": { "level": "warning", "tags": { }, "timestamp": 1754541834863, "context": { }, "functionality": "regular", "name": "NodeOperationError", "node": { "parameters": { "aiAgentStarterCallout": "", "promptType": "auto", "text": "={{ $json.chatInput } }", "hasOutputParser": true, "notice": "", "needsFallback": false, "options": { "systemMessage": "Kamu adalah asisten layanan. Jika user mengirim JSON yang memuat \"no_hp_baru\" dan \"nik_ktp\", jalankan tool `change_phone` dengan argumen persis. Jika salah satu field hilang, tanyakan field tersebut secara terpisah. Setelah tool selesai, ringkas hasilnya secara singkat dan jelas.\n" } }, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 2.1, "position": [432,-304], "id": "47354b03-93eb-47ec-897a-249b1cce4421", "name": "AI Agent" }, "messages": [], "message": "Cannot read properties of null (reading 'length')", "stack": "NodeOperationError: Cannot read properties of null (reading 'length')\n at /Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts: 305: 12\n at Array.forEach (<anonymous>)\n at ExecuteContext.toolsAgentExecute (/Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts: 294: 16)\n at processTicksAndRejections (node: internal/process/task_queues: 95: 5)\n at ExecuteContext.execute (/Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts: 117: 10)\n at WorkflowExecute.runNode (/Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/execution-engine/workflow-execute.ts: 1212: 9)\n at /Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/execution-engine/workflow-execute.ts: 1582: 27\n at /Users/yogiwahyu/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/execution-engine/workflow-execute.ts: 2158: 11" }, "workflowId": "v5Dy6xi4Uw1zNWD7", "file": "logger-proxy.js", "function": "exports.debug" }
11:43:54.902 debug Executing hook (hookFunctionsSave) { "executionId": "6", "workflowId": "v5Dy6xi4Uw1zNWD7", "file": "execution-lifecycle-hooks.js" }
Please share your workflow
Information on your n8n setup using npx
- **n8n version:
1.105.3
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: