Anki Forums

Please sync again error endlessly

Whenever I start anki or try to sync I get a dialog with “Please sync again. If this message keeps appearing, please post on the support site.”

I’ve tried;

  • starting with shift held down
  • uninstall/reinstall the latest version (2.1.48)
  • hitting sync endlessly to the same result.
  • Check Database & check media

This is on a window laptop if that is relevant.

Thanks!

Please try removing your media.db2 file while Anki is closed. If you get the same error again after the sync completes, please send me a private link to the file and I’ll investigate why it’s not matching AnkiWeb.

https://docs.ankiweb.net/files.html#file-locations

I assume you mean collection.media.db2 as I didn’t find a media.db2 file. I removed it but the problem persists. You can get the db here.

Hmm, did you go through a sync after removing the file? The linked one is empty; I would have expected it to list the files on your local media folder if a sync had been performed after removing the file, starting Anki and syncing again.

I just tried it again to the same result:

% sqlite3 collection.media.db2
SQLite version 3.31.1 2020-01-27 19:55:54
Enter “.help” for usage hints.
sqlite> select count(*) from media ;
0

I removed the file, hit sync three times while in Anki and it gave the same error each time.

Sorry, I’d forgotten that it gets cleared when a syncing error occurs. Please run the following in the debug console and then paste it into a private message or anki.tenderapp.com

import json
print(json.dumps(os.listdir(mw.col.media.dir())))

https://docs.ankiweb.net/misc.html#debug-console

How do I send a private message?

There’s nothing here that looks confidential so I’ll just paste it here:

import json

… pp(print(json.dumps(os.listdir(mw.col.media.dir()))))

(removed)

There is a file d1090cfc520ffc01192b223c60759a87.jpg on AnkiWeb that your computer doesn’t seem to be saving. Could it be that your antivirus program is mistakenly removing it? If not, you can probably work around the problem by saving a file with that filename locally before the next sync.

I looked at my firewire logs and found that anki was triggering an error on udp port 63456 so I opened that port which stopped the firewall errors. I also created an empty file with that name in collection.media.

However I still get a sync error. Even if I fully disable the firewall I get the sync error. If I remove the empty file I still get the error.

Empty files don’t get synced - please try placing some content in that file.

Success! No sync errors. Many thanks! It would be great if there were better error messages on sync failure.

I don’t recall ever seeing this particular issue before. If it crops up again, there are some optional logs we can enable that may reveal more.