environment variable is null when execute node #6447

Closed
opened 2026-02-21 18:15:47 -05:00 by yindo · 5 comments
Owner

Originally created by @Qiuzg on GitHub (Oct 30, 2024).

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

0.10.2

Cloud or Self Hosted

Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

In version 0.10.2, when executing a node individually, if the node requires the use of environment variables, the input value obtained for the environment variable is none. However, when the entire process is executed, the environment variables can be obtained. This issue did not exist in version 0.9.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Qiuzg on GitHub (Oct 30, 2024). ### 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 0.10.2 ### Cloud or Self Hosted Self Hosted (Docker), Self Hosted (Source) ### Steps to reproduce In version 0.10.2, when executing a node individually, if the node requires the use of environment variables, the input value obtained for the environment variable is none. However, when the entire process is executed, the environment variables can be obtained. This issue did not exist in version 0.9. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bugstale labels 2026-02-21 18:15:47 -05:00
yindo closed this issue 2026-02-21 18:15:47 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 30, 2024):

The issue you're experiencing, where environment variables are null when executing a node individually in version 0.10.2, might be related to how the VariablePool class initializes and manages environment variables. When executing nodes individually, it's possible that the environment variables are not being correctly passed or initialized in the VariablePool.

In the Dify codebase, the VariablePool class is responsible for managing environment variables, and it initializes them by accepting them as an optional parameter during its initialization. These variables are then added to the pool for access during node execution [1].

To address this issue, you might want to check if the environment variables are being correctly passed to the VariablePool when executing nodes individually. Ensure that the initialization process for the VariablePool includes the necessary environment variables in this context, similar to how they are handled when executing the entire process.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 30, 2024): <!-- Answer --> The issue you're experiencing, where environment variables are null when executing a node individually in version 0.10.2, might be related to how the `VariablePool` class initializes and manages environment variables. When executing nodes individually, it's possible that the environment variables are not being correctly passed or initialized in the `VariablePool`. In the Dify codebase, the `VariablePool` class is responsible for managing environment variables, and it initializes them by accepting them as an optional parameter during its initialization. These variables are then added to the pool for access during node execution <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/entities/variable_pool.py)</sup>. To address this issue, you might want to check if the environment variables are being correctly passed to the `VariablePool` when executing nodes individually. Ensure that the initialization process for the `VariablePool` includes the necessary environment variables in this context, similar to how they are handled when executing the entire process. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@Qiuzg commented on GitHub (Dec 18, 2024):

this bug still exists

@Qiuzg commented on GitHub (Dec 18, 2024): this bug still exists
Author
Owner

@dosubot[bot] commented on GitHub (Dec 18, 2024):

@takatost, the user Qiuzg has indicated that the bug still exists despite the issue being marked stale and closed. Could you please assist them with this?

@dosubot[bot] commented on GitHub (Dec 18, 2024): @takatost, the user Qiuzg has indicated that the bug still exists despite the issue being marked stale and closed. Could you please assist them with this?
Author
Owner

@Zoku-777 commented on GitHub (Jan 27, 2025):

got same bug on 0.14.2 version

@Zoku-777 commented on GitHub (Jan 27, 2025): got same bug on 0.14.2 version
Author
Owner

@dosubot[bot] commented on GitHub (Feb 27, 2025):

Hi, @Qiuzg. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug in Dify version 0.10.2 where environment variables return null when executing a node individually.
  • The issue does not occur when the entire process is executed.
  • I suggested the VariablePool class might not initialize environment variables correctly for individual node execution.
  • You confirmed the bug persists, and another user, Zoku-777, reported the same issue in version 0.14.2.
  • I have requested further assistance from @takatost.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting on this issue.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 27, 2025): Hi, @Qiuzg. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a bug in Dify version 0.10.2 where environment variables return null when executing a node individually. - The issue does not occur when the entire process is executed. - I suggested the `VariablePool` class might not initialize environment variables correctly for individual node execution. - You confirmed the bug persists, and another user, Zoku-777, reported the same issue in version 0.14.2. - I have requested further assistance from @takatost. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting on this issue. - If there is no further activity, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6447