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] /webapi/assistant/store?locale=zh-CN访问异常 #6994

Open
xy3xy3 opened this issue Mar 16, 2025 · 3 comments
Open

[Bug] /webapi/assistant/store?locale=zh-CN访问异常 #6994

xy3xy3 opened this issue Mar 16, 2025 · 3 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@xy3xy3
Copy link

xy3xy3 commented Mar 16, 2025

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

latest

💻 系统环境

Other Linux

🌐 浏览器

Edge

🐛 问题描述

docker日志如下

[AgentIndexFetchError] failed to fetch agent index, error detail:
Error: fetch failed
at context.fetch (/app/node_modules/.pnpm/next@15.2.2_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.51.0_react-dom@19_odxegghfphz6vzpgdynkiuauy4/node_modules/next/dist/server/web/sandbox/context.js:323:60)
at /app/.next/server/edge-chunks/551.js:12:49271
at G (/app/.next/server/edge-chunks/551.js:12:54596)
at /app/.next/server/edge-chunks/551.js:12:57308
at /app/.next/server/edge-chunks/551.js:12:60364
at e.with (/app/.next/server/edge-chunks/551.js:12:35494)
at e.with (/app/.next/server/edge-chunks/551.js:12:36562)
at e.startActiveSpan (/app/.next/server/edge-chunks/551.js:12:38683)
at e.startActiveSpan (/app/.next/server/edge-chunks/551.js:12:38981)
at /app/.next/server/edge-chunks/551.js:12:59886 {

}

浏览器日志如下
failed to fetch agent market index
Image

📷 复现步骤

国内主机安装的,直接打开主页不显示助手

Image

🚦 期望结果

No response

📝 补充信息

.env配置了nginx代理后的域名

# ===================
# ===== 预设配置 =====
# ===================
# 如没有特殊需要不用更改
LOBE_PORT=3210
CASDOOR_PORT=8000
MINIO_PORT=9000
APP_URL=https://lobe.dorm.skyw.cc
AUTH_URL=https://lobe.dorm.skyw.cc/api/auth

# Postgres 相关,也即 DB 必须的环境变量
LOBE_DB_NAME=lobechat
POSTGRES_PASSWORD=***

AUTH_CASDOOR_ISSUER=https://auth.dorm.skyw.cc
# Casdoor secret
AUTH_CASDOOR_ID=***
AUTH_CASDOOR_SECRET=***

# MinIO S3 配置
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=***

# 在下方配置 minio 中添加的桶
S3_PUBLIC_DOMAIN=https://minio.dorm.skyw.cc
S3_ENDPOINT=https://minio.dorm.skyw.cc
MINIO_LOBE_BUCKET=lobe

# 为 casdoor 配置
origin=https://auth.dorm.skyw.cc
@xy3xy3 xy3xy3 added the 🐛 Bug Something isn't working | 缺陷 label Mar 16, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 16, 2025
@lobehubbot
Copy link
Member

👀 @xy3xy3

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 16, 2025

I found a similar closed issue that might be relevant to your problem: [Bug] 使用docker部署后无法访问助手市场和插件商店. This issue was resolved by a pull request that fixed the support for PROXY_URL in Docker with proxychains-ng [1].

In your case, the 500 Internal Server Error when accessing /webapi/assistant/store?locale=zh-CN could be related to a similar proxy configuration issue. Ensure that your Docker deployment is correctly configured to use a proxy if needed. You can set the PROXY_URL environment variable in your Docker setup to route requests through a proxy server. For example, for an HTTP proxy, use:

PROXY_URL=http://your-proxy-host:port

And for a SOCKS5 proxy:

PROXY_URL=socks5://127.0.0.1:7890

Additionally, if DNS queries need to be routed through the proxy, set ENABLE_PROXY_DNS=1 [2][3]. This might help resolve the issue with fetching the agent market index.

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

Copy link

dosubot bot commented Mar 16, 2025

I found a similar closed issue related to accessing the assistant market and plugin store after deploying with Docker. The issue was resolved by supporting the PROXY_URL in Docker with proxychains-ng [1].

For the 'failed to fetch agent index' error, common causes include network issues, invalid URLs, server errors, edge configuration issues, and unhandled exceptions. If you're using a proxy, ensure it's correctly configured by setting the PROXY_URL environment variable in your Docker configuration. For example:

  • For HTTP proxy: PROXY_URL=http://your-proxy-host:port
  • For SOCKS5 proxy: PROXY_URL=socks5://your-proxy-host:port

Make sure your .env file and Docker configuration reflect these settings to resolve potential JSON parsing errors due to incorrect proxy configuration [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

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: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants