Expecting value: line 1 column 1 (char 0) in v1.4.1 #14478

Closed
opened 2026-02-21 19:17:25 -05:00 by yindo · 2 comments
Owner

Originally created by @cethink on GitHub (Jun 7, 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

v1.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I tried to fix it, but it didn't work

https://github.com/langgenius/dify/issues/17827
https://github.com/langgenius/dify/issues/14608

vi /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment=HTTP_PROXY=http://127.0.0.1:7890
Environment=HTTPS_PROXY=http://127.0.0.1:7890
Environment=NO_PROXY=localhost,127.0.0.1,alma.cethink.top,weaviate,qdrand,db,redis,web,worker,plugin_daemon,ssrf_proxy,sandbox,nginx,api

systemctl daemon-reload
systemctl restart docker

✔️ Expected Behavior

No response

Actual Behavior

Image

{
    "code": "invalid_param",
    "message": "Expecting value: line 1 column 1 (char 0)",
    "status": 400
}
Originally created by @cethink on GitHub (Jun 7, 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 v1.4.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I tried to fix it, but it didn't work https://github.com/langgenius/dify/issues/17827 https://github.com/langgenius/dify/issues/14608 ``` vi /etc/systemd/system/docker.service.d/proxy.conf [Service] Environment=HTTP_PROXY=http://127.0.0.1:7890 Environment=HTTPS_PROXY=http://127.0.0.1:7890 Environment=NO_PROXY=localhost,127.0.0.1,alma.cethink.top,weaviate,qdrand,db,redis,web,worker,plugin_daemon,ssrf_proxy,sandbox,nginx,api systemctl daemon-reload systemctl restart docker ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/8260887e-90fc-4a9c-b0c2-4e9a110cbc7f) ``` { "code": "invalid_param", "message": "Expecting value: line 1 column 1 (char 0)", "status": 400 } ```
yindo added the 🐞 bug label 2026-02-21 19:17:25 -05:00
yindo closed this issue 2026-02-21 19:17:25 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 7, 2025):

Hi @cethink! I'm Dosu and I’m helping the dify team.

The error "Expecting value: line 1 column 1 (char 0)" usually means Dify is trying to parse an empty or invalid JSON response, which often happens when internal services can't talk to each other due to proxy misconfiguration. This is a known issue in self-hosted Docker setups with HTTP proxies.

To resolve this, make sure your NO_PROXY environment variable includes all internal service names. Based on previous issues, the recommended value is:

NO_PROXY=localhost,127.0.0.1,weaviate,qdrand,db,redis,web,worker,plugin_daemon

You should set this in your Docker config (e.g., ~/.docker/config.json) or in your Docker service environment, not just in the systemd proxy file. Double-check that there are no typos or extra spaces, and that all relevant internal service names are included. Restart Docker and your Dify containers after making changes.

If you already have these values set and the problem persists, check that your HTTPS_PROXY and ALL_PROXY settings are also correct and not interfering with internal traffic. This advice is based on solutions provided for the same error in issue #17827 and issue #14608.

If you still see the error after confirming your proxy settings, try running Dify without any proxy to see if the error disappears. This can help confirm if the proxy is the root cause.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 7, 2025): <!-- Greeting --> Hi @cethink! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The error "Expecting value: line 1 column 1 (char 0)" usually means Dify is trying to parse an empty or invalid JSON response, which often happens when internal services can't talk to each other due to proxy misconfiguration. This is a known issue in self-hosted Docker setups with HTTP proxies. To resolve this, make sure your NO_PROXY environment variable includes all internal service names. Based on previous issues, the recommended value is: ``` NO_PROXY=localhost,127.0.0.1,weaviate,qdrand,db,redis,web,worker,plugin_daemon ``` You should set this in your Docker config (e.g., `~/.docker/config.json`) or in your Docker service environment, not just in the systemd proxy file. Double-check that there are no typos or extra spaces, and that all relevant internal service names are included. Restart Docker and your Dify containers after making changes. If you already have these values set and the problem persists, check that your HTTPS_PROXY and ALL_PROXY settings are also correct and not interfering with internal traffic. This advice is based on solutions provided for the same error in [issue #17827](https://github.com/langgenius/dify/issues/17827) and [issue #14608](https://github.com/langgenius/dify/issues/14608). If you still see the error after confirming your proxy settings, try running Dify without any proxy to see if the error disappears. This can help confirm if the proxy is the root cause. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/efb423e1-7e8e-483d-89ec-221882196817?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20778)
Author
Owner

@cethink commented on GitHub (Jun 12, 2025):

update to v1.4.2 seems fixed

@cethink commented on GitHub (Jun 12, 2025): update to v1.4.2 seems fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14478