lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.72k stars 9.27k forks source link

[Bug] DALL-E doesn't render images - UntrustedHost: Host must be trusted. #1280

Closed sebastiaanluca closed 7 months ago

sebastiaanluca commented 7 months ago

💻 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.

Screenshot 2024-02-10 at 01 51 31

In the Docker logs, multiple of these errors pops up:

lobe-chat  | [auth][error] 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  | [auth][error] 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  | [auth][error] 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  | [auth][error] 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

  1. Follow the guidelines to set up LobeChat on a Ubuntu 22.04 server using Docker compose
  2. Set up an nginx reverse proxy with basic auth on a subdomain
  3. Open the URL in Safari (as a standalone app added to the dock)
  4. Start a new chat
  5. Enable DALL-E 3
  6. 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
lobehubbot commented 7 months ago

👀 @sebastiaanluca

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot commented 7 months ago

✅ @sebastiaanluca

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

lobehubbot commented 7 months ago

:tada: This issue has been resolved in version 0.126.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

sebastiaanluca commented 7 months ago

Many thanks, @arvinxx!

lobehubbot commented 7 months ago

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


Many thanks, @arvinxx!