Stuck attempting to sync ignored items

I have Syncthing v1.20.4 Linux (64-bit Intel/AMD) installed on a QNAP NAS syncing several send-only folders to four Android devices running Syncthing-fork v1.20.3.1 with receive-only folders. Two of them are stuck attempting to sync ignored files:

For example:

// Syncthing
(?i).stversions
(?i).stignore_global.txt
// From QNAP /etc/smb.conf veto files:
(?i).AppleDB
(?i).AppleDouble
(?i).AppleDesktop
(?i):2eDS_Store
(?i)Network Trash Folder
(?i)Temporary Items
(?i)TheVolumeSettingsFolder
(?i).@__thumb
(?i).@__desc
(?i):2e[^/]*
(?i).@__qini
(?i).Qsync
(?i).@upload_cache
(?i).qsync
(?i).qsync_sn
(?i).@qsys
(?i).streams
(?i).digest
// FreeFileSync
(?i)sync.ffs_db
(?i).ffs_lock
(?i).ffs_tmp
//Android
(?i).thumbnails
// Windows
(?i)desktop.ini
(?i)$RECYCLE.BIN
(?i)Thumbs.db

How do I fix this? Isn’t this a bug?

Yes, this is a bug, specifically https://github.com/syncthing/syncthing/issues/7474. It’s more of a cosmetic problem though, as the synchronisation itself still does work fine. There’s no workaround, so if you want to get rid of the errors in the GUI, you will need to connect all devices together.

I saw #7474. This is happening with a different configuration. #7474 involves three folders in series, while this problem occurs with one send-only and four receive-only folders in a star configuration.

This problem has cost me several hours, and may mask items that are truly out-of-sync.

It’s surprising that connecting receive-only folders together (is that even allowed?) would resolve the problem. And why does it occur on only two of the four devices?

The problem isn’t about three folders, but rather a folder shared between three or more devices in a linear fashion.

Specifically, it happens when you share a folder from Device 1 to Device 2, then on Device 2 add it with some ignore patterns, and then share it again from Device 2 to Device 3, which results with those seemingly ignored files appear stuck in sync between Device 2 and Device 3. When that happens, you can connect Device 1 with Device 3 and share the folder between them, and the issue will go away.

Obviously, there’re cases where you simply can’t connect the two devices with each other, e.g. if Device 1 and Devices 2/3 belong to a different person, as it was in my case when I first experienced the issue.

Not really sure, but I’ve been experiencing the problem here for a long time, and I’ve observed that if you do --reset-deltas (or upgrade Syncthing with https://docs.syncthing.net/users/config.html#config-option-options.sendfullindexonupgrade which I personally use), then the issue seems to disappear for some time, but it still comes back later, so I wouldn’t be surprised if the other folders will eventually display the same symptoms.

This isn’t that. It’s a star configuration. There are no intermediate folders – or does Device 1 <-- Device 2 --> Device 3 cause the problem?

It could be. As long as the folder isn’t shared between all devices and you ignore something somewhere in the middle, then you will be affected by the issue.

For the record, folder type shouldn’t make any difference here, and yes, you can connect Receive Only folders together :slightly_smiling_face:.

Connecting all the receive-only folders together got everything “up to date”. Then I manually deleted the unwanted .@__thumb folders from one of the receive-only folders on one of the Android devices. That caused this device to display “Revert Local Changes” and the device with the send-only folder again attempted to sync these “ignored” folders. So then I deleted everything in the receive-only folder, expecting it to be re-synchronized without the “ignored” files, but the “ignored” files were copied too. How do I fix this?

Reverting local changes shouldn’t download ignored files. Were the .@__thumb files ignored in the Receive Only folder on the Android device too?

Setting all the .stignore files the same on all devices cleared up the previous problems, but now the two recently-added Android devices are stuck attempting to sync with one of the other two Android devices, and the Out of Sync Items lists are empty. I doubt that anything is actually out-of-sync because all four Android devices are in sync with the NAS, which hosts a copy of all folders, including the send-only folders. Looks like another bug – is there a workaround?

Does the “out of sync” state persists even after restarting Syncthing? If yes, then I’d suggest to go the Android app settings, “experimental”, and “reset delta indexes” from there. This will force Syncthing to exchange indexes, which hopefully should fix the incorrect folder state.

OK, that worked. “Reset Delta Indexes” is under “Settings → Troubleshooting”. Thanks!

There are files that should be ignored in the receive-only folders, so I deleted the entire contents except for the .stfolder, .stignore, and the .stignore_global.txt file included by .stignore from one of them. This caused the folder to become out-of-sync, as expected, but it was not automatically re-synced from the send-only folder. Instead, the “Revert Local Changes” button appeared. Pressing that caused syncing of >1,000 items to begin. Two problems: (1) syncing is now stuck again with 14 out-of-sync .jpg files which should be synced, and (2) sync.ffs_db files, which should have been ignored (see original post), have been synced. Am I doing something wrong?

Update: It is syncing, but very slowly.

Update #2: Sync completed, and all are up-to-date. I don’t understand why nearly 1K items synced in a few minutes and then it took hours to sync the last 14.

Why are ignored files being synced, and how do I remove them from the receive-only folders?

Not really sure. Can you post full screenshots of the Syncthing Web GUI from all devices? Please make sure folder info is unfolded, and also list the final ignore patterns that are used for the folder on each device.

I’m going to test this myself, but I’d like to have a full view beforehand, so that I can try to replicate your configuration here.

I’ve found an error in my .stignore files that could explain the problems. I’m retrying syncs after correcting it.

What exactly causes the “Override Changes” button to appear? It seems to have correctly synced a folder on one of the devices. Does it delete ignored files on the receiving folder? That’s what I need to accomplish.

You will see the “Override Changes” button when the folder content on at least one of the remote devices doesn’t match the local Send Only folder. I don’t think using it should touch ignored files, but as mentioned previously, I’d like to test this myself before making any definite statements here.

I deleted one of several receive-only folders on a device. I got the “REVERT LOCAL CHANGES” button on the device, not the “Override Changes” button on the send-only folder.

The configuration is large, and on 5 devices.

When you add files locally to a Receive Only folder, the GUI will show the “Revert Local Changes” button. When a remote device does the same and the local folder is Send Only, then you will see the “Override Remote Changes” button.

In general, if you set the folder on one side to Send Only, and on the other side to Receive Only, then the synchronisation is going to be strictly one-way.

I removed the receive-only folder syncthing configuration on the four devices, deleted the folder contents except for the .stignore files, and reconnected them to the send-only folders. The first two devices synced completely, but when I added the second two, the first device began reporting 50% synced:

All the receive-only folders (DISASTER, Music, Pictures) are interconnected. The amount of data reportedly out-of-sync indicates that the receive-only folders are involved.

Restarting and Reset Delta Indexes did not fix the problem.

I tested adding/deleting files from the send-only folder. This appeared to work, but now the Music receive-only folder on K Tab A8 is stuck:

and the corresponding receive-only folder is showing Revert Local Changes.

I gave up and reverted to syncing the Music and Pictures receive-only folders with FolderSync Pro for Android. All worked OK (except for my .stignore error) when synced all folders among 3 devices, but wouldn’t work as described when syncing among 5 devices. One receive-only folder (DISASTER) syncs OK among 5 devices, so it seems the bug(s) are related to the size of the folders and the number of devices.