I’ve been having a number of troubles with sync between my Windows 10 PC version and the Android version running on my Moto z4 running Android 9 and now Android 10, finally including the March 1, 2020 security update; using Google Drive as the sync location. The sync problems have persisted for quite a while.
When I made the transition from CodeBook v3 to v4.0; sync wasn’t working at all after the upgrade (on both sides). I finally discovered that CodeBook had created multiple numbered directories on Drive, with the PC and Android phone updating different directories. I finally exported all entries from the PC version, deleted all directories on Google Drive, except for the one the phone was updating, then synced from the PC (It silently changed to using the only existing directory) and that seemed to have fixed that problem.
Now in the last month (before the 4.1) update, I noticed that sync would silently fail, entries on the PC would not appear on the phone and vice versa. I found nearly 90 .db shards in the Shards directory on Google. Sometimes when I added an entry on one side or the other, it would not be synced to the other side, but sometimes they were. It seems that there’s only one chance for something to be synced, though. If the sync fails (silently) then that entry will never get synced to the other side.
Finally, with the v4.1 update I have a chance to do something about it. I surmised that silent sync failures accessing one or another of the many .db files on Drive was causing some of my troubles; today, I exported all the PC entries to a secure USB drive on the PC side again and tried to “Merge” on both sides. All of the phone entries seemed to get to the PC, but a directory of PC entries wasn’t getting synced back to the phone, and the phone was reporting errors with one of the nearly 100 shard .db files on Drive. So I tried to “Merge” the Drive data back to the phone, which failed with a error saying email you guys. Finally, I chose “Restore”, which worked, with the missing directory being populated.
Then, as a test, I created an entry on the PC and synced both sides, PC first. The new entry appeared on the phone, so I deleted it on the phone and synced both sides again, phone first. The entry remains on the PC.
So now, believing I have all the entries on the PC, I “Overwrite” overwrote the Drive database, which consolidated all the .db files into one and synced again; which seemed to work, although the phone does not have the test entry I put on the PC and deleted on the phone, but the PC still has it.
I added a new entry on the PC and after syncing both side, PC first, it did appear on the phone.
I added a new entry on the phone and synced both sides, phone first, and the new entry appears on the PC. I deleted it on the PC and synced both sides, and the new entry disappears on both sides, but I still have an entry on the PC that was deleted on the phone and does not appear there.
All of this is shaking my confidence in your sync capability. It looks like Codebook silently tolerates sync errors and they cannot be corrected without Overwriting the whole set of files on Google Drive and then Restoring onto the other device. I don’t know yet, that I’ve lost any data, but with no way to do a backup on the phone, I have no real way to detect or correct the problem.