Files get emptied on Sync

Since a couple of months, when I sync new files, sometimes, some specific files get modified by other devices (that were about to get updated/transmitted) which just reduces the filesize to 0 bytes and syncs that empty husk of a file instead of my actual updated files. The change is visible in the Global Changes window, this has come from different devices but the heaviest offender is my Android. (As my wording implies, this happend with other devices aswell, even with the Android offline, leading me to believe this isn’t an specific issue with the Syncthing android app) This happens to files I update very frequently.

This is difficult to reproduce, let alone diagnose I suspect, but I am willing to help from providing logs to letting one of the devs get a hands on look via SSH or other means.

If I can assist somehow, let me know.

Version Information

Syncthing Version: v0.14.37 OS Version: Debain Sid/ Debian Stretch / OSMC Stable / Windows / Android

PS: My search in github issues or this forum wielded no replicas of this exact issue I have.

I am pretty sure its caused by Android, are the files actually 0 bytes on Android?

As empty as they can be, yep. I know permissions can be pretty restrictive, especially on Android regarding external SD cards. Does it maybe fail to read which causes the empty file on another host which in return causes the original file to get wiped on Android?

Potentially, yet the scan shouldn’t happen if we can’t read the file.

If you look for “android 0 bytes” in google you’ll see that there is plenty of posts talking about android media indexer causing it, atleast if the files are media files.

I don’t think files like .css , .json , .kdbx or plain id_rsa should be affected but they are. And only one of those (kdbx) is in use by an app itself.

Yes, these shouldn’t happen. Best I can suggest is to check the error logs in all instances to try and work out where it’s coming from. I think we have sufficient safeguards not to bulldoze files like that, but there might always be something that slipped through.

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