Markdown files losing all content.

I recently found that my Markdown files have been fine and then as I was working in Obsidian, Obsidian restarted, and my two notes that had content showed a bunch of null characters. I have been using Syncthing and Obsidian for about a week without issues.

I was able to recover the original files with Obsidian’s file recovery feature.

I have copies of the same files in other areas that are not syncing over Syncthing, which remain fine. However, the ones on the Syncthing folder continue to experience the same issue.

I am pretty confident that the issue has been isolated to something happening in Syncthing and not in Obsidian on my Samsung phone or windows computer.

I also turned on all the debugging features since I am not quite sure where the issue is originating.

Any help would be appreciated.

Are the note contents completely gone, or are the null characters simply added on top of them?

This may a wrong clue, but there was a somewhat alike case with Joplin, which is also a note taking application (see That problem turned out to be related to Joplin and some Android versions.

Is Android involved here too? I’m guessing that “my Samsung phone” is Android, right? You may want to report the problem to Obsidian as well, since Syncthing itself doesn’t do anything special to markdown files (or any other format, for that matter).

All of the content is gone and replaced by a bunch of null Characters. I added some content and opened the file in another Markdown editor and only the new (non-null) content is visible to the new editor.

I did find that link while trying to find a solution. As far as I know Obsidian only writes in the Markdown file but inst responsible for maintaining or storing them. The fill becoming null only happens on a syncing attempt by Syncthing. What I find strange is that there wasn’t any issue for the first week of it working. The issue didn’t manifest until I made some changes on my markdown files without syncthing running, then when I turned Syncthing on and started making more edits was when it attempted to sync and all the content became null characters. I’m thinking it might be some sort of file conflict.

The logs also showed these issues before the issue occurred [HRZBM] is my laptop:

[HRZBM] 16:22:53 INFO: New NAT port mapping: external TCP address to local address [::]:22000.

[HRZBM] 16:22:54 INFO: New NAT port mapping: external TCP address to local address [::]:22000.

[HRZBM] 16:22:54 INFO: Detected 2 NAT services

[HRZBM] 16:23:03 INFO: quic:// detected NAT type: Port restricted NAT

[HRZBM] 16:23:03 INFO: quic:// resolved external address quic:// (via

[HRZBM] 16:23:45 INFO: Joined relay relay://

[HRZBM] 16:26:43 INFO: Puller (folder “Obsidian Vault 1” (Obsidian Vault 1), item “.obsidian\workspace”): syncing: file modified but not rescanned; will try again later

[HRZBM] 16:26:43 INFO: “Obsidian Vault 1” (Obsidian Vault 1): Failed to sync 1 items

[HRZBM] 16:26:43 INFO: Folder “Obsidian Vault 1” (Obsidian Vault 1) isn’t making sync progress - retrying in 1m3s.

As it was said, syncthing doesn’t do anything special to files based on extensions, so I am guaranteed that the issue is not in syncthing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.