Closed LeeSanity closed 2 years ago
Hi @LeeSanity,
Unfortunately, I can't debug this. As far as I know, you are the only one that experiences this error.
You could help me by extracting the document update(s) from the indexeddb database. If the content is not sensitive, simply post the entries of your document here, or send them to my mail address.
An obvious source of the error is that you are using two different versions of Yjs. Can you please check your package-lock whether that is the case? Newer versions of Yjs even throw a warning message when you use two different versions.
Cheers, Kevin
thanks for your reply @dmonad, I have confirmed that we use yjs@13.5.24 in both the frontend & backend,
Some more information about our usage: we use tiptap (included y-prosemirror@1.0.14), y-indexeddb@9.0.7 in our frontend project, and in backend we use y-websocket for collaboration & database persistence
According to your needs, I just extracted two debug samples, as they are a little too big, so send to your email.
More information about this issue, I have tried to close gc function for the ydoc, then other serious issue came out. and the ydoc in local indexeddb seems never updated whatever I do, meanwhile on the server side, everything looks fine.
You are clearly using a custom y-indexeddb extensions, as the updates you sent me use v2 encoding (upstream y-indexeddb still uses v1 encoding). The second "bug" you sent me is not related to Yjs, but rather to an infinite loop produced by your vue application.
I'm sorry, but I don't want to debug custom code for free. Feel free to contact me directly again if you want to pay for a 1on1 session so we can debug your code together.
Ok, thanks a lot @dmonad
One more information @dmonad : in yjs@13.5.24, Y.encodeStateAsUpdate just is using V2 encoding
so, y-indexeddb use this v2 encoding defaultly.
The third parameter specifies that we want to use the V1 encoder. It is all working as intended. y-indexeddb only uses the v1 encoder.
Describe the bug I'm using this project to add offline support for our preject, everything looks fine, but sometimes the initialization from local indexeddb will fail, it looks like that the initial gc process failed, but I'm not sure, and I haven't look deep into the codebase, any information will be very appreciated.
To Reproduce it happens occasionally
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
![image](https://user-images.githubusercontent.com/13415260/153831174-0755c1f5-ba9e-4925-b70e-9be4bba934a9.png)
Environment Information