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
44.38k stars 9.95k forks source link

[Bug] 上传文件分块失败 #3545

Closed jedy closed 2 months ago

jedy commented 2 months ago

📦 部署环境

Docker

📌 软件版本

1.12.2

💻 系统环境

Other Linux

🌐 浏览器

Chrome

🐛 问题描述

上传文件之后,服务器日志显示如下,页面一直显示分块中 image image 如果这时点文件右上角的图标删除文件,会一直弹框 image

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 2 months ago

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


📦 Deployment environment

Docker

📌 Software version

1.12.2

💻 System environment

Other Linux

🌐 Browser

Chrome

🐛 Problem description

After uploading the file, the server log displays as follows, and the page always displays in chunks. image image If you click the icon in the upper right corner of the file to delete the file, a box will keep popping up. image

📷 Steps to reproduce

No response

🚦 Expected results

No response

📝 Supplementary information

No response

lobehubbot commented 2 months ago

👀 @jedy

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

jedy commented 2 months ago

没问题了。部署的时候加了一层内部认证,导致server的rpc调用失败。

lobehubbot commented 2 months ago

✅ @jedy

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

lobehubbot commented 2 months ago

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


No problem anymore. A layer of internal authentication was added during deployment, causing the server's rpc call to fail.

370738206 commented 2 months ago

@jedy 请问可以详细说明一下解决方法吗?我也遇到了这个问题

lobehubbot commented 2 months ago

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


@jedy Can you please explain the solution in detail? I also encountered this problem

ccoc-cc commented 2 months ago

@jedy 您好, 能分享一下解决办法吗? 我遇到了分块失败的问题, 不知道是不是同一个原因https://github.com/lobehub/lobe-chat/discussions/3560

ccoc-cc commented 2 months ago

image 似乎是一样的原因, 请教大佬如何解决

jedy commented 2 months ago

@ji-jinlong server的程序上需要访问APP_URL,如果这个url配置了其他认证,要直接通过server的请求

lobehubbot commented 2 months ago

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


@ji-jinlong The server program needs to access APP_URL. If this URL is configured with other authentication, the request must be made directly through the server.

ccoc-cc commented 2 months ago

@ji-jinlong server的程序上需要访问APP_URL,如果这个url配置了其他认证,要直接通过server的请求

请恕我愚蠢, 我本身只能算半个程序猿, 且对这些都不太了解, 只是按照教程部署了vercel数据库,vercel服务端,clerk的认证和github的授权登录,以及CF的R2桶. 实在不了解您说的这个认证

lobehubbot commented 2 months ago

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


@ji-jinlong server program needs to access APP_URL. If this URL is configured with other authentication, the request must be made directly through the server.

Please forgive my stupidity. I am only half a programmer and don't know much about these things. I just followed the tutorial to deploy the vercel database, vercel server, clerk authentication, github authorized login, and CF's R2 bucket. I really don’t understand the certification you are talking about.

jedy commented 2 months ago

你的网站是对外公开的吗,直接访问的时候需不需要先登录才能看到lobe的页面?如果是无法直接访问的,就需要配置让server的ip能够不登录直接访问。

lobehubbot commented 2 months ago

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


Is your website public to the public? Do you need to log in first to see the Lobe page when accessing it directly? If it cannot be accessed directly, you need to configure the server IP to be able to access it directly without logging in.

lobehubbot commented 2 months ago

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


Is your website public to the public? Do you need to log in first to see the Lobe page when accessing it directly? If it cannot be accessed directly, you need to configure the server IP to be able to access it directly without logging in.

My website will be open to the public for my friends to visit. The clerk login is configured. You can see the lobby page without logging in, but it cannot be used. You need to log in to use it. Click on the file or avatar to jump back to the clerk login interface. If you ask directly without logging in, it will display like this: image This is my website address, it may help you answer my questions: t.ccoc.cc

jedy commented 2 months ago

你配置的APP_URL是什么?

lobehubbot commented 2 months ago

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


What is the APP_URL you configured?

lobehubbot commented 2 months ago

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


What is the APP_URL you configured?

I'm not sure which step of the variable APP_URL you are talking about refers to. In my configuration process, in addition to the lobe main domain name https://t.ccoc.cc and https://s3-for-lobechat.ccoc.cc, there are only DNS configured during clerk process

jedy commented 2 months ago

https://github.com/lobehub/lobe-chat/issues/3527

这里写了需要配置APP_URL

lobehubbot commented 2 months ago

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


https://github.com/lobehub/lobe-chat/issues/3527

It is written here that APP_URL needs to be configured

ccoc-cc commented 2 months ago

3527

这里写了需要配置APP_URL

感谢领细心且耐心的指导, 因为教程中没有这个参数所以我没有添加. 刚加上了, 现在成功分块了. 只是,,,,现在向量化失败

猜测可能是我用的转发不支持, 不过这个我在MaxKB中是成功了的, 不知道二者有啥区别.

Uncaught (in promise) TRPCClientError
    at s.from (73920-2cd3d6dba97afb1d.js:1:878)
    at 73920-2cd3d6dba97afb1d.js:1:7395
