syncing: finishing: pull: generic error when using password encryption on folder

Seems like i am having the same issue as previous ones was made

In the logs, on both sides there is REQ(out) entries, but not a single REQ(in) appears.

As soon as i disable password encryption - everything works.

Logs attached: syncthing_receiver_model.log (329.2 KB) syncthing_sender_model.log (140.9 KB)

How to:

Set up 2 nodes, one with files, set password encryption for same folder id on sender and receiver one.

Previous issues:

https://github.com/syncthing/syncthing/issues/8843

The sender log does show the incoming requests. However you have protocol and not model debug logging enabled, that’s why there’s no REQ(in) logs.

Here are the logs where “Enabled debug data for “model”” is visible from both ends (and a password is set):

syncthing_receiver_model.log (29.3 KB) syncthing_sender_model.log (18.3 KB)

As soon as i remove password encryption, there are REQ(in) in logs:

syncthing_sender_model.log (33.4 KB) syncthing_receiver_model.log (60.4 KB)

Both nodes running 1.28.0, sender is Windows 11, receiver is Ubuntu 24.04

The sender log now is somehow truncated - there’s a bunch of empty lines starting 11:01:09 and then a few more lines starting 11:01:44, which clearly aren’t all the logs from that time (just the logs shown indicate there should be more related ones). Please check the logs yourself before sending that on both sides the timeframe where errors occurs is present and unaltered/truncated.

Here are full logs not truncated with model debug enabled:

syncthing_receiver_full.log (79.0 KB) syncthing_sender_full.log (56.3 KB)

~14:07 - started nodes - password is set for “test” folder

~14:09:30 - removing password for “test” folder

Interesting. It looks like the folder was paused at the time the requests failed – which explains the failure, but of course the requests should not have been sent at all since the receiving side should have known it was paused.

1 Like

I guess that doesn’t explain yet why it was paused. Resp. if it was paused, means there’s still the interesting question of why a request went out regardless, however then it’s not clear what @w7rus actual problem is: A paused folder wont sync regardless of if it’s receive-only or not, just need to unpause it. However probably there’s some other missing context?

As for sending requests to paused folders - one explanation might be an issue we have an open PR for already: When syncing we don’t check if the remote is paused, only if it’s connected. So if another folder isn’t paused, we still send requests there even though they will never work. Status there is author they’d look into a requested change the next day, which was 3 weeks ago (not criticising, 3 weeks is nothing, I am easily silent for longer every now and then :stuck_out_tongue: ). I’ll ping just in case it helps. fix(model): check if remote folder state is valid before pulling files (fixes #9686) by hireworksltd · Pull Request #9732 · syncthing/syncthing · GitHub

Whenever i add a file to a password protected folder, receiver tries few times to sync it and fails: Out of Sync

As soon as i remove password from the folder, after some time it sync the file correctly

I’ll record a video with steps that i do to achieve that issue and add it here later today.

No need for a video. And frankly if the video is longer than a few seconds I am not inclined to watch it anyway. Based on what @calmh said about the logs:

The question is quite simple: Is that folder paused or not? If it’s paused, unpause it and it should just work. If for some reason you can’t do that or problems come up, please explain why (maybe with screenshots).

The folder is not paused.

Sure will do screenshots later

I was probably misreading all the paused stuff. But,

This is not something that can be changed on the fly. Either it’s shared in encrypted mode or it isn’t, changing that requires removing the folder on the other side and adding it as receive-encrypted or vice versa in the other direction…

1 Like

I’ve set it up via adding a folder with the same folder id, and adding a password with Send & Receive mode enabled on both ends.

Here is the initial setup of “Test” folder:

Now i’ve added a file to “Test” folder on the sender side “w7rus-pc”:

And in a bit it enters following state:

After a while, receiver side retries to sync new file, but fails. It flickers few times with Syncthing state, and turns in Out of sync.

If both sides are Send & Receive, then there no reason to input any password at all. Setting a password is only required if you intend to add the folder on the remote device as Receive Encrypted.

2 Likes

I’ll remove password then if it has no use in such setup.

Yeah, the password has no use, however it should still be possible to set it on both sides and have the synchronisation functional. There was an older issue that looks very similar to the problem here (see https://github.com/syncthing/syncthing/issues/8277) but it was supposed to be fixed a long time ago.