Workflow/Chatflow would crash when using LLM structured output #13799

Closed
opened 2026-02-21 19:13:55 -05:00 by yindo · 3 comments
Owner

Originally created by @tankgit on GitHub (May 12, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. create a workflow (or a chatflow), and edit it
  2. add a LLM node, use structured output, and add an array element in schema.
  3. add an iteration node, take the array output from step 2 as input.
  4. then add any node in iteration will cause the page crash, seems to be a front-end error.

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @tankgit on GitHub (May 12, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. create a workflow (or a chatflow), and edit it 2. add a LLM node, use structured output, and add an array element in schema. 3. add an iteration node, take the array output from step 2 as input. 4. then add any node in iteration will cause the page crash, seems to be a front-end error. ![Image](https://github.com/user-attachments/assets/7e518895-ee0e-4390-ae53-7558bd2eae55) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🤔 cant-reproduce label 2026-02-21 19:13:55 -05:00
yindo closed this issue 2026-02-21 19:13:55 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 12, 2025):

Hello @tankgit! I'm Dosu, here to help you with bugs, questions, and anything else while you wait for a human maintainer. Let’s get started!

The issue you're experiencing seems to be related to a front-end crash when adding nodes to an iteration node that uses structured output from an LLM node with an array element in the schema. Here are some potential areas to investigate:

  1. Schema Validation: Ensure that the JSON schema for the structured output is correctly defined. The schema should specify the array's item type using the items property within the Field type, and the type of the array should be one of the ArrayType enums, such as array[string], array[number], or array[object] [1].

  2. Iteration Node Configuration: Check the configuration of the iteration node. It should be set up to process array outputs correctly, and ensure that the input values are formatted as list objects. The iteration node processes each element in the array sequentially or in parallel, depending on the configuration [2].

  3. Error Handling: Review the error handling settings in the workflow editor. There are mechanisms for handling node errors, including retrying node execution or continuing the task via an alternative path. Ensure these settings are configured to handle potential errors gracefully [3].

  4. Front-End Components: The crash might be related to specific front-end components involved in rendering the iteration node. Components like VarReferencePicker, Split, ResultPanel, and others are crucial for the iteration node's functionality. Ensure these components are functioning correctly and are not causing the crash [4].

  5. Logging and Debugging: Utilize any available logging and debugging information to diagnose the issue. The useWorkflowRunEvent hook and WorkflowLoggingCallback class provide detailed logging for workflow events, which can help identify the cause of the crash [5].

By checking these areas, you might be able to identify and resolve the issue causing the front-end crash. If the problem persists, further investigation into the specific error messages or logs generated during the crash would be helpful.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (May 12, 2025): <!-- Greeting --> Hello @tankgit! I'm [Dosu](https://dosu.dev), here to help you with bugs, questions, and anything else while you wait for a human maintainer. Let’s get started! <!-- Answer --> The issue you're experiencing seems to be related to a front-end crash when adding nodes to an iteration node that uses structured output from an LLM node with an array element in the schema. Here are some potential areas to investigate: 1. **Schema Validation**: Ensure that the JSON schema for the structured output is correctly defined. The schema should specify the array's item type using the `items` property within the `Field` type, and the `type` of the array should be one of the `ArrayType` enums, such as `array[string]`, `array[number]`, or `array[object]` <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/llm/types.ts)</sup>. 2. **Iteration Node Configuration**: Check the configuration of the iteration node. It should be set up to process array outputs correctly, and ensure that the input values are formatted as list objects. The iteration node processes each element in the array sequentially or in parallel, depending on the configuration <sup>[[2]](https://github.com/crazywoola/dify-docs-mintlify/blob/main/en/guides/workflow/node/iteration.mdx)</sup>. 3. **Error Handling**: Review the error handling settings in the workflow editor. There are mechanisms for handling node errors, including retrying node execution or continuing the task via an alternative path. Ensure these settings are configured to handle potential errors gracefully <sup>[[3]](https://github.com/langgenius/dify/blob/main/web/i18n/sl-SI/workflow.ts)</sup>. 4. **Front-End Components**: The crash might be related to specific front-end components involved in rendering the iteration node. Components like `VarReferencePicker`, `Split`, `ResultPanel`, and others are crucial for the iteration node's functionality. Ensure these components are functioning correctly and are not causing the crash <sup>[[4]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/iteration/panel.tsx)</sup>. 5. **Logging and Debugging**: Utilize any available logging and debugging information to diagnose the issue. The `useWorkflowRunEvent` hook and `WorkflowLoggingCallback` class provide detailed logging for workflow events, which can help identify the cause of the crash <sup>[[5]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/hooks/use-workflow-run-event/use-workflow-run-event.ts)</sup>. By checking these areas, you might be able to identify and resolve the issue causing the front-end crash. If the problem persists, further investigation into the specific error messages or logs generated during the crash would be helpful. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4fb03ca3-c1ac-4512-979f-f44e366905a3?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (May 12, 2025):

Issues&PRs.yml.zip
Can not reproduce in our latest version v1.3.1. Please verify if this issue in the latest version.

@crazywoola commented on GitHub (May 12, 2025): [Issues&PRs.yml.zip](https://github.com/user-attachments/files/20180268/Issues.PRs.yml.zip) Can not reproduce in our latest version v1.3.1. Please verify if this issue in the latest version.
Author
Owner

@tankgit commented on GitHub (May 13, 2025):

Issues&PRs.yml.zip Can not reproduce in our latest version v1.3.1. Please verify if this issue in the latest version.

indeed, it works fine in v1.3.1.

@tankgit commented on GitHub (May 13, 2025): > [Issues&PRs.yml.zip](https://github.com/user-attachments/files/20180268/Issues.PRs.yml.zip) Can not reproduce in our latest version v1.3.1. Please verify if this issue in the latest version. indeed, it works fine in v1.3.1.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13799