Open swehba opened 2 years ago
Interesting, sounds like this broke from the Obsidian update. I'll take a look this weekend.
Have the same issue but it doesn't happen every time. If I rename today's daily note and let the sync create a new one, sync starts to work again for some time. But I couldn't figure out what causes the crash yet
I think this has something to do with trying to update the current note that it is open in the editor. For some reason the length of the document is returned incorrectly and causes the above error, which stops sync.
I recently noticed this as well and believe it is caused in part by the new editor experience.
I can confirm the source file does have 9 lines in it.
I was able to track it down to the following bit of source code and added some logging and it appears logbook sync does say to replace to line 9.
https://github.com/liamcain/obsidian-things-logbook/blob/main/src/textUtils.ts#L75
I think the bug may be in the new editor itself and found that disabling the new editor does in fact resolve the issue.
Reached out on discord and, in theory, there will be a fix for it in the next insider build.
https://discord.com/channels/686053708261228577/840286264964022302/931627709149380669
Until then I would recommend temporarily disabling the new editor to run the sync command and then turning it back on after it syncs.
Describe the bug
Syncing is no longer working.
Steps to reproduce
Expected behavior
Screenshots
Here's a snapshot from the developer's console:
Environment (please specify)
OS
macOS 11.6.1
Obsidian Version (e.g. v0.10.6)
0.13.6
Theme (if applicable):
If the bug is visual, please provide the name of the Community Theme you're using.