Sunday, October 30, 2016

Dropbox Selective Sync Bug, or How It Took a Whole Evening to Update My Profile Photo

I encountered a pretty bad Dropbox bug today. I'm wondering if anybody else has encountered anything similar, and also wanted to share how I got around it in case it happens to anybody else.

This evening I was changing my Twitter profile photo back to the usual photo, as one is wont to due on a Sunday evening while procrastinating work. I was horrified to discover that the photo was nowhere to be found. In fact, my entire "photos" folder containing all of my key photos of the last few years was gone. It was not in my machine's Dropbox folder, not in any of my machines' Dropbox folders, and not on the Dropbox website.

I was not entirely surprised. Over the last few months I've been having some problems maintaining a shared Dropbox folder between my Linux and Windows partitions. I think the main problem is that Dropbox for Linux is simply not very good, but the fact that my use case is so fringe probably doesn't help. My trajectory of use has gone something like this: set things up according to some blog post; enjoy file sharing across partitions for some time; start getting strange error messages about starting Dropbox on Linux; sit helplessly and watch as something strange happens. Previously, the "something strange" involved Dropbox failing to work anymore. This time, involved my files failing to exist anymore.

Bug: selective sync doesn't uphold its end of the bargain. This latest episode of something strange happening had to do with my using the "selective sync" feature. This feature supposedly allows users to select which folders each machine syncs with Dropbox, allowing users to store terabytes of data on Dropbox (because that's what we're paying for) without needing to eat up terabytes of data on each machine. When you choose to selectively sync, an icon appears assuring you that the files are disappearing only from your machine, and not from all of Dropbox. Except, in my case, the files disappeared from all of Dropbox. I assume what happened was that the selective sync had registered as a deletion, but not a proper deletion, or otherwise it would have made it easier for me to retrieve the files.

Fix: do sketchy things to get at files. After sending Tech Support a strongly worded note about how-could-they-lose-all-my-files, I started poking around the Dropbox website. I discovered a "Deleted Files" section that allows you to restore files you deleted up to a month ago. Restoring here recovered many of the missing files, but not all of them. (After all, I had lost the files through a bug, and not in some normal way of deleting files.) I then went to the "Events" page and confirmed that there had been an event October 2, after syncing my Linux partition, that involved the deletion of over 1000 files. (Thanks, Dropbox, for not sending me a message asking if I was sure this was something I wanted to do.) Still no sign of the "photos" folder and the desired new/old profile photo. All I needed was a link to the folder. Once I had that, I could request to restore the files.

After this, I was almost out of ideas when I realized that some of my Dropbox "shared" folders had been subfolders under the "photos" folder, and that the Dropbox website has a separate section for managing "shared" folders. (When other people share folders with you, you can choose whether to actively add the folders to your Dropbox. I had un-added most of my folders before I upgraded to more space.) So I went there and and restored these folders. Then I looked in the "Recents" tab and there it was, a link to the "photos" folder, corresponding to a notification that subfolders had been re-added to my Dropbox. Now that I had a link to the "photos" folder, I was able to click on the "show deleted files" icon. Once I was able to see the deleted files, I was able to restore them. (And I've been doing them one subfolder at a time, while writing this post, because there are bugs when I try to do multiples at a time...)

And this, ladies, gentlemen, and people who identify as neither ladies nor gentlemen, is the story of how I changed back my Twitter profile photo.

Conclusions. All software has bugs, so I can't be particularly angry with Dropbox, but there are many ways in which Dropbox can improve user experience with respect to this particular situation. Here are my main takeaways:
  • Until Dropbox pays more attention to their Linux product, one should be wary of selective sync. (Dropbox! We're paying so much money for this! The least you could do is to not put us through these emotional roller coasters by deleting our files after promising not to.)
  • If you're not getting what you want out of a user interface, it may be possible to do sketchy things until you can get where you want to go. But Dropbox could also improve its interface for accessing files that may have been disappeared against the will of the users.
  • There are tradeoffs to using something like Dropbox instead of managing your file backup yourself. On the one hand, you give up control and are subject to their bugs wiping out your entire digital photo archive. On the other hand, respectable companies do keep a lot of backups and with some work you should be able to recover things. So, thanks Dropbox for not deleting these files altogether, even though you really didn't make it easy for me to find them.
And, of course, this brings us to my main points in life. We need to understand our software better! Better languages and tools would allow programmers to better understand what is going on, making these kinds of strange bugs less likely! Allowing programmers to express high-level policies about consistency and desired system behavior would also decrease the prevalence of these kinds of situations! Instead of funding Dropbox, maybe people should fund programming languages research kthxbai!