Android Sync Overwrote Newer Files On Other Hosts


TiZ

Recommended Posts

Okay, so I have bittorrent sync in use on three computers: a personal server, a laptop, and my workstation, all running Linux; as well as my Android phone. I have trusted BTSync since around 1.2.82, and was very happy with it then, until the phone update forced me to the 1.4 series.

 

I had to reconfigure Sync entirely, but it wasn't working badly until just now. I use todo.txt. I have recently dropped Todoist in favor of it because with it and conky, I can get a persistent view of my completed tasks. Seeing your done list grow is just as important as seeing your to-do list shrink, after all.

 

Until my phone decided to get in on the sync action, and then arbitrarily, for no discernibly good reason, decided that the outdated todo.txt and done.txt files it had were the newest versions, and overwrote the todo.txt and done.txt I had been working with the whole day.

 

Luckily, I was able to restore those files thanks to the sync archive. If not for that, I'd be pretty livid right now. But I'd like to try and get some prevention here; I don't want to get caught with my pants down if something more important gets overwritten, or something gets overwritten and I don't notice until it's too late. What information do you need from me to diagnose this?

Link to comment
Share on other sites

I came across this bug and was able to reproduce it easily, debug logs mailed.  My setup: Win7 BTSync 1.4.83 Beta, Android (moto x) app 1.4.50.0.  Here's the scenario:

 

Started with a new file on desktop.  Waited until all changes mirrored successfully on phone. -> ok.

 

Made edit on phone.  Waited until all changes mirrored successfully on desktop -> ok.

 

Made new edit on desktop. Changes overwritten by out-of-date phone version!

 

One possible clue:  The time stamps on my phone and computer differ, with the phone ahead by about 2 minutes.  If device time-stamps were being used to judge the "newer" file, than the faulty behavior makes sense:  The phone still has the "newer" file, because I made the desktop edit in the duration where desktop time was still behind the timestamp of the phone edit.

 

Keep in mind asking the user to have perfect time synchrony between devices is almost impossible.  In my case, Windows is setup to automatically synchronize with the 'time.windows.com' server, and similarly, my phone is also setup to use the network provided time.

 

If there's confusion about the newer version of a file, it should be flagged and manually dealt with.  Silently overwriting user information is never the correct answer.

 

BTW, bug aside, I quite like the program.  Easy to setup, nice UI (Better than owncloud, which I also set up and chose BTSync over) Wish we could choose folder pairs on the android app, instead of being restricted to one download folder, but I understand Android restrictions may play a part there (if not, give us a choice!)

Link to comment
Share on other sites

  • 2 weeks later...

On my Android phone, the app Simpletask Cloudless, a todo.txt client, was connected to the issue, so I checked to see if that app was doing something absurd like setting todo.txt and done.txt as recently modified just for looking at it. So after making sure that every device had the same base todo.txt, I made a filler task on my work computer to get destroyed in the sync process, which meant its todo.txt was modified and was officially the newest version. My laptop was nearby and received it fine. I then opened Simpletask on my phone before they were re-synchronized. I then left it and went to Sync, and it did its work. The newer todo.txt got overwritten. So at that point it could have been Simpletask or Sync. I killed Simpletask, then made another task on my work computer, rendering todo.txt newer once more. The laptop received it again just fine. I opened Sync on my phone again without touching Simpletask. It was overwritten again. So this isn't Simpletask; this is entirely Sync's fault. Problem is, there's no option to get debug logs on android, so I have no way of knowing why the android version insists that its files are the newest versions.

 

But then my workstation randomly did it too one day. I don't have a debug log; debug logging wasn't enabled at the time that it happened, and I haven't reproduced it since. I'm not sure how to reproduce the conditions under which it happened, because it seemed like everything was going well until then. I feel with my workstation in particular, it may be connected to a separate issue I'm having; on my workstation, which I just leave on forever, BTSync just straight up freezes up after I leave it on long enough. So I have to kill -9 it. I actually have a thing in my crontab that kills and restarts it because I know it's always going to freeze up. I have the android version set to auto-sleep to save battery, so I wonder if these issues are connected. I'm guessing that when they wake up they're all like "HEY I HAVE THESE FILES WHO WANTS THEM COOL HERE" and don't really care about whether or not their files are actually the newest ones or not.

 

I don't know if it's relevant, but the todo.txt folder is part of a nested share on the desktops; There's ~/Documents that gets synced, and ~/Documents/todo that also gets synced, but it is only a separate share because Simpletask Cloudless doesn't let you choose a folder.

 

Between the data integrity issues and the freezing issue, both of which I'm not sure how to track down, I don't think I trust BTSync anymore. It used to give me everything I needed too. :/

Edited by TiZ
Link to comment
Share on other sites

@traycerb

Please follow support instructions in order to resolve issue / find the root cause.

 

@TiZ

I understand that Sync is far from ideal, though team works hard to make it more reliable and stable. Let me know if you are still willing to help us to debug your issues.

Link to comment
Share on other sites

  • 1 month later...

Just upgraded to Windows 4.103 (Android app v 1.4.56.0) and unfortunately it still has the same problem.  In this case, I only edited the desktop file (didn't touch anything on the phone), and when the desktop app synced to my phone, the file reverted.  I saw the balloon popup saying syncing was starting, and then, as my editor reloads the file if it changes on the disk, I saw the editor revert to an older version.  :(

 

Also, please relay to the help desk that the Android app doesn't have debug logs.  When I submitted this originally, the help desk asked me to upload Android debug logs, which, AFAIK, isn't an option.

Link to comment
Share on other sites

Also, please relay to the help desk that the Android app doesn't have debug logs.  When I submitted this originally, the help desk asked me to upload Android debug logs, which, AFAIK, isn't an option.

The Android app does have debug logs! To send them, use the "Send Feedback" option. After you compose your message, you'll be asked if you want to attach debug logs with it.

For more information, please see Collecting Debug Logs

Link to comment
Share on other sites

The Android app does have debug logs! To send them, use the "Send Feedback" option. After you compose your message, you'll be asked if you want to attach debug logs with it.

For more information, please see Collecting Debug Logs

 

You're absolutely right; didn't see that text at the bottom.  The desktop upgrade didn't clear the sync log, so it might be pretty long, but should include the time of the error.  Should I upload the logs again?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.