Error when adding multiple variables in variable node (workflow) #1954

Closed
opened 2026-02-21 17:39:55 -05:00 by yindo · 0 comments
Owner

Originally created by @AndyMik90 on GitHub (Apr 9, 2024).

Originally assigned to: @iamjoel on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.0-fix1

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

When adding two variables after each other (both empty) I got error:

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'id')

Source
app/components/workflow/utils.ts (217:56) @ id

215 | } = change
216 | const sourceNode = nodes.find(node => node.id === edge.source)!

217 | nodesConnectedSourceOrTargetHandleIdsMap[sourceNode.id] = nodesConnectedSourceOrTargetHandleIdsMap[sourceNode.id] || {
| ^
218 | _connectedSourceHandleIds: [...(sourceNode?.data._connectedSourceHandleIds || [])],
219 | _connectedTargetHandleIds: [...(sourceNode?.data._connectedTargetHandleIds || [])],
220 | }

Call Stack
forEach
app/components/workflow/utils.ts (211:10)
eval
app/components/workflow/hooks/use-edges-interactions.ts (177:6)
handleVariableAssignerEdgesChange
app/components/workflow/nodes/variable-assigner/components/var-list/use-var-list.ts (23:4)
onChange
app/components/workflow/nodes/variable-assigner/components/var-list/index.tsx (44:6)
Show collapsed frames

✔️ Expected Behavior

No error when you know that it will require multiple variables

Actual Behavior

Error on multiple variables created inside Variable node.

Originally created by @AndyMik90 on GitHub (Apr 9, 2024). Originally assigned to: @iamjoel on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a quesion, 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] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.6.0-fix1 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce When adding two variables after each other (both empty) I got error: Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'id') Source app/components/workflow/utils.ts (217:56) @ id 215 | } = change 216 | const sourceNode = nodes.find(node => node.id === edge.source)! > 217 | nodesConnectedSourceOrTargetHandleIdsMap[sourceNode.id] = nodesConnectedSourceOrTargetHandleIdsMap[sourceNode.id] || { | ^ 218 | _connectedSourceHandleIds: [...(sourceNode?.data._connectedSourceHandleIds || [])], 219 | _connectedTargetHandleIds: [...(sourceNode?.data._connectedTargetHandleIds || [])], 220 | } Call Stack forEach app/components/workflow/utils.ts (211:10) eval app/components/workflow/hooks/use-edges-interactions.ts (177:6) handleVariableAssignerEdgesChange app/components/workflow/nodes/variable-assigner/components/var-list/use-var-list.ts (23:4) onChange app/components/workflow/nodes/variable-assigner/components/var-list/index.tsx (44:6) Show collapsed frames ### ✔️ Expected Behavior No error when you know that it will require multiple variables ### ❌ Actual Behavior Error on multiple variables created inside Variable node.
yindo added the 🐞 bug🌊 feat:workflow labels 2026-02-21 17:39:55 -05:00
yindo closed this issue 2026-02-21 17:39:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1954