Hi. I’ve started to sync a single folder to an Android device (Android 11 running v1.18.3 from F-Droid) with our Linux based server (v1.19.0, Linux (64-bit Intel/AMD)“Fermium Flea” Build 2022-01-24 (noupgrade)).
The device is configured w/ “receive only”, while the server is “send only” with “ignore permissions” checked. Synchronization is starting as expected with an empty folder on the device. After 3577 (25,3 GiB) of 4072 (29 GiB) files = 87% sync stalls. No error message. Device cycling “scaning” - “prepare scan” - “not synced”. Restart of server and/or device doesn’t change behavior.
Could this be a version mismatch or a code page issue w/ file names…
On linux: In Syncthing’s home folder (likely shown by running syncthing --paths unless you use special command line flags alreayd → then you should know already). On android either through adb logcat and some grepping, or it’s somewhere in the menu.
The Android app automatically saves the log to /sdcard/Android/data/com.nutomic.syncthingandroid/files/syncthing.log. The log is overwritten on each Syncthing start, so only the newest is available, and also there’re no times and dates in it, so it’s quite difficult to track events there. It may still be useful though.
Alright. Here’s what happened starting last night:
deleted respective ST folder and device on both Android and server
double checked “hidden” files are removed as well
deleted ST log file on server in ~/.config/syncthing
“hard” delete target folder from Android device’s SD card
after that went back to setup on the server (added folder w/ options “send only” and “ignore permissions”)
started ST on Android, added server and folder w/ folder option “receive only”
sync started sucessfully
server went down during night (regular behavior)
server powered up this AM sync continues until it gets again stalled at 87% (paused folder and Android device on server thereafter)
Android device reporting “not synchronized” with 3577 of 4072 files - 25,3 of 29 GiB
server reporting “syncing (87%, 3.67 GiB)” for the device and
folder “out of sync” with “Out of Sync Items [1 items, ~128B]” - I presume this is the server’s .stfolder which is empty (aka default size of empty folder on the server)
The server’s log file has only info messages. Here are the last two lines after resume:
[YXIUY] 14:05:41 INFO: Failed to exchange Hello messages with JTWBX3A... at [fe80::e2c2:4149:9f3b:eddd%wlp3s0]:22000-[fe80::548b:41d0:f770:5df9%wlp3s0]:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256: EOF
[YXIUY] 14:05:41 INFO: Failed to exchange Hello messages with JTWBX3A... at 192.168.2.151:22000-192.168.2.147:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256: write tcp 192.168.2.151:22000->192.168.2.147:22000: write: connection reset by peer
Synthing protocol on Android reports umpteen lines of the form (I’m testing with my music folder):
02-05 14:15:28.785 I/SyncthingNativeCode( 9511): [JTWBX] INFO: Puller (folder "Musik" (aqnwr-oh3me), item "Texas - White On Blonde /11 0.28.mp3"): syncing: creating parent dir: mkdir /storage/C362-181A/Musik/Texas - White On Blonde : invalid argument
and
02-05 14:15:28.786 I/SyncthingNativeCode( 9511): [JTWBX] INFO: Folder "Musik" (aqnwr-oh3me) isn't making sync progress - retrying in 2m5s.
Hope this helps… I’m at a loss…(so far using GUI interface only)
Syncthing 1.18.3 on android and you are trying to sync to an external SD card on android? That wasn’t expected to work at any point (unless you have a special setup, like root or system tweaks). It should however start working when you upgrade to 1.19.0 on Android.
02-05 14:15:28.785 I/SyncthingNativeCode( 9511): [JTWBX] INFO: Puller (folder "Musik" (aqnwr-oh3me), item "Texas - White On Blonde /11 0.28.mp3"): syncing: creating parent dir: mkdir /storage/C362-181A/Musik/Texas - White On Blonde : invalid argument
The invalid argument bit is an error from the Android filesystem - no idea what it might be referring to.
@imsodin Well it worked for the first 3577 files (The “external” SD is used as “storage extension”).
I think the issue is more due to non-existing error messages from ST in situations like this.
So what happened?
My intial assumption was code page and/or file name problem. Actually it’s the CD ripper (XConvert File Audio 5.0.2 in my case) that creates directory names with a trailing blank (not that Linux is disturbed by that).
So much for the majority of the files not sync’ed due to ST not creating the directory on the receiving device. I firmly believe in the need to address this in future releases (could by any of skip files and TELL THE USER about it / option to automated renaming / option to strip leading and trailing blanks on the target before sync / …).
Furthermore, some (less than 5) of the file names are including question marks - a know problem for msdos formatted storage devices used in my case in the Android device (how can any artist dare to put a question mark to his/her song title…). Again no error or info message thrown by ST…
I ended up in unplugging the SD card and replicating with grsync on my server - which off course faced the same issues but in case of the trailing blanks just continued sync without trailing blank and for the “?” at least talked to me about it: rsync: mkstemp "/media/michael/C362-181A/Musik/Kruder & Dorfmeister - DJ-Kicks/.08 - James Bong - Never Say?.mp3.IuB6VL" failed: Invalid argument (22)
Syncthing did tell you - you posted the error message above, which is also visible in the web UI under “Failed Items”. The “invalid argument” error is indeed not very helpful, but that’s what the filesystem provides, that’s not something Syncthing comes up on it’s own.
As for automatic renaming: There’s a lot of previous discussions on this, the tl;dr is: Somewhere in between impossible and a complicated can of worms, i.e. don’t wait for it to happen.
Well… understand where you’re coming from. However: you (more) and I may understand this stuff - I only doubt that a “simple” user gets it. I bet we’ll see more of this happening as G***gle invents all kinds of “interesting” stuff for future Android versions. Interoperability has always been the “the strong and slow boring of hard boards” to use the German expression (according to Max Weber ).
Allright - after several add’l trials the final decision here is stop using ST for Android. @imsodin Simon, if you wish to discuss in more detail pls drop me a line. -Michael