Debugging Sync Conflicts

I am encountering a sync conflict between AnkiMobile and AnkiWeb and am looking for more info.

  • I have not used Anki in a while, but cannot think of a reason why it would be out of sync. (In fact, I am assuming there can only be a very minor conflict, but I would strongly prefer not having to risk it.)
  • I went and checked AnkiWeb to make sure that I had not run into automatic account removal, but my account looks alive and is filled with the same content as expected.
  • I have restarted the iOS device as suggested in another thread here, but to no avail.

That means I now need to decide how the conflict should be resolved, but Anki is not presenting me the basis for that decision. Manuals for AnkiMobile as well as Anki on Desktop were pretty silent on this.

How do I find out what is causing the conflict?

Certain actions like changing a notetype, restoring from a backup, or when an inconsistency is discovered will force a one-way sync. After that, Anki just knows that it must sync in one direction, and not why. There’s no easy way to compare the two sides I’m afraid, though you could do so manually by downloading the collection into a new profile, and then checking review counts/card numbers and comparing.

I just know that it must sync in one direction, and not which :wink:

Could I create a new profile locally, sync it with AnkiWeb, export collections from both and then compare the contained sqlites against each other – or would they already differ substantially because of the newly created profile?

Yes, you could do that if you know how - the download is a verbatim copy, so there shouldn’t be spurious differences.

1 Like

Thank you. For the sake of completeness, below are all changes I have found (except for changes in sqlite system tables sqlite_stat1 and sqlite_stat4). They are in the col table and to be read as from local to remote:

  1. mod changed from 1672137280860 to 1672463451614

  2. scm changed from 1627565511941 to 1638007319608

  3. usn changed from 192 to 193

  4. ls changed from 1667192637863 to 1672463451614

  5. conf
    5.1. had lastUnburied change from 2235 to 2238
    5.2. included the following on local that was missing from remote:
    "backups":{"daily":12,"minimum_interval_mins":30,"monthly":9,"weekly":10},
    "ignoreAccentsInSearch":false

  6. models was identical

  7. decks
    7.1. had one deck change mod from 1667192641 to 1572685507 and usn from -1 to 0
    7.2. had all decks except “Custom Study Session” include the following on remote that was missing from local:
    "newLimit":null,
    "reviewLimit":null,
    "newLimitToday":null,
    "reviewLimitToday":null

  8. dconf was identical

  9. tags had all identical keys, but all values changed from -1 to 0

I don’t see any obvious schema differences from your description, so it’s not clear what triggered the conflict if you don’t recall importing a backup or using ‘check database’.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.