Deleted "Out of Sync Items" - Syncthing Stuck

Here you go.

MEDIA-XPS … W530 stuck at 95%.

106 “Out of Sync Items” listed on MEDIA-XPS … all of these are files that were deleted. image

W530 … says everything is up to date.

did you enable ignoreDeletes config option?

No. I went to Actions > Advanced … Ignore Delete is unchecked on both devices.

1 Like

Can you please expand the folders on both sides and make screenshots again (mainly interested in local/global states).





I assume you already checked that the files listed as out of sync are deleted on both sides, otherwise do that first. Then could you please post the output of for one of these files on both devices (here are infos how to do that: [ How To ] call the REST API from Windows PowerShell).

Yes, the out of sync files are deleted on both sides - reconfirmed just now.

I’m trying to execute the command but am getting an error. $Headers gave me output showing me my API key so I assume I did everything up to that part correctly but db-file-get.html is failing.

The command I’m issuing is:

Invoke-RestMethod -Uri "http://localhost:8384/rest/db/file?folder=Portable Apps&file=PortableApps Platform\PortableApps\GoogleChromePortable\App\Chrome-bin\80.0.3987.87\80.0.3987.87.manifest" -Headers $Headers -Method Get -Outfile response.xml

The error it’s giving is:

The folder name is: Portable Apps

The file name is:

PortableApps Platform\PortableApps\GoogleChromePortable\App\Chrome-bin\80.0.3987.87\80.0.3987.87.manifest

You need to give it the folder ID, a string starting with zxg in your case. And if it still throws errors try using forward slashs as path separators.

Ok. I’ll give that a try. Could I also do a -reset-database on MEDIA-XPS to cause it to rebuild the database and resync all the files?

That seems like the nuclear option but thought I would ask.

Don’t for now please. That’s both a very extreme measure which will take a long time and might cause problems on its own, and it will delete any clues as to why this happened. The issue is most likely just cosmetic, sync still works. And there might be other ways to get it working again.

Ok, no problem. Tried with the ID and forward slashes … still getting an error.

Command is: Invoke-RestMethod -Uri "http://localhost:8384/rest/db/file?folder=zxg2x-f3imp&file=PortableApps Platform/PortableApps/GoogleChromePortable/App/Chrome-bin/80.0.3987.87/80.0.3987.87.manifest" -Headers $Headers -Method Get -Outfile response.xml

Error is:

Note that there is a space in the path. Could that be the problem?

On linux the quotes would take care of that, no clue about how windows handles it. Do you have https enabled?

Ok, made a little progress. I’m still not sure it’s getting the output you want to see though.

Command is now:

Invoke-RestMethod -Uri " Platform/PortableApps/GoogleChromePortable/App/Chrome-bin/80.0.3987.87/80.0.3987.87.manifest" -Headers $Headers -Method Get -Outfile response.xml

Resulting response.xml attached. response.xml (10.5 KB)

You are invoking the method against the documentation server, not your local syncthing instance.

Ok, that was a silly mistake. :slight_smile: Not sure what to do at this point. Happy to keep trying things though.

This command:

Invoke-RestMethod -Uri "http://localhost:8384/rest/db/file?folder=zxg2x-f3imp&file=PortableApps Platform/PortableApps/GoogleChromePortable/App/Chrome-bin/80.0.3987.87/80.0.3987.87.manifest" -Headers $Headers -Method Get -Outfile response.xml

Produces the following error:


Then it would be https://localhost...

No, “Use HTTPS for GUI” is unchecked in Actions > Settings > GUI.

This is my PowerShell script. Feel free to utilise if necessary.

$Folderid = "xxxxx-xxxxx"
$Filepath = "xxxxxxxxxxxxxx"
$Apikey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$Url = "$Folderid&file=$Filepath"
$Headers = @{"X-API-KEY" = "$Apikey"}
Invoke-RestMethod -Uri $Url -Headers $Headers -Method Get -Outfile rest.txt

It does not work with Use HTTPS for GUI and GUI Authentication Password though, so I just disable these temporarily when I need to use it.

Thanks tomaz86 - that allowed me to make some progress!

The script worked on W530 which is a Window 10 machine. Output attached: rest-W530.txt (1.0 KB)

It didn’t work on MEDIA-XPS though, which is a Windows 7 machine. Gave the following error: