Configuration is not properly synced

Hi,

This bug is crossposted between AnkiDroid and anki’s forum. It occurs with 2.1.35 anki and current master (15.alpha?) of ankidroid.

Reproduction steps:

  1. In ankidroid’s card browser, search for “A” and save this search as “A”
  2. Sync ankidroid, then anki
  3. In anki, open the browser. Remark that “A” is not listed as a search. Create a search “B” and save it as “B”.
  4. Sync anki then ankidroid
  5. Open ankidroid card browser and look at the list of saved search. It contains B and not A.

Ideally, in step 3, A would have appeared in the card browser since it’s added in the configuration’s “savedFilter”. In any case, it should not have disappeared from Ankidroid at step 5.

The sync occurs in rust, I don’t understand it, so I’ve no idea exactly what occurs. I suspect at least that anki ignores the change in config and don’t believe it’s expected.

Edit, I can’t systematically reproduce, but I can’t figure out either what are the requirement for the bug to occurs. It seems to only occur when anki’s browser is opened during the sync, and only if I allowed add-on to load with anki. But sometime, the open browser update, even when add-ons are loaded.

Hi,

By starting Anki without any add-on, we understood that the bug is related to some add-ons. In my case, two popular add-ons Advanced Browser and Advanced Browser Sidebar along with a small add-on of mine, which calls mw.col.decks.allConf(), are the causes.
For Advanced Browser, sometimes it still works when I opened the browser while syncing.

The direction the config syncs currently depends on which side has the more recent modification stamp. Maybe the add-on is either saving something on a timer, or doing so before the sync starts?