[Bug]Unhandled Runtime Error:Failed to fetch in service/base.ts (360:18) @ fetch #6920

Closed
opened 2026-02-21 18:17:58 -05:00 by yindo · 4 comments
Owner

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

main

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

follow the instruction per doc, visit the localhost:3000 and get the err in browser

✔️ Expected Behavior

normal webui without error

Actual Behavior

image

Originally created by @zydmtaichi on GitHub (Nov 25, 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 main ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce follow the instruction per doc, visit the localhost:3000 and get the err in browser ### ✔️ Expected Behavior normal webui without error ### ❌ Actual Behavior ![image](https://github.com/user-attachments/assets/733194ae-c99a-4311-bc64-5c8eec7dce26)
yindo added the 🐞 bug label 2026-02-21 18:17:58 -05:00
yindo closed this issue 2026-02-21 18:17:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 25, 2024):

I found two similar unsolved discussions that might be relevant to your issue:

  1. Local Docker Setup Failure - This discussion involves issues with setting up Dify locally using Docker, which might be related to your self-hosted setup [1].

  2. Interface error 500 after startup - This discussion addresses an error 500 occurring after startup, which could be related to the "Failed to fetch" error you're encountering [2].

For your specific issue, ensure that the necessary environment variables are correctly set for the Dify web UI to function in a self-hosted environment. Key variables include CONSOLE_API_URL, CONSOLE_WEB_URL, SERVICE_API_URL, APP_API_URL, APP_WEB_URL, and FILES_URL [3][4]. Additionally, check for any network or CORS configurations that might be affecting access to the web UI on localhost.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 25, 2024): <!-- Answer --> I found two similar unsolved discussions that might be relevant to your issue: 1. [Local Docker Setup Failure](https://github.com/langgenius/dify/discussions/9344) - This discussion involves issues with setting up Dify locally using Docker, which might be related to your self-hosted setup <sup>[[1]](https://github.com/langgenius/dify/discussions/9344)</sup>. 2. [Interface error 500 after startup](https://github.com/langgenius/dify/discussions/7252) - This discussion addresses an error 500 occurring after startup, which could be related to the "Failed to fetch" error you're encountering <sup>[[2]](https://github.com/langgenius/dify/discussions/7252)</sup>. For your specific issue, ensure that the necessary environment variables are correctly set for the Dify web UI to function in a self-hosted environment. Key variables include `CONSOLE_API_URL`, `CONSOLE_WEB_URL`, `SERVICE_API_URL`, `APP_API_URL`, `APP_WEB_URL`, and `FILES_URL` <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/environments.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/jp/getting-started/install-self-hosted/environments.md)</sup>. Additionally, check for any network or CORS configurations that might be affecting access to the web UI on localhost. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@zydmtaichi commented on GitHub (Nov 25, 2024):

@crazywoola

@zydmtaichi commented on GitHub (Nov 25, 2024): @crazywoola
Author
Owner

@crazywoola commented on GitHub (Nov 25, 2024):

Can't reproduce this problem. Please check the env settings. The provided information isn't enough to guess what happens, we do not provide instructions for source code start up. If you do have questions, please upgrade to our business plan to get technical support.

@crazywoola commented on GitHub (Nov 25, 2024): Can't reproduce this problem. Please check the env settings. The provided information isn't enough to guess what happens, we do not provide instructions for source code start up. If you do have questions, please upgrade to our business plan to get technical support.
Author
Owner

@zydmtaichi commented on GitHub (Nov 25, 2024):

Can't reproduce this problem. Please check the env settings. The provided information isn't enough to guess what happens, we do not provide instructions for source code start up. If you do have questions, please upgrade to our business plan to get technical support.

The instructions for source code start up is in here, I copy all env example file as the article required. But the webui still looks abnormal

@zydmtaichi commented on GitHub (Nov 25, 2024): > Can't reproduce this problem. Please check the env settings. The provided information isn't enough to guess what happens, we do not provide instructions for source code start up. If you do have questions, please upgrade to our business plan to get technical support. The instructions for source code start up is in [here](https://docs.dify.ai/zh-hans/getting-started/install-self-hosted/local-source-code), I copy all env example file as the article required. But the webui still looks abnormal
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6920