Expecting value: line 1 column 1 (char 0) in v1.4.1
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [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
{
"code": "invalid_param",
"message": "Expecting value: line 1 column 1 (char 0)",
"status": 400
}
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
update to v1.4.2 seems fixed