vrtmrz / obsidian-livesync

MIT License
5.13k stars 167 forks source link

Chunks are not valid #510

Open maskalix opened 1 month ago

maskalix commented 1 month ago

Obsidian-c22184a33dad4e21:10/8/2024, 9:51:09 PM->Chunks of .obsidian/plugins/obsidian-tasks-plugin/styles.css (i:f:c5c7) are not valid.

or for any .md file too. Just chunks of are not valid. What should i do?

gabrielnegreira commented 1 month ago

Same issue here.

0vermind commented 1 month ago

+1

ceisma commented 1 month ago

Yep, same problem here. Was trying to sync a new device. Would like to know how to fix this, or if this is a bug.

paaradiso commented 1 month ago

+1

MementoMornings commented 1 month ago

+1

Synetic87 commented 1 month ago

+1

repryty commented 1 month ago

+1

PuderAlphaBaer commented 1 month ago

+1

PuderAlphaBaer commented 1 month ago

I have the same issue. I noticed that when creating a file on my phone example.md with the content "dummy text", then replicating it creates a entry example.md in the db, the entry children points to an id, which was not created. The issue is, that the children is not created in the db. but somehow it works perfectly on my pc

vrtmrz commented 1 month ago

Thank you for opening the Issue! I am so sorry for the inconvenience! There seems to be a problem with chunks not being sent properly these days. This is being addressed.

However, the code is in a position of not in to released it immediately, so let me introduce a workaround.

  1. Please make missing chunks again on all of your devices. This can be performed on the Hatch pane -> Recreate missing chunks of all files. Screenshot_20241015_004734_Obsidian~2

  2. Resend these chunks again. This can be performed on the Maintenance pane -> Resend Screenshot_20241015_004800_Obsidian~2

  3. Replicate once and restart Obsidian.

The above steps will complement missing chunks each other, and the broken file will be processed again.

vrtmrz commented 1 month ago

As Postscript, possibly disabling Send chunks in bulk or enabling Compute revisions of chunks sometimes works. But I am still not sure (So, rewriting and writing tests also this now). Sorry for your inconvenience, let md allow my rough response from the smartphone!

forrany commented 3 weeks ago

I also encountered this problem, I thought it was my operation mistake that caused my database to be damaged. However, after trying to rebuild, I still couldn't sync, came here and saw the same problem, found that the plugin might have a bug, hope to fix it as soon as possible, a very useful plugin, thank the author

leftchest commented 2 weeks ago

+1

revilo951 commented 2 weeks ago

+1

vrtmrz commented 2 weeks ago

This problem has been fixed at v0.24.0. And, Rebuild everything is the best way bring everything back to fine. Or https://github.com/vrtmrz/obsidian-livesync/issues/510#issuecomment-2411647763 will fix the vault.

Would you mind if I ask you to upgrade to the latest version and check the behaviour, please?

toshohirasawa commented 2 weeks ago

先ほど 0.24.0 で新規にセットアップしましたが、同様の問題が継続的に発生しています。 構成は Macbook Pro (primary) + iPhone (secondary) で、問題は iPhone 側の初回の同期で発生します。

試したこと(ただ、あれこれ試しながらなので、厳密に切り分けはしてません)

  1. primary から Recreate all ➜ Resend (Send chunks): 状況変わらず
  2. End-to-End Encryption を無効化: secondary での同期ができるようになった

一旦 E2E 暗号化は無効にして使用しようと思いますが、なにかお手伝いできることがあればお知らせください。


I still have this problem with the 0.24.0 version on my Macbook (primary) and iPhone (secondary). The workaround of disabling the "End-to-End encryption" functionality temporarily resolved my problem.

vrtmrz commented 2 weeks ago

ご報告ありがとうございます、0.24.0でも発生していましたか… 最初の同期で発生するのは少し納得がいきますね。Recreateしても、作成順は変わらないので、これは初回同期の修正には役立たないかもしれません。ご案内ミスですね。本来はRebuild everythingが必要だったのだと思います。ただ、微妙なところで、Fetch chunks on demandがちゃんと待ってない可能性もあるのかも。。

おそらくE2EEを無効化したタイミングでRebuild Everythingをしているので、それでようやくDBの整合性が合った可能性もあります。 なので、再度E2EEを有効にしても(また Rebuild Everythingされるので)問題無く同期できると思いますが、対策として、チャンク収集部分を少し修正してみようと思います。

また、状況が良くなった際には告知しますので、よろしくお願いいたします。


Thank you for reporting this! So sorry to hear that it have been still occur in 0.24.0... It makes a bit of sense that it would happen on the first sync - Recreate doesn't change the order of creation, so this may not help to correct the initial synchronisation. My guidance error. I think we originally needed to Rebuild everything. However, in a subtle way, it is possible that Fetch chunks on demand may not be waiting properly.

Perhaps you did a Rebuild at the time you disabled E2EE, so it is possible that that is how you finally got the DB to be consistent. So I think I can synchronise without problems even if I enable E2EE again, but as a countermeasure, I will try to modify the chunk collection part a little.

I will notify you when the situation improves.

maskalix commented 2 weeks ago

This problem has been fixed at v0.24.0. And, Rebuild everything is the best way bring everything back to fine. Or #510 (comment) will fix the vault.

Would you mind if I ask you to upgrade to the latest version and check the behaviour, please?

Did, works better but still, doesn't sync all the files... Don't know why tho