In Chaflow, the second conversation prompts "File validation failed for file:xxxx.xlsx" #12317

Closed
opened 2026-02-21 19:06:53 -05:00 by yindo · 9 comments
Owner

Originally created by @ShasealinWss on GitHub (Mar 28, 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.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Workflow Configuration:
  • Start node with file upload parameter userExcel (.xls/.xlsx only)

Image

  • Conditional branch node checking sys.dialogue_count
    • First conversation: Parses uploaded file → stores in session
    • Subsequent conversations: Retrieves data from session
      Image
  • After completing the workflow, I test it in testchat
    The first execution and subsequent attempts (second and third) all succeeded.
    Image
  • Published Link :
    • 1st conversation: Success
    • 2nd conversation: "File validation failed for file: report.xlsx"
    Image

✔️ Expected Behavior

Synchronized session states between preview and published environment

Actual Behavior

Published version fails to validate file in subsequent conversations

Originally created by @ShasealinWss on GitHub (Mar 28, 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.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Workflow Configuration: - Start node with file upload parameter `userExcel` (.xls/.xlsx only) ![Image](https://github.com/user-attachments/assets/94189445-4fdf-47ec-a119-1d27ca8ee544) - Conditional branch node checking sys.dialogue_count * First conversation: Parses uploaded file → stores in session * Subsequent conversations: Retrieves data from session ![Image](https://github.com/user-attachments/assets/a91d1a67-b472-43d6-ae07-681fbb60a2ce) - After completing the workflow, I test it in testchat The first execution and subsequent attempts (second and third) all succeeded. ![Image](https://github.com/user-attachments/assets/5a8df772-06e9-4a68-a975-29f4cc52c709) - ​**Published Link** ❌: • 1st conversation: Success • 2nd conversation: "File validation failed for file: report.xlsx" ![Image](https://github.com/user-attachments/assets/a7b5156f-c830-49bb-bf24-961da1c184f8) ### ✔️ Expected Behavior Synchronized session states between preview and published environment ### ❌ Actual Behavior ❌ Published version fails to validate file in subsequent conversations
yindo added the 🐞 bug label 2026-02-21 19:06:53 -05:00
yindo closed this issue 2026-02-21 19:06:53 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 28, 2025):

@ShasealinWss Hello! I'm here to help you with bug reports, answer questions, and assist you as a contributor. Let's tackle this issue together while we wait for a human maintainer.

I found a similar unsolved discussion that might be relevant to your issue: Help,the issue of continuous dialogue around uploading files, which was last updated on October 29, 2024 [1].

Regarding your issue, the file validation failure in the published environment could be related to differences in session state management between the preview and published environments. Unfortunately, I couldn't find specific information on these differences in the repository. However, you might want to check the configuration settings and environment variables that affect file validation and session state management. For instance, ensure that the SECRET_KEY, SESSION_TYPE, and other session-related environment variables are correctly configured in your self-hosted setup. Additionally, verify the file validation settings like FILES_ACCESS_TIMEOUT and file size limits to ensure they align with your workflow requirements [2][3].

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 (Mar 28, 2025): <!-- Greeting --> @ShasealinWss Hello! I'm here to help you with bug reports, answer questions, and assist you as a contributor. Let's tackle this issue together while we wait for a human maintainer. <!-- Answer --> I found a similar unsolved discussion that might be relevant to your issue: [Help,the issue of continuous dialogue around uploading files](https://github.com/langgenius/dify/discussions/9990), which was last updated on October 29, 2024 <sup>[[1]](https://github.com/langgenius/dify/discussions/9990)</sup>. Regarding your issue, the file validation failure in the published environment could be related to differences in session state management between the preview and published environments. Unfortunately, I couldn't find specific information on these differences in the repository. However, you might want to check the configuration settings and environment variables that affect file validation and session state management. For instance, ensure that the `SECRET_KEY`, `SESSION_TYPE`, and other session-related environment variables are correctly configured in your self-hosted setup. Additionally, verify the file validation settings like `FILES_ACCESS_TIMEOUT` and file size limits to ensure they align with your workflow requirements <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/.env.example)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/jp/getting-started/install-self-hosted/environments.md)</sup>. <!-- 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/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6aeb2a4c-a658-4fbe-8504-3a00a25215c1?feedback_type=other)</sup>
Author
Owner

@ShasealinWss commented on GitHub (Mar 28, 2025):

@dosu
I see the relevant question,but it seems can't solve my issue。

Image
I uploaded the same document and asked the same question in both the preview and publishing environments。

  • The following is the way I used to publish links:

Image

@ShasealinWss commented on GitHub (Mar 28, 2025): @dosu I see the relevant question,but it seems can't solve my issue。 ![Image](https://github.com/user-attachments/assets/7285c178-0ada-456c-8d27-27de4e324db4) I uploaded the same document and asked the same question in both the preview and publishing environments。 - The following is the way I used to publish links: ![Image](https://github.com/user-attachments/assets/90d10e88-3bfe-481e-ac8c-47c720f2dc84)
Author
Owner

@dosubot[bot] commented on GitHub (Mar 28, 2025):

The issue you're encountering seems to be related to the limitations of using chat LLM models for context retention across multiple conversation rounds. In Dify, chat LLM models may not retain context about uploaded files in subsequent interactions, as they rely on the initial context provided during the upload, which is handled by a VLM model. This limitation can lead to the file validation errors you're experiencing in the published environment.

To address this, you might consider implementing a mechanism to explicitly store and retrieve the file context within your workflow. This could involve saving the necessary file data or metadata in a session variable or database during the initial upload and then referencing this stored information in subsequent conversation rounds. This approach can help maintain the context needed for file validation and processing across different interactions.

Additionally, ensure that your session management and environment configurations are consistent between the preview and published environments, as discrepancies here could also contribute to the issue.

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 (Mar 28, 2025): <!-- Answer --> The issue you're encountering seems to be related to the limitations of using chat LLM models for context retention across multiple conversation rounds. In Dify, chat LLM models may not retain context about uploaded files in subsequent interactions, as they rely on the initial context provided during the upload, which is handled by a VLM model. This limitation can lead to the file validation errors you're experiencing in the published environment. To address this, you might consider implementing a mechanism to explicitly store and retrieve the file context within your workflow. This could involve saving the necessary file data or metadata in a session variable or database during the initial upload and then referencing this stored information in subsequent conversation rounds. This approach can help maintain the context needed for file validation and processing across different interactions. Additionally, ensure that your session management and environment configurations are consistent between the preview and published environments, as discrepancies here could also contribute to the issue. <!-- 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/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/27f31acf-f037-425f-84a5-c1b78c31fa4a?feedback_type=other)</sup>
Author
Owner

@ShasealinWss commented on GitHub (Mar 28, 2025):

@dosu
I have used the session variable. When I test in the testchat,after the first conversion, the session variable have value

Image

@ShasealinWss commented on GitHub (Mar 28, 2025): @dosu I have used the session variable. When I test in the testchat,after the first conversion, the session variable have value ![Image](https://github.com/user-attachments/assets/e38eb525-adda-487d-ad56-d8bed6243060)
Author
Owner

@dosubot[bot] commented on GitHub (Mar 28, 2025):

It seems like you're using session variables correctly in the test chat environment, where they retain values after the first conversion. However, the issue might be arising in the published environment due to differences in how session states are managed or configured.

Here are a few things you can check or try:

  1. Session Configuration: Ensure that session-related configurations, such as SESSION_TYPE and SECRET_KEY, are consistent between your test and published environments. Any discrepancies here could lead to different behaviors in session management.

  2. Environment Variables: Double-check that all relevant environment variables are set correctly in both environments. This includes any variables related to session management and file handling.

  3. File Handling Consistency: Verify that the file handling settings, such as file size limits and allowed file types, are the same in both environments. Inconsistencies here could affect file validation.

  4. Session Persistence: Consider implementing a more robust session persistence mechanism, such as storing session data in a database, to ensure that session variables are consistently available across different environments.

By ensuring consistency in these areas, you may be able to resolve the discrepancies between the test and published environments.

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 (Mar 28, 2025): <!-- Answer --> It seems like you're using session variables correctly in the test chat environment, where they retain values after the first conversion. However, the issue might be arising in the published environment due to differences in how session states are managed or configured. Here are a few things you can check or try: 1. **Session Configuration**: Ensure that session-related configurations, such as `SESSION_TYPE` and `SECRET_KEY`, are consistent between your test and published environments. Any discrepancies here could lead to different behaviors in session management. 2. **Environment Variables**: Double-check that all relevant environment variables are set correctly in both environments. This includes any variables related to session management and file handling. 3. **File Handling Consistency**: Verify that the file handling settings, such as file size limits and allowed file types, are the same in both environments. Inconsistencies here could affect file validation. 4. **Session Persistence**: Consider implementing a more robust session persistence mechanism, such as storing session data in a database, to ensure that session variables are consistently available across different environments. By ensuring consistency in these areas, you may be able to resolve the discrepancies between the test and published environments. <!-- 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/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ed0fcc5b-0689-4bc5-8093-bdac5638a9c1?feedback_type=other)</sup>
Author
Owner

@zlllya commented on GitHub (Apr 2, 2025):

请问解决了吗,我也有碰到这个问题

@zlllya commented on GitHub (Apr 2, 2025): 请问解决了吗,我也有碰到这个问题
Author
Owner

@XY2336661 commented on GitHub (Apr 7, 2025):

我也遇到这个问题了,请问有进展吗?

@XY2336661 commented on GitHub (Apr 7, 2025): 我也遇到这个问题了,请问有进展吗?
Author
Owner

@huangpeihp commented on GitHub (Apr 9, 2025):

the same promble for me

@huangpeihp commented on GitHub (Apr 9, 2025): the same promble for me
Author
Owner

@FisherWY commented on GitHub (Jul 17, 2025):

The same promble for me in v1.1.3, but no such problem in v1.5.0

@FisherWY commented on GitHub (Jul 17, 2025): The same promble for me in `v1.1.3`, but no such problem in `v1.5.0`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12317