Get 400 error after install dify #8842

Closed
opened 2026-02-21 18:28:06 -05:00 by yindo · 7 comments
Owner

Originally created by @000b000 on GitHub (Mar 2, 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.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

after install dify in linux docker , i got this error "Expecting value: line 1 column 1 (char 0)" , and can not install model provider like ollama or other provider . and i find multiple 400 errors from /console/api/workspaces/current/plugin/tasks?page=1&page_size=100
Image

and find unhealthy status in docker-sandbox-1 container after running sudo docker compose ps the logs are below:

Image

is there anything in this container that cause these errors?

✔️ Expected Behavior

can install model provider

Actual Behavior

can not install model provider

Originally created by @000b000 on GitHub (Mar 2, 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce after install dify in linux docker , i got this error "Expecting value: line 1 column 1 (char 0)" , and can not install model provider like ollama or other provider . and i find multiple 400 errors from `/console/api/workspaces/current/plugin/tasks?page=1&page_size=100` ![Image](https://github.com/user-attachments/assets/1083fa85-e0bc-435d-8014-16635fee09a3) and find unhealthy status in` docker-sandbox-1` container after running `sudo docker compose ps` the logs are below: ![Image](https://github.com/user-attachments/assets/5d3aec82-38d3-4ef7-b47c-fbe61e8f1f63) is there anything in this container that cause these errors? ### ✔️ Expected Behavior can install model provider ### ❌ Actual Behavior can not install model provider
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:28:06 -05:00
yindo closed this issue 2026-02-21 18:28:06 -05:00
Author
Owner

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

Hello @000b000! I'm here to help you with any bugs, questions, or contributions. Let's work on resolving the issue you're facing with Dify.

I found some relevant information that might help address the issues you're experiencing:

  1. JSON Parsing Issue: The error message "Expecting value: line 1 column 1 (char 0)" suggests a JSON parsing issue. This could be due to an incorrectly formatted JSON request or response. Ensure that the JSON body of the request is correctly formatted and matches the expected structure required by the API. Also, verify that the Content-Type header of the request is set to application/json [1].

  2. HTTP 400 Errors: The Dify platform has specific error handling mechanisms for HTTP 400 errors during model provider installation. These include errors like ProviderNotInitializeError, ProviderQuotaExceededError, and ProviderModelCurrentlyNotSupportError. These errors indicate issues with provider credentials or unsupported models. Make sure your provider credentials are correctly configured in the settings [2][3].

  3. Docker Container Health: The unhealthy status of the docker-sandbox-1 container might be affecting the installation process. Although I couldn't find specific details about the initialization process of this container, it's important to ensure that all dependencies and configurations are correctly set up. Check for any missing Python libraries or configuration files mentioned in the logs, and verify that the HTTP proxy settings are correctly configured [4].

Additionally, there are similar threads discussing issues with installing plugins and model providers, such as this discussion about plugins not being installed after deploying via Docker [5]. You might find some useful insights there.

If these suggestions don't resolve the issue, consider checking the Docker logs for more detailed error messages that could provide further clues.

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 2, 2025): <!-- Greeting --> Hello @000b000! I'm here to help you with any bugs, questions, or contributions. Let's work on resolving the issue you're facing with Dify. <!-- Answer --> I found some relevant information that might help address the issues you're experiencing: 1. **JSON Parsing Issue**: The error message "Expecting value: line 1 column 1 (char 0)" suggests a JSON parsing issue. This could be due to an incorrectly formatted JSON request or response. Ensure that the JSON body of the request is correctly formatted and matches the expected structure required by the API. Also, verify that the `Content-Type` header of the request is set to `application/json` <sup>[[1]](https://github.com/langgenius/dify/issues/2769)</sup>. 2. **HTTP 400 Errors**: The Dify platform has specific error handling mechanisms for HTTP 400 errors during model provider installation. These include errors like `ProviderNotInitializeError`, `ProviderQuotaExceededError`, and `ProviderModelCurrentlyNotSupportError`. These errors indicate issues with provider credentials or unsupported models. Make sure your provider credentials are correctly configured in the settings <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/controllers/console/app/error.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/app/error.py)</sup>. 3. **Docker Container Health**: The unhealthy status of the `docker-sandbox-1` container might be affecting the installation process. Although I couldn't find specific details about the initialization process of this container, it's important to ensure that all dependencies and configurations are correctly set up. Check for any missing Python libraries or configuration files mentioned in the logs, and verify that the HTTP proxy settings are correctly configured <sup>[[4]](https://github.com/langgenius/dify/issues/11839)</sup>. Additionally, there are similar threads discussing issues with installing plugins and model providers, such as [this discussion](https://github.com/langgenius/dify/discussions/12825) about plugins not being installed after deploying via Docker <sup>[[5]](https://github.com/langgenius/dify/discussions/12825)</sup>. You might find some useful insights there. If these suggestions don't resolve the issue, consider checking the Docker logs for more detailed error messages that could provide further clues. <!-- 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/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/935e7be8-5602-4df5-b228-6c02052c3a31?feedback_type=other)</sup>
Author
Owner

@henrycg55 commented on GitHub (Mar 3, 2025):

+1,我也是同样的问题,要怎么解决?

@henrycg55 commented on GitHub (Mar 3, 2025): +1,我也是同样的问题,要怎么解决?
Author
Owner

@000b000 commented on GitHub (Mar 4, 2025):

+1,我也是同样的问题,要怎么解决?

我回退之前一个版本了,我看discord论坛里好多人也出现了这个问题。

@000b000 commented on GitHub (Mar 4, 2025): > +1,我也是同样的问题,要怎么解决? 我回退之前一个版本了,我看discord论坛里好多人也出现了这个问题。
Author
Owner

@ChuanGoing commented on GitHub (Mar 7, 2025):

+1,我也是同样的问题,要怎么解决?

我回退之前一个版本了,我看discord论坛里好多人也出现了这个问题。

我也是v1.0.0docker 部署出现这个,日志没什么帮助信息,你回退到哪个版本了?

@ChuanGoing commented on GitHub (Mar 7, 2025): > > +1,我也是同样的问题,要怎么解决? > > 我回退之前一个版本了,我看discord论坛里好多人也出现了这个问题。 我也是v1.0.0docker 部署出现这个,日志没什么帮助信息,你回退到哪个版本了?
Author
Owner

@utsumi-fj commented on GitHub (Mar 9, 2025):

I faced the same error when deploying Dify in the environment with forward proxy server. This error disappeared by appending plugin_daemon to the noProxy variable in .docker/config.json. When the environment has forward proxy, it is needed to specify the services to noProxy for communication between services.

For example, in proxy environment, the following services should be specified to noProxy:

$ cd docker
$ sudo docker compose config --services
redis
db
api
web
nginx
plugin_daemon
sandbox
ssrf_proxy
weaviate
worker
@utsumi-fj commented on GitHub (Mar 9, 2025): I faced the same error when deploying Dify in the environment with forward proxy server. This error disappeared by appending `plugin_daemon` to the `noProxy` variable in `.docker/config.json`. When the environment has forward proxy, it is needed to specify the services to `noProxy` for communication between services. For example, in proxy environment, the following services should be specified to `noProxy`: ``` $ cd docker $ sudo docker compose config --services redis db api web nginx plugin_daemon sandbox ssrf_proxy weaviate worker ```
Author
Owner

@ChuanGoing commented on GitHub (Mar 13, 2025):

+1,我也是同样的问题,要怎么解决?

我回退之前一个版本了,我看discord论坛里好多人也出现了这个问题。

我也是v1.0.0docker 部署出现这个,日志没什么帮助信息,你回退到哪个版本了?

Image

大概率是因为代理问题,在docker/daemon.json里面将sudo docker compose config --services列出来的服务配置到noproxy后,重新部署后问题得以解决

@ChuanGoing commented on GitHub (Mar 13, 2025): > > > +1,我也是同样的问题,要怎么解决? > > > > > > 我回退之前一个版本了,我看discord论坛里好多人也出现了这个问题。 > > 我也是v1.0.0docker 部署出现这个,日志没什么帮助信息,你回退到哪个版本了? ![Image](https://github.com/user-attachments/assets/f89fd783-3be9-4507-8f57-465d9fd78a48) 大概率是因为代理问题,在docker/daemon.json里面将sudo docker compose config --services列出来的服务配置到noproxy后,重新部署后问题得以解决
Author
Owner

@lhjk111 commented on GitHub (Jun 15, 2025):

docker compose config --services listed services should be specified to noProxy in the docker-compose.yaml

@lhjk111 commented on GitHub (Jun 15, 2025): docker compose config --services listed services should be specified to noProxy in the docker-compose.yaml
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8842