vrtmrz / obsidian-livesync

MIT License
3.92k stars 132 forks source link

plugin started to corrupt data in 0.23.12 #447

Closed raven428 closed 1 day ago

raven428 commented 1 month ago

Abstract

Version 0.23.12 started to corrupt data for sync where 0.23.11 was fine

Expected behaviour

Full note sync

Actually happened

If a note contain lines bellow:

# test header

test code block

Without any separating data between line # test header and line ``` then plugin put to CouchDB the note truncated after # test header line

In this case note will be synchorized to CouchDB completely:

# test header
some data separate
header and code lines

test code block

Reproducing procedure

  1. Install version 0.23.12 with default configuration
  2. Configure sync to CouchDB
  3. Put the text reported above to note
  4. Click the replication button on the ribbon.
  5. Sync will put only the truncated note to CouchDB

The same procedure will be fine in 0.23.11, which I'll still use. Tried at Obsidian version 1.5.12 for Windows and Android - both affected

vrtmrz commented 4 weeks ago

Thank you for reporting this! I completely have not noticed this! And, thanks to your detailed report, I could fix that quickly! This has been fixed at v0.23.13. Would you mind if I ask you to check the behaviour, please?

foegra commented 4 weeks ago

I have had the same issue. I really like the plugin, but while I was using it - synchronization has gone bananas couple of times.

Perhaps it would be wise to introduce beta release branch to keep the main release branch as stable as possible?

vrtmrz commented 4 weeks ago

Thank you for using Self-hosted LiveSync! I think your problems and their solutions are reasonable. However, this bug could actually be avoided by disabling the new default feature. Therefore, a beta release would have been good, but a case like this would have been done anyway.

So, probably not what you want again, but new feature will be released not as a beta release but a as a beta configuration. And I will disable the new feature in default. (Instead, a dialogue will ask us if we want to enable it or not, when a new feature have added or, when after n versions have passed since the new feature was added).

raven428 commented 4 weeks ago

Could you please share what new feature you mentioned? Just curious

vrtmrz commented 4 weeks ago

@raven428 Thank you for asking! This has been caused by splitting chunks in background. While passing split strings to foreground, empty string had been detected as End-of-strings, unfortunately. (We had been able to disable it in the Hatch pane).

Opisek commented 3 weeks ago

Same issue. I was horrified to see all my notes becoming empty, as they all start with a table of contents.

# Table of Contents
\```table-of-contents
\```

When can we expect a hotfix. This can cause serious corruption.

Opisek commented 3 weeks ago

Seems to be resolved by the newest release. Can the issue be closed?

vrtmrz commented 1 day ago

Thank you for your confirmation! (and sorry for being delayed). I think it should be fixed. If you all noticed some issues have been left, please feel free to open this issue again.