Skip to content
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] 合并的indexedDB-storage这个代码,有严重bug,聊天对话页面刷新三次,聊天内容就没了,被重置了 #5354

Closed
laxfer opened this issue Sep 3, 2024 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@laxfer
Copy link

laxfer commented Sep 3, 2024

📦 Deployment Method

Official installation package

📌 Version

v2.14.2

💻 Operating System

Ubuntu

📌 System Version

24.04

🌐 Browser

Edge

📌 Browser Version

Microsoft Edge 版本 128.0.2739.54 (正式版本) (64 位)

🐛 Bug Description

合并了indexedDB-storage这个代码,有严重bug,聊天对话页面连着刷新2次以上,indexedDB库就被重置了,导致以前的对话记录丢失

📷 Recurrence Steps

合并了indexedDB-storage这个代码,有严重bug,聊天对话页面连着刷新2次以上,indexedDB库就被重置了,导致以前的对话记录丢失

🚦 Expected Behavior

希望能修复多次刷新页面,indexedDB库就被重置,对话内容丢失的BUG。

📝 Additional Information

No response

@laxfer laxfer added the bug Something isn't working label Sep 3, 2024
@Issues-translate-bot
Copy link

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


Title: [Bug] The merged indexedDB-storage code has a serious bug. The chat conversation page is refreshed three times, and the chat content is gone and reset.

@Issues-translate-bot
Copy link

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


Uploading Feishu20240903-164031.mp4…

@Dogtiti
Copy link
Member

Dogtiti commented Sep 3, 2024

飞书20240903-164031.zip
我录了个屏 暂时没有复现 不排除是大数据量异步存储到indexeddb被刷新了,需要排查一下
如果着急可以回退版本 数据其实还是在localstorage里面
indexeddb 第一次会尝试从localstorage取数据 然后set到indexeddb
后续indexeddb 里面有数据了就会直接从indexeddb 读取存储

@Issues-translate-bot
Copy link

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


Feishu20240903-164031.zip
I recorded a screen and it hasn’t been reproduced for the time being. It cannot be ruled out that a large amount of data was asynchronously stored in indexeddb and was refreshed. It needs to be checked.
If you are in a hurry, you can roll back the version. The data is actually still in localstorage.
Indexeddb will try to get data from localstorage for the first time and then set it to indexeddb.
Subsequently, if there is data in indexeddb, the storage will be read directly from indexeddb.

@Dogtiti Dogtiti mentioned this issue Sep 3, 2024
10 tasks
@Dogtiti
Copy link
Member

Dogtiti commented Sep 3, 2024

https://5356-vercelpreviewdeployment.pr.nextchat.dev/#/chat
@laxfer 麻烦在这个地址帮忙测试一下呀 修复了一下

@Issues-translate-bot
Copy link

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


https://5356-vercelpreviewdeployment.pr.nextchat.dev/#/chat
@laxfer, please help me test this address and fix it.

@Issues-translate-bot
Copy link

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


@Dogtiti https://5356-vercelpreviewdeployment.pr.nextchat.dev/#/chat This address was tested. The indexeddb is always empty and no value is written at all.

@laxfer
Copy link
Author

laxfer commented Sep 3, 2024

我重新添加了你更新的代码到项目,这次的问题是数据并没写入indexeddb,经调试,indexeddb里面一直是空的。

@Issues-translate-bot
Copy link

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


I re-added your updated code to the project. The problem this time is that the data is not written to indexeddb. After debugging, indexeddb is always empty.

@Dogtiti
Copy link
Member

Dogtiti commented Sep 3, 2024

@laxfer 再试试 刚刚的是有点问题

@Issues-translate-bot
Copy link

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


@laxfer try again, there was something wrong with the one just now

@laxfer
Copy link
Author

laxfer commented Sep 4, 2024

@laxfer 再试试 刚刚的是有点问题

这次测试,多次刷新导致原来存的数据被重置的问题已经解决了,非常感谢

1 similar comment
@laxfer
Copy link
Author

laxfer commented Sep 4, 2024

@laxfer 再试试 刚刚的是有点问题

这次测试,多次刷新导致原来存的数据被重置的问题已经解决了,非常感谢

@Issues-translate-bot
Copy link

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


@laxfer try again. There was something wrong with the previous one.

In this test, the problem of the original data being reset due to multiple refreshes has been solved. Thank you very much.

1 similar comment
@Issues-translate-bot
Copy link

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


@laxfer try again. There was something wrong with the previous one.

In this test, the problem of the original data being reset due to multiple refreshes has been solved. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants