Sync produces incorrect Cards Due Count

I’m having an issue with synching between the iOS app and anki desktop. When I sync the two after reviewing the cards for the day, the desktop app resets the card count back to the limit. The reviews are not lost, but the Due count resets. It seems as if Anki is pulling cards from the backlog and making them due.

  1. Review Cards -> Review decreases or goes to zero
  2. Sync on iOS
  3. Sync on Desktop.
  4. After sync cards due count on Desktop goes to the limit for the day
  5. Sync on iOS
  6. Cards Due goes from 0 to the limit.

Example:

  1. Review Deck A - Cards Due: 0
  2. Sync on iOs
  3. Sync on Desktop - Cards Due:100
  4. Sync on iOS - Cards Due: 100

Did you make any changes since your post? I can’t seem to reproduce this when I set my computer and mobile device to use your timezone. Is the issue continuing on your end?

I haven’t made any changes. This has happened on several occasions. It’s a bit random which makes it harder to pinpoint. Are their any tests that I can run?

Here is the sync log: I think that the error occurred with the 10:53 sync

Jan 24 08:31:16.553 DEBG begin change check, db_mod: 1611495070, folder_mod: 1611495070
Jan 24 08:31:16.553 DEBG skip check
Jan 24 08:31:16.553 DEBG begin media sync
Jan 24 08:31:16.741 DEBG fetching meta…
Jan 24 08:31:17.026 DEBG server usn was 285822
Jan 24 08:31:17.321 DEBG fetched, state: SyncState { required: NormalSyncRequired, local_is_newer: true, usn_at_last_sync: Usn(7788), latest_usn: Usn(7790), pending_usn: Usn(-1), new_usn: Some(Usn(7790)), server_message: “”, host_number: 4 }
Jan 24 08:31:17.326 DEBG start
Jan 24 08:31:17.822 DEBG removed on remote, decks: 0, notes: 0, cards: 0
Jan 24 08:31:17.822 DEBG locally removed , decks: 0, notes: 0, cards: 0
Jan 24 08:31:17.822 DEBG applied server graves
Jan 24 08:31:17.822 DEBG unchunked changes
Jan 24 08:31:17.822 DEBG gathering local changes
Jan 24 08:31:17.823 DEBG sending, tags: 0, deck config: 0, decks: 0, notetypes: 0
Jan 24 08:31:17.944 DEBG received, tags: 0, deck config: 0, decks: 1, notetypes: 0
Jan 24 08:31:17.944 DEBG begin stream from server
Jan 24 08:31:18.112 DEBG received, revlog: 140, notes: 10, cards: 100, done: false
Jan 24 08:31:18.250 DEBG received, revlog: 24, notes: 0, cards: 0, done: true
Jan 24 08:31:18.250 DEBG begin stream to server
Jan 24 08:31:18.251 DEBG sending, revlog: 0, notes: 12, cards: 0, done: true
Jan 24 08:31:18.367 DEBG sanity check
Jan 24 08:31:18.403 DEBG gathered local counts; waiting for server reply
Jan 24 08:31:18.532 DEBG got server reply
Jan 24 08:31:18.532 DEBG finalize
Jan 24 08:31:18.674 DEBG media sync complete
Jan 24 08:35:16.665 DEBG begin change check, db_mod: 1611495070, folder_mod: 1611495070
Jan 24 08:35:16.665 DEBG skip check
Jan 24 08:35:16.665 DEBG begin media sync
Jan 24 08:35:16.826 DEBG fetching meta…
Jan 24 08:35:17.098 DEBG server usn was 285834
Jan 24 08:35:17.098 DEBG media sync complete
Jan 24 08:35:17.378 DEBG fetched, state: SyncState { required: NormalSyncRequired, local_is_newer: false, usn_at_last_sync: Usn(7791), latest_usn: Usn(7792), pending_usn: Usn(-1), new_usn: Some(Usn(7792)), server_message: “”, host_number: 4 }
Jan 24 08:35:17.378 DEBG start
Jan 24 08:35:17.489 DEBG removed on remote, decks: 0, notes: 0, cards: 0
Jan 24 08:35:17.489 DEBG locally removed , decks: 0, notes: 0, cards: 0
Jan 24 08:35:17.489 DEBG applied server graves
Jan 24 08:35:17.489 DEBG unchunked changes
Jan 24 08:35:17.489 DEBG gathering local changes
Jan 24 08:35:17.489 DEBG sending, tags: 0, deck config: 0, decks: 0, notetypes: 0
Jan 24 08:35:17.598 DEBG received, tags: 0, deck config: 0, decks: 0, notetypes: 0
Jan 24 08:35:17.599 DEBG begin stream from server
Jan 24 08:35:17.704 DEBG received, revlog: 0, notes: 0, cards: 0, done: true
Jan 24 08:35:17.704 DEBG begin stream to server
Jan 24 08:35:17.704 DEBG sending, revlog: 0, notes: 0, cards: 0, done: true
Jan 24 08:35:17.812 DEBG sanity check
Jan 24 08:35:17.838 DEBG gathered local counts; waiting for server reply
Jan 24 08:35:17.945 DEBG got server reply
Jan 24 08:35:17.945 DEBG finalize
Jan 24 10:53:08.595 DEBG begin change check, db_mod: 1611501659, folder_mod: 1611501659
Jan 24 10:53:08.596 DEBG skip check
Jan 24 10:53:08.596 DEBG begin media sync
Jan 24 10:53:08.758 DEBG fetching meta…
Jan 24 10:53:09.039 DEBG server usn was 285834
Jan 24 10:53:09.040 DEBG will upload, kind: addition , fname: 3b61d58c9b3fca0bab9ccd372fbc1816.jpg
Jan 24 10:53:09.309 DEBG fetched, state: SyncState { required: NormalSyncRequired, local_is_newer: true, usn_at_last_sync: Usn(7793), latest_usn: Usn(7798), pending_usn: Usn(-1), new_usn: Some(Usn(7798)), server_message: “”, host_number: 4 }
Jan 24 10:53:09.309 DEBG start
Jan 24 10:53:09.392 DEBG mark clean, fname:
Jan 24 10:53:09.422 DEBG removed on remote, decks: 0, notes: 0, cards: 0
Jan 24 10:53:09.422 DEBG locally removed , decks: 0, notes: 0, cards: 0
Jan 24 10:53:09.422 DEBG applied server graves
Jan 24 10:53:09.422 DEBG unchunked changes
Jan 24 10:53:09.422 DEBG gathering local changes
Jan 24 10:53:09.423 DEBG sending, tags: 0, deck config: 0, decks: 1, notetypes: 1
Jan 24 10:53:09.537 DEBG received, tags: 0, deck config: 0, decks: 1, notetypes: 0
Jan 24 10:53:09.537 DEBG begin stream from server
Jan 24 10:53:09.604 DEBG media sync complete
Jan 24 10:53:09.687 DEBG received, revlog: 150, notes: 3, cards: 97, done: false
Jan 24 10:53:09.808 DEBG received, revlog: 29, notes: 0, cards: 0, done: true
Jan 24 10:53:09.808 DEBG begin stream to server
Jan 24 10:53:09.808 DEBG sending, revlog: 0, notes: 8, cards: 7, done: true
Jan 24 10:53:09.952 DEBG sanity check
Jan 24 10:53:09.980 DEBG gathered local counts; waiting for server reply
Jan 24 10:53:10.128 DEBG got server reply
Jan 24 10:53:10.128 DEBG finalize
Jan 24 10:53:18.278 DEBG begin change check, db_mod: 1611501659, folder_mod: 1611501659
Jan 24 10:53:18.278 DEBG skip check
Jan 24 10:53:18.278 DEBG begin media sync
Jan 24 10:53:18.476 DEBG fetching meta…
Jan 24 10:53:18.673 DEBG server usn was 285835

Please check the Anki version you’re using in the about screen, and if it’s not 2.1.38, please see if the issue persists after updating.

Yes, running 2.1.38.

Hmm, ok. The next time you sync from your iOS device after studying, please visit ankiweb.net and check what the due counts are showing there - do they match AnkiMobile, or are they reset? If they match AnkiMobile, if you subsequently force a full sync in the desktop version’s preferences (starting it while holding down the shift key to skip the automatic sync), and then choose “Download” to fetch a verbatim copy from AnkiWeb, do the counts then match AnkiMobile? Or are they reset after the full download?

2 posts were split to a new topic: Reviews lost after syncing deck with 130% ease with AnkiWeb