Bakgrund

Files deleted on Android devices will remain on Windows devices

Recommended Posts

I have noticed that the Resilio sync (home pro) does not handle deleted files between Android and Windows very well. I want to see if someone else has experienced the same thing and if it is by design, or if it is just a bug, and if so how to fix it.

Conditions:

  • I have a normal folder that is synced between a Windows 10 (1709) device and an Android 7.0 device.
  • Android app version 2.5.9, Windows app version 2.5.12. 
  • The folder is stored on an SD card on the Android device.
  • Both the Windows PC and the Android phone has read and write permissions. Not using selective sync.

If I delete a file on my Windows device, it will delete on both Android and Windows. As it should.

However, if I delete a file on the Android device using any file explorer/gallery/whatever app that isn't the Resilio Sync app, the file will be removed from the Android device ONLY, and remain on the Windows device as nothing has changed, even though I deleted the file on my Android device. However if I delete the file from the Resilio Sync app on Android, it will be removed from all devices just fine.

When I check the folder in the Resilio Sync app, the app lists the file as synced, even though it is deleted. It's like Resilio Sync on Android does not detect that the file has been deleted. Is this a problem with Resilio Sync not indexing files that have been deleted outside the Sync app properly on Android?

Edited by Bakgrund

Share this post


Link to post
Share on other sites

I just noticed this today that I'm having a similar issue, except between two Windows machines.  Looking at the date, it started happening with 2.5.10.  Adding files works in both directions near instantly. Deleting on Win10 doesn't remove from WHS 2011, but deleting on WHS 2011 is near instant delete on the Win10 box.

The sync.log is filled with unable to move "file" to trash, error 5.  And some error 3's.  I hate when debug is useless without a decoder ring.  I've tried restarting Resilio and rebooting. 

No alerts or issues showing in the GUI.

 

Not looking forward to spending an hour tracking down and deleting near 200 files over 2.5 months because Sync has really poor error handling and alerting.  Sync is really nice when it works, and a real PITA when it forks up, which seems to be a regular occurrence :( 

Share this post


Link to post
Share on other sites
On 2/23/2018 at 3:29 PM, Timbo said:

The sync.log is filled with unable to move "file" to trash, error 5. 

Error 5 is Window's "Access denied" error https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx SO check file's/ folder's permissions and .sync/Archive directory permissions 

Don't know what error 3 refers to though. 

In such cases better contact support with debug logs. Or at least run though the most common reasons : https://help.resilio.com/hc/en-us/articles/205450355-My-files-don-t-sync

Share this post


Link to post
Share on other sites

Unlocker reports no handles on the files in question.  There's no problems with permissions. I can delete them from Explorer on the same or remote machine just fine.  It just doesn't work with uTorrent anymore after BT sync design was changed.  When a torrent was completed and no longer being shared, it used to be able to be deleted no problem.  After some design change in Sync, you had to completely remove the files from uTorrent (remove data+.torrent).  I thought it was fixed after 3-4 versions, but doesn't appear so.  It seemed there was a way for the GUI to reflect that a file was locked and to keep retrying, but not in this case.  No indication of failing to delete hundreds of files over months. That's a design flaw if the user isn't made aware of problems and needs to take action.  Having to go through these logs should be in extreme corner case debugging, not intentional by design.

The log has dozens of entries for files that ALREADY exist with "- error creating on disk".  These are also files that should have been deleted long ago.  That makes zero sense.  It seems the logic is bad in some cases.

My best guess on the bug, is that if it got an "Access is denied" error, its latching it and never retesting it like it should for when a file is locked. You can probably add this Access is denied check to the same code that helped fix the File Locked problem.

 

Edit:  Correction. These files had the attribute "read-only" applied for some reason. It was only on one side and not the other (?!). Shouldn't read-only attributes also be sync'd to the remote side? If not, perhaps that was why the other side could delete things fine. I have no idea why these files are marked read-only.  It appears uTorrent caused this. Googling for uTorrent and read-only lead me to an advanced setting that was mysteriously changed to True:

bt.read_only_on_complete

However, not all files are being set to read-only and the randomness of this is why it took so long to figure out.  Anyways, I worked around by setting the uTorrent setting above to false, and deleting the files in Explorer (no prompting or hinting of read-only issue), or from command line, changing it to "del /f filename" to mass delete them from command line.  

So I would say the corrective action is to either flag a read-only file in the GUI for the user to deal with it manually, or just add "/f" to your del command to actually remove the file as the user intended.

 

 

 

Edited by Timbo
more info

Share this post


Link to post
Share on other sites
16 hours ago, Helen said:

Error 5 is Window's "Access denied" error https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx SO check file's/ folder's permissions and .sync/Archive directory permissions 

Don't know what error 3 refers to though. 

In such cases better contact support with debug logs. Or at least run though the most common reasons : https://help.resilio.com/hc/en-us/articles/205450355-My-files-don-t-sync

Error 3 is for file not found, as per that useful link you provided.  Which is the case.  It keeps looking for path\.sync\Streams for each of my syncs, and it doesn't exist.  There is a StreamsList, with timestamps of 2014 and 2015 in the ones I checked.  Perhaps its leftover code from earlier btsync...

Share this post


Link to post
Share on other sites

yes, i know that 3 is file not found. If it refers to \.sync\Streams it's totally OK, you don't have it. No, it's not a leftover from BTSync. 

Sync syncs files' alt streams and xattrs. If operating system does not support these, they are stored in \.sync\Streams. So if operating system supports these or there are no streams/xattrs on your files, you won't have \.sync\Streams. 

Share this post


Link to post
Share on other sites

Has anyone figured out a solution to this problem? I have know idea how I'm going to fix all the files I've been deleting on my android but aren't being deleted from my windows computer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now