We are implementing Google Vertex AI (Gemini 2.5 Pro) inside n8n workflows, using the new AI Agent nodes and the Structured Output Parser to enforce JSON communication between agents.
Context
-
Workflow uses multiple AI Agents (Entry Agent → Stock Control → Finance → Marketing, etc.).
-
Each agent has its own prompt and JSON schema, processed through Structured Output Parser for consistency.
-
Vertex AI is connected via the native n8n Vertex AI node (not via HTTP Request).
Problem
- On the very first AI Agent (Entry Agent), the workflow fails before parsing with the following error:
Problem in node ‘Agente de Entrada’
Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
-
This happens even when the JSON schema is valid inside the Structured Output Parser.
-
Yesterday the same workflow worked fine → today it fails with the error above, no schema changes.
-
It seems related to how the Vertex AI node returns its output to the Parser:
-
Sometimes the node returns
undefinedor non-iterable output. -
The Parser then tries to iterate over
undefined, triggering the error.
-
What we already tried
-
Removed the Parser temporarily → workflow runs, so the issue is specifically on the Parser step.
-
Checked the output of Vertex AI → sometimes plain text, sometimes malformed JSON.
-
Tried Auto-Fix Format in the Parser → same issue.
-
Updated Docker + n8n version → problem persists.
-
Verified that in Vertex AI Console there is no saved prompt/schema (so output should be free-form).
Hypothesis
-
The error may be caused by the Vertex AI node using streaming output internally, while the Parser expects a fully resolved JSON object.
-
When the response is empty, malformed, or stream-based, the Parser receives
undefinedinstead of iterable JSON.
Request
Has anyone faced the Symbol.asyncIterator error when chaining Vertex AI → Structured Output Parser?
Is there a known fix (e.g., disabling streaming, normalizing output with a Function node, or bugfix in recent n8n versions)?
Should we switch to HTTP Request node + responseSchema instead of the native Vertex AI node for reliable JSON outputs?