i [TRPCError]
    at a (/var/task/.next/server/chunks/90525.js:1:1011)
    ... 6 lines matching cause stack trace ...
    at async r (/var/task/.next/server/chunks/90525.js:1:6057)
    at async /var/task/.next/server/chunks/52408.js:1:7252
    at async Promise.all (index 0) {
  code: 'INTERNAL_SERVER_ERROR',
  [cause]: o [Error]
      at /var/task/.next/server/chunks/90525.js:1:1322
      at new i (/var/task/.next/server/chunks/90525.js:1:1364)
      at a (/var/task/.next/server/chunks/90525.js:1:1011)
      at t (/var/task/.next/server/chunks/90525.js:1:6033)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async r (/var/task/.next/server/chunks/90525.js:1:6057) {
    endpoint: 'https://api.chatanywhere.***.cn/',
    error: {
      headers: [Object],
      stack: 'Error: 404 <html>\n' +
        '<head><title>404 Not Found</title></head>\n' +
        '<body>\n' +
        '<center><h1>404 Not Found</h1></center>\n' +
        '<hr><center>nginx</center>\n' +
        '</body>\n' +
        '</html>\n' +
        '    at rt.generate (/var/task/.next/server/chunks/96903.js:219:67341)\n' +
        '    at nf.makeStatusError (/var/task/.next/server/chunks/96903.js:219:59038)\n' +
        '    at nf.makeRequest (/var/task/.next/server/chunks/96903.js:219:59961)\n' +
        '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
        '    at async Object.embeddings (/var/task/.next/server/chunks/43054.js:9:3533)\n' +
        '    at async /var/task/.next/server/chunks/1701.js:5:25922\n' +
        '    at async u.middlewares (/var/task/.next/server/chunks/90525.js:1:5409)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)',
      status: 404
    },
    errorType: 'ProviderBizError',
    provider: 'openai'
  }
}
RidiculousBuffal commented 2 months ago

3527

这里写了需要配置APP_URL

感谢领细心且耐心的指导, 因为教程中没有这个参数所以我没有添加. 刚加上了, 现在成功分块了. 只是,,,,现在向量化失败

猜测可能是我用的转发不支持, 不过这个我在MaxKB中是成功了的, 不知道二者有啥区别.

Uncaught (in promise) TRPCClientError
    at s.from (73920-2cd3d6dba97afb1d.js:1:878)
    at 73920-2cd3d6dba97afb1d.js:1:7395
i [TRPCError]
    at a (/var/task/.next/server/chunks/90525.js:1:1011)
    ... 6 lines matching cause stack trace ...
    at async r (/var/task/.next/server/chunks/90525.js:1:6057)
    at async /var/task/.next/server/chunks/52408.js:1:7252
    at async Promise.all (index 0) {
  code: 'INTERNAL_SERVER_ERROR',
  [cause]: o [Error]
      at /var/task/.next/server/chunks/90525.js:1:1322
      at new i (/var/task/.next/server/chunks/90525.js:1:1364)
      at a (/var/task/.next/server/chunks/90525.js:1:1011)
      at t (/var/task/.next/server/chunks/90525.js:1:6033)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async r (/var/task/.next/server/chunks/90525.js:1:6057) {
    endpoint: 'https://api.chatanywhere.***.cn/',
    error: {
      headers: [Object],
      stack: 'Error: 404 <html>\n' +
        '<head><title>404 Not Found</title></head>\n' +
        '<body>\n' +
        '<center><h1>404 Not Found</h1></center>\n' +
        '<hr><center>nginx</center>\n' +
        '</body>\n' +
        '</html>\n' +
        '    at rt.generate (/var/task/.next/server/chunks/96903.js:219:67341)\n' +
        '    at nf.makeStatusError (/var/task/.next/server/chunks/96903.js:219:59038)\n' +
        '    at nf.makeRequest (/var/task/.next/server/chunks/96903.js:219:59961)\n' +
        '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
        '    at async Object.embeddings (/var/task/.next/server/chunks/43054.js:9:3533)\n' +
        '    at async /var/task/.next/server/chunks/1701.js:5:25922\n' +
        '    at async u.middlewares (/var/task/.next/server/chunks/90525.js:1:5409)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)',
      status: 404
    },
    errorType: 'ProviderBizError',
    provider: 'openai'
  }
}

maxKB如果不单独配置的话使用的应该是本地的向量化模型shibing624_text2vec-base-chinese image

arvinxx commented 2 months ago

3527

这里写了需要配置APP_URL

感谢领细心且耐心的指导, 因为教程中没有这个参数所以我没有添加. 刚加上了, 现在成功分块了. 只是,,,,现在向量化失败

猜测可能是我用的转发不支持, 不过这个我在MaxKB中是成功了的, 不知道二者有啥区别.

Uncaught (in promise) TRPCClientError
    at s.from (73920-2cd3d6dba97afb1d.js:1:878)
    at 73920-2cd3d6dba97afb1d.js:1:7395
