Question about sync conflicts

I’m not reporting a problem, or a bug (unless it happens to be one,) I’m just asking a question out of curiosity about how syncing works because something happened. Which is this:

This morning after waking up I had a great idea to change the opening sentence of a chapter, and I did so on my iPhone’s copy of Scrivener (I rarely use that except to read and maybe do light editing.)

Now, the laptop was off, so there was no second copy of Scrivener open.

This evening I’m working on the novel and take a look at that chapter: zoinks! the previous sentence was still there, and not my brilliant rewrite!

(I thought when Scrivener opens on the laptop it automagically syncs updates from the mobile version?)

Anywho, I decide check this out on the phone, closing Scrivener on the laptop (I do pay attention to some things) and then access iPhone Scrivener and it asks me to sync. I let it, and it does.

Back to the laptop (closing iPhone Scrivener so’s there no two instances of Scrivener open) and I open the Scrivener project and some syncing happens and it reports a conflict. (I don’t recall exactly how the syncing was inititiated, I think it automatically notified me that there were changes?)

There’s a conflicts folder now which has the old version of that sentence; the current draft has the revised version.

So, what was the conflict about? As far as I can see, everything synced perfectly, so why did it create the conflicts folder? (In case anyone asks, I have had syncing conflicts occur before in projects, but when I looked at the current draft it all seemed OK and so I just ignored the conflicts folder, at times sending them to Trash.)

Did I sync something at the wrong time?

I tried to reproduce it because I’m not 100% certain as to the procedures that ocurred after making that first edit on the phone this morning. I open iPhone Scrivener (laptop version had been quitted,) and edited that sentence again (after much consideration, I added the word “really.”) Shutting the phone down, again, and opening laptop Scrivener, and seeing… nothing changed.

File-----Sync----Mobile devices. “No changes to report” or some such thing. I guess I had to wait until Dropbox downloaded changes to the Mac. I facilitated this by shutting down laptop Scrivener, reopening the phone, and made the thing sync. So, yeah, yeah, shutting down blah blah, I opened the Scrivener project… and all is well. Changes synced and no conflcts.

That’s it. What caused the conflict? I’m 99% certain that I did everything the same during my reproduciing attempt. If anything was different, it was in the amount of time the syncing took place.

Did you sync your phone after making the original edit and before shutting down Scrivener on your phone?

Yes. Scrivener on my phone always does that. I make whatever edits and the changes get uploaded to Dropbox on closing.

I meant do you completely follow this process

’ * Edit on your Mac or Windows machine, and wait for the changes to be synced by the Dropbox desktop client.

  • Close the project on desktop and open Scrivener for iOS.
  • Tap the sync button to download any changes to your projects.
  • Begin editing the project on Scrivener for iOS.
  • When finished, return to the Projects screen and tap the sync button to upload any changes.
  • Reopen or return to the project on macOS or Windows.
  • Rinse and repeat.’
    From the L&L site, I’ve added bold to hi-light.

It sounds like you did. Perhaps it was just you didn’t allow enough time for sync to finish.

Without looking at the tea leaves and frog spawn of this deepest voodoo magic I’d have a hard time saying just what happened and why, but I have a theory.

When you woke your laptop up, you opened your scrivener project while/before Dropbox had finished updating. This the older local copy was loaded first. During the conflict check step of opening, Dropbox was up-to-date then. There was a mismatch between the local and cloud copies. Ergo conflict detected.

In many cases if the conflict happens on different parts then it processes the conflicts automagically and no residue is left behind. Only when the same sub-file(s) in both local and cloud copies disagree does a conflicted copy get saved. Each binder item has its own sub-file rtf. So if you’re working on Chapter Six mobile, and Chapter One on your laptop the conflict message might pop up but Scrivener should sort that out gracefully. But erroneous timestamps can get in the way of that, and when Scrivener can’t sort things out, it always saves a conflicted copy.

How do you process the conflicted copies? When I get hit with the conflicted copy blues, I use a diff checker to see what and where the differences are. I tend to use a programming IDE for this, but the one linked above is free to use and may prove useful. (And this sort of functionality has been on my Scrivener wish list for eons, but I digress).

This difference report helps me see where things are mismatched. It is especially good at seeing little edits that are hard to spot unaided. Like the addition or deletion of an extra carriage return, a comma-turned-period, a simple typo corrected and so forth. Frankly there’s nothing quite so frustrating as spending an afternoon quashing typos and saving, only for the edits to get replaced by a conflicted copy, meanwhile you proceed onward knowing you’ve killed a typo that ends up going to print.

Hope this helps.

You probably did. Dropbox may have been the culprit here. I have found that Dropbox on MacOS or Windows can sometimes take up to a minute to detect changes and background sync. It’s a timing thing of the automated agents. Network lag and/or other issues outside your control could be at play too.

I’ve gone to watch for the telltale badge on the Dropbox icon in the status bar to change to ‘sync’ and then vanish so I’m sure I’m working with the most up to date.

1 Like

There also appears to be a small lag between when a file is uploaded to the Dropbox server and when it’s ready for download to another device. Something to do with Dropbox’s internal accounting and error checking, no doubt.

In fact, that lag seems to be the most common cause of this kind of “innocent” conflict, where the user sees a reported conflict despite having apparently done everything right.

2 Likes

I believe so. I described what I did in the OP. The laptop was off; I made the edits on iOS, close the program there, then opened the program on Scrivener a few hours later. Many hours after that, I noticed the passage unchanged on the desktop version.

I think I grokked everything you said. It ws just one minor edit on iOS, and the changes uploaded to Dropbox right upon closing. Perhaps the issue was the syncing on the desktop version.

With regard to how do I process the conflicted copies? On this, it was easy as I had just altered one sentence. I just compared those two versions. But thanks for the diffchecker! Next time my edits are more complex, I’ll use that.