The main issue is that the mobile clients starts syncing then they stop syncing even though it says “syncing %80” for almost 2 days (and for that node it says %30 for a while on the other node which is a desktop). The responsible nodes seems connected. So it is not a connection issue as far as I can tell
I want to provide specific details-logs on the mobiles. I hope the logs below are helpful
I have the same issue. Small repo(45MB) containing photos syncs fine. But the repository having 9.1 GB stops at around 9GB and syncs forever. I even see incoming traffic into Android. Let me know how I can send you more debug info.
Is this configured as a “master repository”, possibly?
The phone doesn’t allow syncthing to change the modification timestamp of the file. Hence, next time it scans for changes, it’ll consider the file modified because the timestamp is newer than it should be. It’ll announce that change to it’s peers, which will sync the file back (with no changed blocks) or, in case you have them set as “master repo”, remain out of sync.
In general, something is crappy about that setup on the phone; if syncthing can’t set modification times, syncing won’t work properly.
Yes the workstation is the middle man between those 2 android devices.
I am using Cyanogenmod11. It is not something I messed up. I myself created the master repo folder. I do not know why ST having hard time changing modif times. Please bear in mind that most sdcards on Android devices are fat32 compatible I think.
The system is able to change modif times. So I doubt that its a problem with the filesystem. Other programs read and write to the sdcard all the time as well and clearly they are able to modify time stamps. At least that is how it seems to be overall.
Here is the permissions for the sync folder
drwxrwx— 14 root sdcard_r 4.0K Aug 26 13:19 _XXXXXX_SYNC
Yeah, I don’t know. Apparently there’s been some changes lately in how Android manages storage and it’s all piped through a userspace daemon; perhaps that screws something up when you’re not using the official API:s? I don’t think I can help here, not being an Android developer or having an Android device.
Making syncthing work correctly on these kinds of devices would require some compatibility code, perhaps we can record the modification time that we got when we wrote the file and remember that as the “unchanged” time.
(#69) Looks like it, yeah. (ignore permissions) No, not that easily since the modification time is the primary indicator of whether the file has changed. Not impossible, obviously, but requires some hacking and testing.
Also it still tries to chmod on Android. Again I have thousands of these. I thought that the permissions were ignored on Android. Or some another operation is failing at the same time.
I/SyncthingNativeCode( 2031): [2JOJA] 20:20:58 INFO: mkdir: error: “xxxxx” / “data/xxxx/xxxx - xxx Words _ xxxx.db-journal”: chmod /storage/emulated/0/xxxxxx/data/xxxxxx: operation not permitted
One thing is interesting that ST creates “dot” files and tries to chmod them and then it fails to chmod them. Is the dot files part of the process at all?
I delete them but they come back in a flash.
“data/xxxx/x.db-journal”: chmod /storage/emulated/0/xxxx/data/xx: operation not permitted
See in this line it says not permitted, actually the file is not there but there is a “dot” file version of it.
I do not even know why it is failing to create a folder since it seems to me that it is trying to deal with a file (xxx.1-5.txt.db-journal) rather than a folder .