i [TRPCError]
    at a (/var/task/.next/server/chunks/90525.js:1:1011)
    ... 6 lines matching cause stack trace ...
    at async r (/var/task/.next/server/chunks/90525.js:1:6057)
    at async /var/task/.next/server/chunks/52408.js:1:7252
    at async Promise.all (index 0) {
  code: 'INTERNAL_SERVER_ERROR',
  [cause]: o [Error]
      at /var/task/.next/server/chunks/90525.js:1:1322
      at new i (/var/task/.next/server/chunks/90525.js:1:1364)
      at a (/var/task/.next/server/chunks/90525.js:1:1011)
      at t (/var/task/.next/server/chunks/90525.js:1:6033)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async r (/var/task/.next/server/chunks/90525.js:1:6057) {
    endpoint: 'https://api.chatanywhere.***.cn/',
    error: {
      headers: [Object],
      stack: 'Error: 404 <html>\n' +
        '<head><title>404 Not Found</title></head>\n' +
        '<body>\n' +
        '<center><h1>404 Not Found</h1></center>\n' +
        '<hr><center>nginx</center>\n' +
        '</body>\n' +
        '</html>\n' +
        '    at rt.generate (/var/task/.next/server/chunks/96903.js:219:67341)\n' +
        '    at nf.makeStatusError (/var/task/.next/server/chunks/96903.js:219:59038)\n' +
        '    at nf.makeRequest (/var/task/.next/server/chunks/96903.js:219:59961)\n' +
        '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
        '    at async Object.embeddings (/var/task/.next/server/chunks/43054.js:9:3533)\n' +
        '    at async /var/task/.next/server/chunks/1701.js:5:25922\n' +
        '    at async u.middlewares (/var/task/.next/server/chunks/90525.js:1:5409)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)',
      status: 404
    },
    errorType: 'ProviderBizError',
    provider: 'openai'
  }
}
image
ccoc-cc commented 2 months ago

3527

这里写了需要配置APP_URL

感谢领细心且耐心的指导, 因为教程中没有这个参数所以我没有添加. 刚加上了, 现在成功分块了. 只是,,,,现在向量化失败 猜测可能是我用的转发不支持, 不过这个我在MaxKB中是成功了的, 不知道二者有啥区别.

Uncaught (in promise) TRPCClientError
    at s.from (73920-2cd3d6dba97afb1d.js:1:878)
    at 73920-2cd3d6dba97afb1d.js:1:7395
i [TRPCError]
    at a (/var/task/.next/server/chunks/90525.js:1:1011)
    ... 6 lines matching cause stack trace ...
    at async r (/var/task/.next/server/chunks/90525.js:1:6057)
    at async /var/task/.next/server/chunks/52408.js:1:7252
    at async Promise.all (index 0) {
  code: 'INTERNAL_SERVER_ERROR',
  [cause]: o [Error]
      at /var/task/.next/server/chunks/90525.js:1:1322
      at new i (/var/task/.next/server/chunks/90525.js:1:1364)
      at a (/var/task/.next/server/chunks/90525.js:1:1011)
      at t (/var/task/.next/server/chunks/90525.js:1:6033)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async t (/var/task/.next/server/chunks/90525.js:1:5715)
      at async r (/var/task/.next/server/chunks/90525.js:1:6057) {
    endpoint: 'https://api.chatanywhere.***.cn/',
    error: {
      headers: [Object],
      stack: 'Error: 404 <html>\n' +
        '<head><title>404 Not Found</title></head>\n' +
        '<body>\n' +
        '<center><h1>404 Not Found</h1></center>\n' +
        '<hr><center>nginx</center>\n' +
        '</body>\n' +
        '</html>\n' +
        '    at rt.generate (/var/task/.next/server/chunks/96903.js:219:67341)\n' +
        '    at nf.makeStatusError (/var/task/.next/server/chunks/96903.js:219:59038)\n' +
        '    at nf.makeRequest (/var/task/.next/server/chunks/96903.js:219:59961)\n' +
        '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
        '    at async Object.embeddings (/var/task/.next/server/chunks/43054.js:9:3533)\n' +
        '    at async /var/task/.next/server/chunks/1701.js:5:25922\n' +
        '    at async u.middlewares (/var/task/.next/server/chunks/90525.js:1:5409)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)\n' +
        '    at async t (/var/task/.next/server/chunks/90525.js:1:5715)',
      status: 404
    },
    errorType: 'ProviderBizError',
    provider: 'openai'
  }
}

maxKB如果不单独配置的话使用的应该是本地的向量化模型shibing624_text2vec-base-chinese image

我看了下我的MaxKB使用的是我自己添加的 text-embedding-ada-002

ccoc-cc commented 2 months ago
image

我的转发商告诉我他们支持这个模型, 有可能是其他原因, 我再折腾折腾.

https://chatanywhere.apifox.cn/doc-2694962

lobehubbot commented 2 months ago

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


image

My forwarder told me that they support this model, but there may be other reasons, so I will continue to worry about it.

https://chatanywhere.apifox.cn/doc-2694962