langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
47.01k stars 6.67k forks source link

Stuck while creating administrator account #5765

Closed Shuming-Cheng closed 2 months ago

Shuming-Cheng commented 3 months ago

Self Checks

Dify version

0.6.12-fix1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After the normal installation steps, enter the interface and prepare to create an administrator account. Unable to load image

✔️ Expected Behavior

Creating an account normally

❌ Actual Behavior

Unable to create account

dosubot[bot] commented 3 months ago

To resolve the issue with the page not loading properly when trying to create an administrator account in Dify version 0.6.12-fix1, follow these steps:

  1. Check Docker Containers: Ensure all necessary Docker containers are running correctly:

    docker compose ps
  2. Inspect Logs: Check the logs of the web container for any errors:

    docker logs docker-web-1
  3. Network Issues: Ensure there are no network issues or firewall rules blocking access to the necessary ports (e.g., port 80).

  4. Browser Console: Open the browser's developer console (F12) and check for any JavaScript errors or network issues.

  5. Environment Variables: Ensure that the environment variables in your .env file are correctly set up. Compare them with the docker/.env.example file.

  6. Restart Services: Restart the services:

    docker compose down
    docker compose up -d

If the issue persists, providing more detailed logs or error messages can help with further diagnosis [1].

To continue talking to Dosu, mention @dosu.

potofo commented 3 months ago

Hi @Shuming-Cheng

Please confirm the following three points. I sccesfull to execute Dify-0.6.12-fix1 with this temporary workaround.

  1. Create the dify/docker/.env file (#5744) cp dify/docker/.env.example dify/docker/.env
  2. Set CONSOLE_API_URL (#5735) vi dify/docker/.env
    # The backend URL of the console API,
    # used to concatenate the authorization callback.
    # If empty, it is the same domain.
    # Example: https://api.console.dify.ai
    CONSOLE_API_URL=http://localhost
  3. Set CONSOLE_API_URL in the web section of docker-compose.yaml (#5735) vi dify/docker/docker-compose.yaml
    
    # Frontend web application.
    web:
    image: langgenius/dify-web:0.6.12-fix1
    restart: always
    environment:
    #CONSOLE_API_URL: ${CONSOLE_API_URL:-}
    CONSOLE_API_URL: ''
    ``
    ![Dify-v0 6 12-fix1](https://github.com/langgenius/dify/assets/138992835/cd63a4fd-89c5-49c5-9a3f-e2e67bc0e076)
Shuming-Cheng commented 3 months ago

image image Created a new. env file The following changes have been made to Docker Compose.yaml docker compose up -d The problem is still unresolved

Shuming-Cheng commented 3 months ago

hello @potofo , I still can't fix this problem.

takatost commented 3 months ago

Hey @Shuming-Cheng 😃, thx a lot for your feedback! You can help us pinpoint the issue by following these steps:

  1. Open your browser’s dev tools, switch to the Network tab, and refresh the page. Check if there are any requests still loading or failing. If you see any suspicious requests, take a screenshot of the request list and the details of those requests

  2. Have you made any changes to the docker-compose.yaml and .env configuration files? Especially configs related to addresses and ports like the nginx port, CONSOLE_API_URL, and CORS settings, etc.

Thx!

potofo commented 3 months ago

hello @Shuming-Cheng

Have you confirmed the fix in the dify/docker/docker-compose.yaml file? You have to change following line 307.

before 307 CONSOLE_API_URL: ${CONSOLE_API_URL:-} after 307 CONSOLE_API_URL: ''

303   web:
304     image: langgenius/dify-web:0.6.12-fix1
305     restart: always
306     environment:
307       #CONSOLE_API_URL: ${CONSOLE_API_URL:-}
308       CONSOLE_API_URL: ''
309       APP_API_URL: ${APP_API_URL:-}
310       SENTRY_DSN: ${SENTRY_DSN:-}
Tomuncle1 commented 3 months ago

same question,hope to solve it

0sengseng0 commented 3 months ago

Hey @Shuming-Cheng 😃, thx a lot for your feedback! You can help us pinpoint the issue by following these steps:嘿@Shuming-Cheng 😃,非常感谢您的反馈!您可以按照以下步骤帮助我们查明问题:

  1. Open your browser’s dev tools, switch to the Network tab, and refresh the page. Check if there are any requests still loading or failing. If you see any suspicious requests, take a screenshot of the request list and the details of those requests打开浏览器的开发工具,切换到“网络”选项卡,然后刷新页面。检查是否有任何请求仍在加载或失败。如果您发现任何可疑请求,请截取请求列表以及这些请求的详细信息
  2. Have you made any changes to the docker-compose.yaml and .env configuration files? Especially configs related to addresses and ports like the nginx port, CONSOLE_API_URL, and CORS settings, etc.您是否对 docker-compose.yaml.env 配置文件进行了任何更改?特别是与地址和端口相关的配置,例如 nginx 端口、 CONSOLE_API_URL 和 CORS 设置等。

Thx! 谢谢! I deployed dify on the server and got a CORS error when initializing on the client: image image image image image

milvus-standalone log

image image

crazywoola commented 2 months ago

image. See this, you are trying to access localhost from public ip address. @0sengseng0 You should set this CONSOLE_API_URL to your ip address instead.