Description
My entire Data folder on my Computer was removed, sadly I was so stupid and didn't do a backup before but just activated file versioning which seems not to work or at least didn't work for me.
The setup was as following:
I had the data on my PC and wanted to sync it with my smartphone (Samsung S4), I followed this guide: http://discourse.syncthing.net/t/getting-started/46
after a first sync it started to crash on the smartphone and several crashes later I decided it would be a good idea to remove the cache and app data, to do a clean reinstall and at that point I THINK my computer removed all files without keeping any versioned files but I can't guarantee it.
I looked at it after I removed the old phone node and adding the new but I kept the repo and it wasn't linked with the new phone node.
Activity
calmh commentedon Jun 9, 2014
Logs would be great to narrow it down. Might you have removed all the files from the smartphone side with syncthing still running?
PeterArbeitsfrei commentedon Jun 9, 2014
I didn't remove any data on the smartphone, just the appdata itself.
There wasn't any data transfered so far.
calmh commentedon Jun 9, 2014
OK.... The logs are key here, and I guess they are hard to get at unless you can reproduce it, but generally speaking when syncthing deletes stuff it's because it's seen the file being removed and sends out that as an update.
Nutomic commentedon Jun 9, 2014
Does the app still crash for you, or can you reproduce that? Logcat of that might give some hints.
Anyway, it's likely that the syncthing binary continued running after the app crashed, and after the app data was deleted, so that might have caused problems.
Edi: It would also have deleted the .idx.gz files. Maybe that made syncthing think that all files are deleted. The problem is that Android does not kill native processes, only Java. There is also no callback or anything that is definitely called in such a case.
If this is in fact caused by files being deleted while syncthing is running (haven't tested), then syncthing should probably exit with an error in such a case.
For the Android app, it might be possible to check from syncthing if the app is still running, and exit if not (polling for last changed time of an
.alivefile maybe?)PeterArbeitsfrei commentedon Jun 10, 2014
I force stopped it before deleting the appdata and the cache, I will see if I can reproduce it when I am home from work.
calmh commentedon Jun 16, 2014
@jedie Logs logs logs... No way to figure out what's going on otherwise.
PeterArbeitsfrei commentedon Jun 16, 2014
Hm it seems I can't reproduce it again :/