-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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] 无法发送图片(100%报错) #6755
Comments
👀 @cyo57 Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
@cyo57 你好! 我是Dosu,一个可以帮助你解决问题、回答疑问并成为贡献者的机器人。我将在等待人类维护者的期间为你提供帮助。 The errors you're encountering when sending images in the lobe-chat framework seem to be related to MIME type issues and base64 image conversion problems. Here are some insights and potential solutions:
For the Gemini model, there have been known issues with base64 image conversion failures in previous versions of Lobe Chat, which could result in errors like 'Failed to fetch' [1]. Ensure your setup is updated to the latest version, as some issues might have been resolved in newer releases. If these steps do not resolve the issue, you may need to look into the specific configurations for each AI provider to ensure compatibility with their image processing requirements. 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 |
有配置S3兼容的OSS或者自建过MinIO吗? |
Have you configured S3-compatible OSS or built MinIO by yourself? |
使用官方一键部署脚本,是MinIO,已更新issue |
Using the official one-click deployment script, it is MinIO, updated issue |
进minio后台看看存储桶是公开的还是私有的 |
Enter the minio background to see if the bucket is public or private |
看起来确实是Minio出了问题,我这里无法访问Minio的webui。 .env MINIO_PORT=9000
APP_URL=https://lobe.XXX.top
AUTH_URL=https://lobe.XXX.top/api/auth
# MinIO S3 配置
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=XXXXXX
# 在下方配置 minio 中添加的桶
S3_PUBLIC_DOMAIN=https://minio.XXX.top
S3_ENDPOINT=https://minio.XXX.top
MINIO_LOBE_BUCKET=lobe docker-compose.yaml name: lobe-chat-database
services:
network-service:
image: alpine
container_name: lobe-network
ports:
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- '9001:9001' # MinIO Console
- '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
- '${LOBE_PORT}:3210' # LobeChat
command: tail -f /dev/null
networks:
- lobe-network
minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
volumes:
- './s3_data:/etc/minio/data'
environment:
- 'MINIO_API_CORS_ALLOW_ORIGIN=*'
env_file:
- .env
restart: always
entrypoint: >
/bin/sh -c "
minio server /etc/minio/data --address ':${MINIO_PORT}' --console-address ':9001' &
MINIO_PID=\$!
while ! curl -s http://localhost:${MINIO_PORT}/minio/health/live; do
echo 'Waiting for MinIO to start...'
sleep 1
done
sleep 5
mc alias set myminio http://localhost:${MINIO_PORT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}
echo 'Creating bucket ${MINIO_LOBE_BUCKET}'
mc mb myminio/${MINIO_LOBE_BUCKET}
wait \$MINIO_PID
"
environment:
- 'NEXT_AUTH_SSO_PROVIDERS=casdoor'
- 'KEY_VAULTS_SECRET=XXXXXX'
- 'NEXT_AUTH_SECRET=XXXXXX'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
- 'S3_ENABLE_PATH_STYLE=1'
- 'S3_ACCESS_KEY=${MINIO_ROOT_USER}'
- 'S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}'
- 'S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
env_file:
- .env
restart: always
volumes:
data:
driver: local
s3_data:
driver: local
networks:
lobe-network:
driver: bridge 重新部署: root@hw-sh1:~/data/lobechat-db# docker-compose down; docker-compose up -d
WARN[0000] The "MINIO_PID" variable is not set. Defaulting to a blank string.
[+] Running 6/6
✔ Container lobe-chat Removed 10.2s
✔ Container lobe-casdoor Removed 0.1s
✔ Container lobe-minio Removed 10.1s
✔ Container lobe-postgres Removed 0.2s
✔ Container lobe-network Removed 10.4s
✔ Network lobe-chat-database_lobe-network Removed 0.2s
WARN[0000] The "MINIO_PID" variable is not set. Defaulting to a blank string.
[+] Running 6/6
✔ Network lobe-chat-database_lobe-network Created 0.1s
✔ Container lobe-network Started 0.1s
✔ Container lobe-postgres Healthy 0.1s
✔ Container lobe-minio Started 0.0s
✔ Container lobe-casdoor Started 0.0s
✔ Container lobe-chat Started 0.0s cat /etc/nginx/sites-enabled/lobe.XXX.top server {
listen 80;
listen [::]:80;
server_name lobe.XXX.top;
return 301 https://$host$request_uri;
}
server {
...
server_name lobe.XXX.top;
...
}
server {
...
server_name auth.XXX.top;
...
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name minio.XXX.top;
ssl_certificate /etc/nginx/ssl/*.XXX.top_XXX.top_2048/fullchain.cer;
ssl_certificate_key /etc/nginx/ssl/*.XXX.top_XXX.top_2048/private.key;
location / {
proxy_pass http://127.0.0.1:9000; # 反向代理到本地9000端口
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# 设置允许的最大请求体大小
client_max_body_size 256M;
}
}
root@hw-sh1:~/data/lobechat-db# 通过curl访问Minio root@hw-sh1:~/data/lobechat-db# curl https://minio.XXX.top -i
HTTP/1.1 403 Forbidden
Server: nginx/1.18.0 (Ubuntu)
Date: Fri, 07 Mar 2025 13:38:56 GMT
Content-Type: application/xml
Content-Length: 254
Connection: keep-alive
Accept-Ranges: bytes
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
X-Amz-Request-Id: 182A88E80352F506
X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 293
X-Ratelimit-Remaining: 293
X-Xss-Protection: 1; mode=block
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied.</Message><Resource>/</Resource><RequestId>182A88E80352F506</RequestId><HostId>dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8</HostId></Error>root@hw-sh1:~/data/lobechat-db# 如果通过浏览器访问Minio,URL会自动跳转到https://minio.XXX.top:9001/,无法正常打开,提示ERR_SSL_PROTOCOL_ERROR: |
It seems that something is wrong with Minio, and I can't access Minio's webui here. .env MINIO_PORT=9000
APP_URL=https://lobe.XXX.top
AUTH_URL=https://lobe.XXX.top/api/auth
#MinIO S3 Configuration
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=XXXXXX
# Configure the bucket added in minio below
S3_PUBLIC_DOMAIN=https://minio.XXX.top
S3_ENDPOINT=https://minio.XXX.top
MINIO_LOBE_BUCKET=lobe docker-compose.yaml name: lobe-chat-database
services:
network-service:
image: alpine
container_name: lobe-network
Ports:
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- '9001:9001' # MinIO Console
- '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
- '${LOBE_PORT}:3210' # LobeChat
command: tail -f /dev/null
networks:
- lobe-network
minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
Volumes:
- './s3_data:/etc/minio/data'
environment:
- 'MINIO_API_CORS_ALLOW_ORIGIN=*'
env_file:
- .env
restart: always
entrypoint: >
/bin/sh -c "
minio server /etc/minio/data --address ':${MINIO_PORT}' --console-address ':9001' &
MINIO_PID=\$!
while ! curl -s http://localhost:${MINIO_PORT}/minio/health/live; do
echo 'Waiting for MinIO to start...'
sleep 1
done
sleep 5
mc alias set myminio http://localhost:${MINIO_PORT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}
echo 'Creating bucket ${MINIO_LOBE_BUCKET}'
mc mb myminio/${MINIO_LOBE_BUCKET}
wait \$MINIO_PID
"
environment:
- 'NEXT_AUTH_SSO_PROVIDERS=casdoor'
- 'KEY_VAULTS_SECRET=XXXXX'
- 'NEXT_AUTH_SECRET=XXXXXX'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
- 'S3_ENABLE_PATH_STYLE=1'
- 'S3_ACCESS_KEY=${MINIO_ROOT_USER}'
- 'S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}'
- 'S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
env_file:
- .env
restart: always
Volumes:
data:
driver: local
s3_data:
driver: local
networks:
lobe-network:
driver: bridge Redeployment: root@hw-sh1:~/data/lobechat-db# docker-compose down; docker-compose up -d
WARN[0000] The "MINIO_PID" variable is not set. Defaulting to a blank string.
[+] Running 6/6
✔ Container lobe-chat Removed 10.2s
✔ Container lobe-casdoor Removed 0.1s
✔ Container lobe-minio Removed 10.1s
✔ Container lobe-postgres Removed 0.2s
✔ Container lobe-network Removed 10.4s
✔ Network lobe-chat-database_lobe-network Removed 0.2s
WARN[0000] The "MINIO_PID" variable is not set. Defaulting to a blank string.
[+] Running 6/6
✔ Network lobe-chat-database_lobe-network Created 0.1s
✔ Container lobe-network Started 0.1s
✔ Container lobe-postgres Healthy 0.1s
✔ Container lobe-minio Started 0.0s
✔ Container lobe-casdoor Started 0.0s
✔ Container lobe-chat Started 0.0s cat /etc/nginx/sites-enabled/lobe.XXX.top server {
listen 80;
listen [::]:80;
server_name lobe.XXX.top;
return 301 https://$host$request_uri;
}
server {
...
server_name lobe.XXX.top;
...
}
server {
...
server_name auth.XXX.top;
...
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name minio.XXX.top;
ssl_certificate /etc/nginx/ssl/*.XXX.top_XXX.top_2048/fullchain.cer;
ssl_certificate_key /etc/nginx/ssl/*.XXX.top_XXX.top_2048/private.key;
location / {
proxy_pass http://127.0.0.1:9000; # Reverse proxy to local 9000 port
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Set the maximum request size allowed
client_max_body_size 256M;
}
}
root@hw-sh1:~/data/lobechat-db# Access to Minio via curl root@hw-sh1:~/data/lobechat-db# curl https://minio.cloudyshore.top -i
HTTP/1.1 403 Forbidden
Server: nginx/1.18.0 (Ubuntu)
Date: Fri, 07 Mar 2025 13:38:56 GMT
Content-Type: application/xml
Content-Length: 254
Connection: keep-alive
Accept-Ranges: bytes
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
X-Amz-Request-Id: 182A88E80352F506
X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 293
X-Ratelimit-Remaining: 293
X-Xss-Protection: 1; mode=block
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied.</Message><Resource>/</Resource><RequestId>182A88E80352F506</RequestId><HostId>dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8</HostId></Error>root@hw-sh1:~/data/lobechat-db# If you access Minio through a browser, the URL will automatically jump to https://minio.XXX.top:9001/ and cannot be opened normally. It prompts ERR_SSL_PROTOCOL_ERROR: |
✅ @cyo57 This issue is closed, If you have any questions, you can comment and reply. |
你好,请问解决了吗 |
Hello, has it been resolved? |
我是Linux新手,不知道怎么修复。我这个issue显然不是LobeChat的BUG,所以我关闭了。 |
I'm a newbie in Linux and don't know how to fix it. My issue is obviously not a bug of LobeChat, so I closed it. |
📦 Platform
Self hosting Docker
📦 Deploymenet mode
server db(lobe-chat-database image)
📌 Version
lobehub/lobe-chat-database:1.68.7
💻 Operating System
Windows
🌐 Browser
Chrome
🐛 Bug Description
无法向任何发送图片,尝试过的有
在聊天框内粘贴图片:
按下发送键后无法预览图片并且会报错,无法对话:

📷 Recurrence Steps
发送带图片的消息即报错!!
🚦 Expected Behavior
No response
📝 Additional Information
使用官方一键部署脚本,Docker-compose.yaml
The text was updated successfully, but these errors were encountered: