lobehub/lobe-chat





The issue has been closed
[Bug] DALL-E doesn't render images - UntrustedHost: Host must be trusted. #1280
sebastiaanluca posted onGitHub
💻 Operating System
Ubuntu
📦 Environment
Docker
🌐 Browser
Safari
🐛 Bug Description
When asking DALL-E 3 to generate one or more images for a prompt, it shows the placeholders, loading indicators, and the images' alt text, but fails to render them.
In the Docker logs, multiple of these errors pops up:
lobe-chat | [31m[auth][error][0m UntrustedHost: Host must be trusted. URL was: https://chat.redactedurl.com/api/auth/session .Read more at https://errors.authjs.dev#untrustedhost
lobe-chat | at assertConfig (/app/.next/server/src/middleware.js:2360:16)
lobe-chat | at Auth (/app/.next/server/src/middleware.js:13102:29)
lobe-chat | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
lobe-chat | [31m[auth][error][0m UntrustedHost: Host must be trusted. URL was: https://chat.redactedurl.com/api/auth/session .Read more at https://errors.authjs.dev#untrustedhost
lobe-chat | at assertConfig (/app/.next/server/src/middleware.js:2360:16)
lobe-chat | at Auth (/app/.next/server/src/middleware.js:13102:29)
lobe-chat | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
lobe-chat | [31m[auth][error][0m UntrustedHost: Host must be trusted. URL was: https://chat.redactedurl.com/api/auth/session .Read more at https://errors.authjs.dev#untrustedhost
lobe-chat | at assertConfig (/app/.next/server/src/middleware.js:2360:16)
lobe-chat | at Auth (/app/.next/server/src/middleware.js:13102:29)
lobe-chat | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
lobe-chat | [31m[auth][error][0m UntrustedHost: Host must be trusted. URL was: https://0.0.0.0:3210/api/auth/session?nextauth=session .Read more at https://errors.authjs.dev#untrustedhost
lobe-chat | at /app/.next/server/app/api/auth/[...nextauth]/route.js:357:46489
lobe-chat | at nu (/app/.next/server/app/api/auth/[...nextauth]/route.js:357:49162)
lobe-chat | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
lobe-chat | at async /app/.next/server/app/api/auth/[...nextauth]/route.js:367:81352
lobe-chat | at async C.execute (/app/.next/server/app/api/auth/[...nextauth]/route.js:367:78245)
lobe-chat | at async C.handle (/app/.next/server/app/api/auth/[...nextauth]/route.js:367:82619)
lobe-chat | at async ev.handler (/app/.next/server/app/api/auth/[...nextauth]/route.js:368:31644)
lobe-chat | at async D (/app/.next/server/app/api/auth/[...nextauth]/route.js:368:3661)
lobe-chat | at async runWithTaggedErrors (/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.23.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/web/sandbox/sandbox.js:99:24)
lobe-chat | at async NextNodeServer.runEdgeFunction (/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.23.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js:1177:24)
🚦 Expected Behavior
1 or 4 rendered images returned from the OpenAI API.
📷 Recurrence Steps
- Follow the guidelines to set up LobeChat on a Ubuntu 22.04 server using Docker compose
- Set up an nginx reverse proxy with basic auth on a subdomain
- Open the URL in Safari (as a standalone app added to the dock)
- Start a new chat
- Enable DALL-E 3
- Ask it to generate an image for something
📝 Additional Information
Docker compose config:
version: '3.8'
services:
lobe-chat:
image: lobehub/lobe-chat
container_name: lobe-chat
restart: always
ports:
- '3210:3210'
environment:
OPENAI_API_KEY: redacted
CUSTOM_MODELS: gpt-4-turbo-preview,gpt-4-vision-preview,gpt-3.5-turbo,gpt-3.5-turbo-16k