Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] #6772

Closed
zhufeizzz opened this issue Mar 7, 2025 · 10 comments
Closed

[Bug] #6772

zhufeizzz opened this issue Mar 7, 2025 · 10 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@zhufeizzz
Copy link

📦 部署环境

Docker

📦 部署模式

客户端 Pglite 模式(lobe-chat-pglite 镜像)

📌 软件版本

v1.68.10

💻 系统环境

Windows

🌐 浏览器

Edge

🐛 问题描述

最新版本镜像升级完页面报这个错误
Image

我是Linux服务器是使用Proxy上网的,之前已经按照这个指引解决了Proxy问题,结果Docker镜像后升级后又不行了
#6524

后台错误日志如下,这里报错日志URL也没打出来,都不知道啥问题

[rewrite] /discover -> http://127.0.0.1:3210/zh-CN__0__light/discover
[AgentIndexFetchError] failed to fetch agent index, error detail:
SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
    at JSON.parse (<anonymous>)
    at async x.getAgentIndex (.next/server/chunks/19528.js:1:2053)
    at async $.getAssistantList (.next/server/chunks/19528.js:1:4508)
    at async y (.next/server/app/[variants]/(main)/discover/(list)/(home)/page.js:1:4026)
 ? SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
    at JSON.parse (<anonymous>)
    at async x.getAgentIndex (.next/server/chunks/19528.js:1:2053)
    at async $.getAssistantList (.next/server/chunks/19528.js:1:4508)
    at async y (.next/server/app/[variants]/(main)/discover/(list)/(home)/page.js:1:4026) {
  digest: '3967915763'
}
[rewrite] /files -> http://127.0.0.1:3210/zh-CN__0__light/files

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@zhufeizzz zhufeizzz added the 🐛 Bug Something isn't working | 缺陷 label Mar 7, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 7, 2025
@lobehubbot
Copy link
Member

👀 @zhufeizzz

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Mar 7, 2025

To address the issue with the Lobe Chat Docker image (version v1.68.10) failing to connect through an HTTP Proxy, resulting in a JSON parsing error, ensure that the PROXY_URL environment variable is correctly set. Use the format PROXY_URL=http://your-proxy-host:port for an HTTP proxy. For example:

PROXY_URL=http://127.0.0.1:7890

If using a SOCKS5 proxy, use:

PROXY_URL=socks5://127.0.0.1:7890

This should be added to your environment file or included in the Docker run command. Additionally, consider updating your Lobe Chat installation to the latest version, as proxy connection errors have been addressed in recent updates [1][2].

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

@arvinxx
Copy link
Contributor

arvinxx commented Mar 8, 2025

网络问题,配置下代理吧

@arvinxx arvinxx closed this as completed Mar 8, 2025
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Mar 8, 2025
@lobehubbot
Copy link
Member

@zhufeizzz

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Network problems, configure the proxy

@zhufeizzz
Copy link
Author

@arvinxx PROXY_URL代理已经配置过了,并且上周Lobe功能完全正常,是升级最新版本Lobe镜像后突然不可用。

这个代理也检查过,功能完全正常。

然后现在日志里请求报文和URL都被隐藏了,导致问题也没法定位,看不出是代码问题还是代理问题。

PROXY_URL=http://7.227.24.108:3128
NODE_TLS_REJECT_UNAUTHORIZED=0
🌐 DNS Server: [ '10.10.10.10', '10.129.54.128', '10.98.48.39' ]
-------------------------------------
✅ ProxyChains: All outgoing traffic routed via http://7.227.24.108:3128.
-------------------------------------
   ▲ Next.js 15.2.1
   - Local:        http://localhost:3210
   - Network:      http://0.0.0.0:3210

 ✓ Starting...
(node:17) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
 ✓ Ready in 120ms
(Use `node --trace-warnings ...` to show where the warning was created)

@arvinxx
Copy link
Contributor

arvinxx commented Mar 10, 2025

@zhufeizzz #6690 看下是否和这个有关?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@zhufeizz #6690 See if it is related to this?

@zhufeizzz
Copy link
Author

@arvinxx 果然是这个问题,加上ENABLE_PROXY_DNS=1就好了,估计是改动影响了默认行为

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@arvinxx It's true that this problem is, just add ENABLE_PROXY_DNS=1. It is estimated that the changes have affected the default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Done
Development

No branches or pull requests

3 participants