NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Bug] windows客户端无法同步

Open xengine-qyt opened this issue 1 year ago • 14 comments

📦 部署方式

官方安装包

📌 软件版本

2.14

💻 系统环境

Windows

📌 系统版本

11

🌐 浏览器

Edge

📌 浏览器版本

127

🐛 问题描述

自己部署了一个webdav服务,通过curl测试上传下载正常 curl -u 123123:123123 -T ./1.txt https://webdav.xxx.org/2.txt curl -u 123123:123123 https://webdav.xxx.org/2.txt 浏览器也可以正常访问下载,不知道为啥客户端一直无法同步,同步失败

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

xengine-qyt avatar Jul 31 '24 07:07 xengine-qyt

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] windows client cannot synchronize

Issues-translate-bot avatar Jul 31 '24 07:07 Issues-translate-bot

the client has not request? wireshark have no packet

xengine-qyt avatar Aug 01 '24 08:08 xengine-qyt

#5174 我修复了这个问题,你可以试试我的版本。

ahzmr avatar Aug 04 '24 02:08 ahzmr

Bot detected the issue body's language is not English, translate it automatically.


#5174 I fixed the issue, you can try my version.

Issues-translate-bot avatar Aug 04 '24 02:08 Issues-translate-bot

#5174 我修复了这个问题,你可以试试我的版本。

最新版本合并了?2.14.2 我试过不行呢?配置有问题吗? image 抓包什么都没有 image

xengine-qyt avatar Aug 22 '24 08:08 xengine-qyt

Bot detected the issue body's language is not English, translate it automatically.


#5174 I fixed this issue, you can try my version.

Is the latest version merged? 2.14.2 I tried it but it doesn’t work? Is there something wrong with the configuration? image There is nothing in the packet capture image

Issues-translate-bot avatar Aug 22 '24 08:08 Issues-translate-bot

#5174 我修复了这个问题,你可以试试我的版本。

最新版本合并了?2.14.2 我试过不行呢?配置有问题吗?

这修改已经合并了,你这没有点检查可用性吧?再注意一下配置WHITE_WEBDEV_ENDPOINTS,再我看你配置的本地的webdav服务,如果你用docker部署,这样配置不行。这个点击看看,以及外面的同步功能。如果出问题,可以看看抓包情况。也可以试试我用的这个版本docker image: ahzmr/chatgpt-next-web

ahzmr avatar Aug 22 '24 11:08 ahzmr

Bot detected the issue body's language is not English, translate it automatically.


#5174 I fixed this problem, you can try my version.

