[BUG]Deleting the assigned variable in a variable assigner node will raise an Application error if the variable has already been deleted or the key has been modified. #13355

Closed
opened 2026-02-21 19:11:48 -05:00 by yindo · 1 comment
Owner

Originally created by @DarkRingSystem on GitHub (Apr 25, 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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Configure a Variable Assigner Node
    Add a "Variable Assigner Node" to the canvas and select a target variable to assign (e.g., the loop variable loop_var from a Loop Node).

2.Delete or Modify the Source Variable
Delete the original Loop Node or rename its variable from loop_var to a new name (e.g., new_loop_var).

3.Remove the Target Variable in the Assigner Node
Return to the Variable Assigner Node, click the × button next to the target variable (this removes only the variable binding, not the entire assignment rule).

4.Observe the Error
The page will throw an Application error, indicating that the original variable loop_var cannot be found.

GIF:

Image

✔️ Expected Behavior

Normal Deletion:

When a user removes an invalid or unused variable binding (by clicking the × button next to the target variable in the Variable Assigner Node), the system should:

  1. Allow the deletion without errors.
  2. Automatically clear the invalid reference or prompt a warning (non-blocking).
  3. Keep the workflow editable and functional.

Actual Behavior

Critical Error on Deletion:
After deleting the variable binding (e.g., removing loop_var from the Variable Assigner Node), the system:

  1. Throws an unhandled Application error (e.g., "Variable 'loop_var' not found").
  2. Blocks further editing of the workflow (e.g., the canvas becomes unresponsive or freezes).
  3. Fails to recover even after page refresh, workflow reload, or export/import, resulting in permanent data loss and an irreparable workflow state.
Originally created by @DarkRingSystem on GitHub (Apr 25, 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 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Configure a Variable Assigner Node Add a "Variable Assigner Node" to the canvas and select a target variable to assign (e.g., the loop variable loop_var from a Loop Node). 2.Delete or Modify the Source Variable Delete the original Loop Node or rename its variable from loop_var to a new name (e.g., new_loop_var). 3.Remove the Target Variable in the Assigner Node Return to the Variable Assigner Node, click the × button next to the target variable (this removes only the variable binding, not the entire assignment rule). 4.Observe the Error The page will throw an Application error, indicating that the original variable loop_var cannot be found. GIF: ![Image](https://github.com/user-attachments/assets/8911a9ec-5ae4-433c-8d7d-5921c186b424) ### ✔️ Expected Behavior Normal Deletion: When a user removes an invalid or unused variable binding (by clicking the × button next to the target variable in the Variable Assigner Node), the system should: 1. Allow the deletion without errors. 2. Automatically clear the invalid reference or prompt a warning (non-blocking). 3. Keep the workflow editable and functional. ### ❌ Actual Behavior Critical Error on Deletion: After deleting the variable binding (e.g., removing loop_var from the Variable Assigner Node), the system: 1. Throws an unhandled Application error (e.g., "Variable 'loop_var' not found"). 2. Blocks further editing of the workflow (e.g., the canvas becomes unresponsive or freezes). 3. Fails to recover even after page refresh, workflow reload, or export/import, resulting in permanent data loss and an irreparable workflow state.
yindo closed this issue 2026-02-21 19:11:48 -05:00
Author
Owner

@crazywoola commented on GitHub (Apr 25, 2025):

Duplicated please upgrade to v1.3.0 https://github.com/langgenius/dify/issues/18568

@crazywoola commented on GitHub (Apr 25, 2025): Duplicated please upgrade to v1.3.0 https://github.com/langgenius/dify/issues/18568
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13355