Hello! Big fan of Syncthing. Been using it for years. Never had any issues until this past week.
I use Syncthing between 5 devices (2 are connected 24/7):
- Ubuntu server (24/7) - snap v1.19.0
- Ubuntu desktop (24/7) - stable release package
- Windows 10 desktop - official 64-bit
- Android phone v7.1.1 - Google Play Store
- Linux VM (rarely turned on) - Flatpak
After the last 2 Syncthing Android releases, I started getting duplicates sent from that device. Not sure why, because I never modify anything on it. Had to go through the 20 conflicted files which was a pain, but I did it.
Ubuntu server was working good this morning until I noticed more duplicates created by it. Before dealing with them, I did a system update and rebooted. Now Syncthing won’t connect to my other devices. Syncthing is running (confirmed with systemctl), but I am getting: no recent network activity, i/o timeout, and connection refused shown in the browser. I stopped and restarted the service, no change.
The newly created duplicates from the server are files I never touch - git files, etc. It’s annoying because it’s messing with the timestamps and structure of my coding projects.
Any help would be greatly appreciated. If you need more information let me know!
Are you sure the version is really v1.19.0? The official snap package was discontinued back in 2020 (see https://snapcraft.io/install/syncthing/ubuntu), so if you still use it, it should likely be stuck on a much older version of Syncthing.
I assume that by “duplicates” you mean conflicted copies. Is this correct? The last Android release enforces a database reset, and that can lead to conflicts (and “undeleted” files) if the folders aren’t 100% up to date before doing the reset.
This is the snap package I am using: https://snapcraft.io/syncthing-arubislander It was updated just a week ago.
Sorry, yes I meant conflicting copies. I have never had this issue before. I specifically made sure Syncthing was running for a good amount of time before updating my Android device. My Syncthing directory is quite small in size and I verified all files were copied / up to date before downloading the newest version.
Just an update: I uninstalled the Snap and used the official Ubuntu package. I don’t know what happened, but the Syncthing snap could not be saved. Device was “unknown”. I couldn’t fix anything via settings. Very strange, because I never had an issue with the snap before this.
I am still having issues with conflicts and my phone being “Out of Sync”. My phone has the same total number of files as my other devices, but 39 items are out of sync. It doesn’t make sense, because these are items I have never modified. They are just node.js modules. My phone is up to date, Syncthing on the phone is up to date, and my phone is the highest version is can be (7.1.1).
I restarted Syncthing multiple times on my phone and there was no change. I opened the Web GUI and under “Failed Items” it says: operation not permitted.
This sounds like a different problem than the original issue about conflicted copies, but screenshots and, if possible, logfiles will be helpful here. The number of files may be identical, but Syncthing needs to also sync modtimes and permissions (if not ignored), and if that fails, the folder may still be marked “out of sync”.
Here is a screenshot. I just blacked out some sensitive information.
All the Out of Sync files are coming from the exact same directory. I don’t know where this 1969 date is coming from?
Judging by the exactly same size of 128 for all the files shown, are these symlinks by any chance? That could cause permission errors on Android, because they are not allowed to be created by Syncthing-Android.
Dunno about the weird date, that certainly looks like an error.
I looked under the WEB GUI on my phone under “Failed Items”. I clicked on “operation not permitted” and it says: syncing: symlink create: symlink…/ - operation not permitted for all files.
I am not familiar with symlinks and Android. What do I do in this situation? Android has “Ignore Permissions” checked by default. Last night I also made an .stignore with “node_modules” on my server. That didn’t help with the issue after Syncthing restarts.
The date looks like the Unix epoch (see https://wikipedia.org/wiki/Unix_time) +/- the timezone difference, hence 1969 and not 1970.
Android doesn’t support symlinks on the
/sdcard partition. It seems that Syncthing keeps trying to create them with no success. A possible solution could be to add the specific paths to your ignore patterns.
Ignoring the paths should indeed do the job. Did you verify that the ignore patterns were correctly applied (e.g. by comparing your local state before and after adding the patterns)? If yes, then I’d suggest to remove and re-add the folder on the Android side. This should clear the errors once and for all.
I am not using an SD Card. My Syncthing directory on my phone is simply “Documents”, which is not on the SD Card.
Am I suppose to ignore the paths on my Android as well as other devices? I just did it on my server, with .stignore in the main Syncthing directory.
/sdcard is where user files are located on Android. It’s called like that for legacy reasons and nowadays has got nothing to do with an actual SD card . The important thing here is that
/sdcard is severely restricted, e.g. it disallows symlinks, executable permissions, etc.
I think it should be enough to ignore them only on the source, but if they have already been propagated to other devices which also share the same folder with Android, then yes, they do need to be ignored on Android too. In fact, it may be enough to ignore them on Android only, but you’ll need to test this yourself to be sure.
Regardless of the above, it may still be necessary to remove and re-add the folder on Android to get rid of the existing errors though.
I didn’t know that. Learned something new.
I solved the issue by adding node_modules to my ignore patterns on my Android device. Within a few seconds, everything synced up properly. I didn’t have to restart the Android server. Though I should add, that files remained on the device, they just don’t sync anymore. I could delete them I guess. Finally I removed the .stignore I had created on my Ubuntu server since there is no issue with symlinks on it and I don’t have a problem with that folder syncing to other computers.
Hopefully I don’t run into any more conflicts / duplicates. Syncthing has been great!
Thanks for the help!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.