The latest version is merged? 2.14.2 I tried it but it doesn’t work? Is there something wrong with the configuration? ![image](https://private-user-images.githubusercontent.com/37919215/360359457-34d7bc95-eeb8-48d8-a053 -2355cc46422b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..BglECiCAfWaMZw0yNBJhXMP0RvDSmRUYa-qNiTrBWM4) There is nothing in the packet capture![image](https://private-user-images.githubusercontent.com/37919215 /360359597-ae80a388-7720-4aaa-a5fd- e80774ceae8d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..Qcr830dD6K-3TKVqk9vmkldZkFylOnD-eCbYFkdppew)

This modification has been merged. Have you checked the availability? Click to see this, as well as the synchronization function outside. If something goes wrong, you can check the packet capture status. You can also try the version I used docker image: ahzmr/chatgpt-next-web

Issues-translate-bot avatar Aug 22 '24 11:08 Issues-translate-bot

#5174 我修复了这个问题,你可以试试我的版本。

最新版本合并了?2.14.2 我试过不行呢?配置有问题吗?

这修改已经合并了,你这没有点检查可用性吧?再注意一下配置WHITE_WEBDEV_ENDPOINTS,再我看你配置的本地的webdav服务,如果你用docker部署,这样配置不行。这个点击看看,以及外面的同步功能。如果出问题,可以看看抓包情况。也可以试试我用的这个版本docker image: ahzmr/chatgpt-next-web

点了没用,wireshark什么都抓不到.没有请求 output

xengine-qyt avatar Aug 23 '24 06:08 xengine-qyt

Bot detected the issue body's language is not English, translate it automatically.


#5174 I fixed this issue, you can try my version.

The latest version is merged? I tried 2.14.2 but it doesn’t work? Is there something wrong with the configuration?

This modification has been merged. Didn't you click to check the availability? Pay attention to configuring WHITE_WEBDEV_ENDPOINTS again, and then look at the local webdav service you configured. If you use docker to deploy, this configuration will not work. Click to see this, as well as the synchronization function outside. If something goes wrong, you can check the packet capture status. You can also try the version I used docker image: ahzmr/chatgpt-next-web

It's no use if you order it output

Issues-translate-bot avatar Aug 23 '24 06:08 Issues-translate-bot

同步问题看来还是没有解决,想问问这个本地数据都是保存在哪里的?能不能直接同步文件数据?

Lyinsun avatar Sep 20 '24 04:09 Lyinsun

Bot detected the issue body's language is not English, translate it automatically.


The problem of synchronization still seems to have not been solved. I want to ask where the local data is preserved? Can I synchronize file data directly?

Issues-translate-bot avatar Sep 20 '24 04:09 Issues-translate-bot

同步问题看来还是没有解决,想问问这个本地数据都是保存在哪里的?能不能直接同步文件数据?

这个功能可能没人维护

xengine-qyt avatar Sep 20 '24 05:09 xengine-qyt

Bot detected the issue body's language is not English, translate it automatically.


The synchronization problem seems to be still unresolved. I would like to ask where the local data is stored? Can I synchronize file data directly?

This function may not be maintained by anyone

Issues-translate-bot avatar Sep 20 '24 05:09 Issues-translate-bot

是不是因为Windows下不能设置WHITE_WEBDAV_ENDPOINTS, 所有导致同步用不了

showyourlucky avatar Oct 10 '24 17:10 showyourlucky

Bot detected the issue body's language is not English, translate it automatically.


Is it because WHITE_WEBDAV_ENDPOINTS cannot be set under Windows, so synchronization cannot be used?

Issues-translate-bot avatar Oct 10 '24 17:10 Issues-translate-bot

是不是因为Windows下不能设置WHITE_WEBDAV_ENDPOINTS, 所有导致同步用不了

那是什么,不知道.我是直接全部手撸的服务端代码, 测试WINDOWS自带的WEBDAV是可以的.

xengine-qyt avatar Oct 11 '24 07:10 xengine-qyt

Bot detected the issue body's language is not English, translate it automatically.


Is it because WHITE_WEBDAV_ENDPOINTS cannot be set under Windows, so synchronization cannot be used?

I don’t know what that is. I just hand-coded all the server-side code. It’s okay to test the WEBDAV that comes with WINDOWS.

Issues-translate-bot avatar Oct 11 '24 07:10 Issues-translate-bot

是不是因为Windows下不能设置WHITE_WEBDAV_ENDPOINTS, 所有导致同步用不了

那是什么,不知道.我是直接全部手撸的服务端代码, 测试WINDOWS自带的WEBDAV是可以的.

我在本地部署测试了下, 配置相同的webdav参数, 在浏览器中是可用同步的, 但是用tauri打包成exe就同步失败, 我再加点日志看看

showyourlucky avatar Oct 11 '24 09:10 showyourlucky

Bot detected the issue body's language is not English, translate it automatically.


Is it because WHITE_WEBDAV_ENDPOINTS cannot be set under Windows, so synchronization cannot be used?

I don’t know what that is. I just hand-coded all the server-side code. It’s okay to test the WEBDAV that comes with WINDOWS.

I tested it in local deployment and configured the same webdav parameters. Synchronization is available in the browser, but synchronization fails when packaged into exe using tauri. I will add more logs to take a look.

Issues-translate-bot avatar Oct 11 '24 09:10 Issues-translate-bot

我大概找到问题的原因了。使用的打包命令是 cross-env BUILD_MODE=export BUILD_APP=1 next build,这导致 next.config.mjs 在执行时有一些配置项没有设置,进而导致 app\api\webdav\[...path]\route.ts 的路由失效。结果是,当点击同步时,发起的请求 http://localhost:3000/api/webdav/chatgpt-next-web/backup.json?endpoint=https://gima.teracloud.jp/dav/ 返回了404错误。

我尝试把 BUILD_MODE=export 修改为 BUILD_MODE=standalone,然后用命令yarn tauri dev打包完成后,WebDAV 同步功能可以正常使用。不过 使用yarn tauri build打包的又不能同步, 我不明白为什么

showyourlucky avatar Oct 11 '24 13:10 showyourlucky

Bot detected the issue body's language is not English, translate it automatically.


I probably found the cause of the problem. The packaging command used is cross-env BUILD_MODE=export BUILD_APP=1 next build, which causes next.config.mjs to have some configuration items not set during execution, which leads to app\api\webdav\[.. The route in .path]\route.ts is invalid. The result is that when sync is clicked, the initiated request http://localhost:3000/api/webdav/chatgpt-next-web/backup.json?endpoint=https://gima.teracloud.jp/dav/ returns Got a 404 error.

I tried to change BUILD_MODE=export to BUILD_MODE=standalone. After the packaging is completed, the WebDAV synchronization function can work normally. However, I'm not sure if there will be any other problems with this change.

Issues-translate-bot avatar Oct 11 '24 13:10 Issues-translate-bot

我大概找到问题的原因了。使用的打包命令是 cross-env BUILD_MODE=export BUILD_APP=1 next build,这导致 next.config.mjs 在执行时有一些配置项没有设置,进而导致 app\api\webdav\[...path]\route.ts 的路由失效。结果是,当点击同步时,发起的请求 http://localhost:3000/api/webdav/chatgpt-next-web/backup.json?endpoint=https://gima.teracloud.jp/dav/ 返回了404错误。

我尝试把 BUILD_MODE=export 修改为 BUILD_MODE=standalone,然后用命令yarn tauri dev打包完成后,WebDAV 同步功能可以正常使用。不过 使用yarn tauri build打包的又不能同步, 我不明白为什么

重新试了下, 把BUILD_MODE改成BUILD_MODE=standalone, 发现yarn tauri dev打包后居然不能同步了

showyourlucky avatar Oct 11 '24 14:10 showyourlucky

Bot detected the issue body's language is not English, translate it automatically.


I probably found the cause of the problem. The packaging command used is cross-env BUILD_MODE=export BUILD_APP=1 next build, which causes next.config.mjs to have some configuration items not set during execution, which leads to app\api\webdav\[.. The route in .path]\route.ts is invalid. The result is that when sync is clicked, the initiated request http://localhost:3000/api/webdav/chatgpt-next-web/backup.json?endpoint=https://gima.teracloud.jp/dav/ returns Got a 404 error.

I tried to change BUILD_MODE=export to BUILD_MODE=standalone, and then used the command yarn tauri dev to package, and the WebDAV synchronization function can be used normally. However, those packaged using yarn tauri build cannot be synchronized. I don’t understand why.

I tried again, changed BUILD_MODE to BUILD_MODE=standalone, and found that yarn tauri dev could not be synchronized after being packaged.

Issues-translate-bot avatar Oct 11 '24 14:10 Issues-translate-bot

我大概找到问题的原因了。使用的打包命令是 cross-env BUILD_MODE=export BUILD_APP=1 next build,这导致 next.config.mjs 在执行时有一些配置项没有设置,进而导致 app\api\webdav\[...path]\route.ts 的路由失效。结果是,当点击同步时,发起的请求 http://localhost:3000/api/webdav/chatgpt-next-web/backup.json?endpoint=https://gima.teracloud.jp/dav/ 返回了404错误。 我尝试把 BUILD_MODE=export 修改为 BUILD_MODE=standalone,然后用命令yarn tauri dev打包完成后,WebDAV 同步功能可以正常使用。不过 使用yarn tauri build打包的又不能同步, 我不明白为什么

重新试了下, 把BUILD_MODE改成BUILD_MODE=standalone, 发现yarn tauri dev打包后居然不能同步了

..就是 WINDOWS版本客户端不能同步呗.

xengine-qyt avatar Oct 12 '24 05:10 xengine-qyt

Bot detected the issue body's language is not English, translate it automatically.


I probably found the cause of the problem. The packaging command used is cross-env BUILD_MODE=export BUILD_APP=1 next build, which causes next.config.mjs to have some configuration items not set during execution, which leads to app\api\webdav\[.. The route in .path]\route.ts is invalid. The result is that when sync is clicked, the initiated request http://localhost:3000/api/webdav/chatgpt-next-web/backup.json?endpoint=https://gima.teracloud.jp/dav/ returns Got a 404 error. I tried to change BUILD_MODE=export to BUILD_MODE=standalone, and then used the command yarn tauri dev to package, and the WebDAV synchronization function can be used normally. However, those packaged using yarn tauri build cannot be synchronized. I don’t understand why.

Tried again, changed BUILD_MODE to BUILD_MODE=standalone, and found that yarn tauri dev could not be synchronized after being packaged.

..It’s just that the WINDOWS version client cannot synchronize.

Issues-translate-bot avatar Oct 12 '24 05:10 Issues-translate-bot

之前在客户端大多都使用在线的api解决跨域的问题。 在v2.15.4版本中支持使用rust的http client发送消息,解决了客户端的跨域问题。后续应该可以在这个版本基础上解决这个问题

lloydzhou avatar Oct 12 '24 15:10 lloydzhou

Bot detected the issue body's language is not English, translate it automatically.


Previously, most clients used online APIs to solve cross-domain problems. In the v2.15.4 version, it is supported to use the rust http client to send messages, which solves the cross-domain problem of the client. This problem should be solved based on this version in the future.

Issues-translate-bot avatar Oct 12 '24 15:10 Issues-translate-bot

mac版 2.15.5 也同样无法同步,webdav 和 upstash 都不行。

lxysl avatar Oct 24 '24 02:10 lxysl

Bot detected the issue body's language is not English, translate it automatically.


The mac version 2.15.5 also cannot be synchronized, neither webdav nor upstash works.

Issues-translate-bot avatar Oct 24 '24 02:10 Issues-translate-bot