AnkiHub sync cancelled/failed

Hello,

I’m trying to help a colleague getting everything set up. She is using Anki 25.09.2 on Windows 10. When she first tried to synchronize with AnkiHub it got cancelled. Then I told her to restart Anki and create a new deck with a card. That helped in that sense that she could synchronize with AnkiHub for a second but then got an addon-error (error while downloading and installing deck).

It did not help either to have the deck (Anki Erlangen) sent and installed. Also it didn’t help to logout out of the Ankiweb account. Neither did the changing of the addon file adding a ā€œimport sys.maxsizeā€ line help.

After deleting the notetype the problem wasn’t solved.

She uploaded a log ā€œankihub_addon_logs_ca_ro_1766948670.logā€. Maybe you can have a look there and tell me how I can help her!

Thinking

Search
Found 0 results for ā€˜tags:official AnkiHub sync cancelled failed error while downloading and installing deck category::person_raising_hand: Support order:latest max_posts:20 status:open’

Search
Found 0 results for ā€˜tags:official error while downloading and installing deck order:latest max_posts:20 status:open’

Here’s how I’d systematically approach this with your colleague, given what you’ve already tried:


1. Basic sanity checks

  1. Confirm core requirements

    • Anki Desktop: 2.1.65+ is usually recommended for best compatibility.
      → She’s on 25.09.2 (Qt6), which should work, but if nothing else helps, trying the latest stable from ankiweb.net is worth it.
    • AnkiHub add-on: Make sure she has the latest version from AnkiWeb (not an old local .ankiaddon file).
  2. Disable all other add-ons

    • Start Anki while holding Shift → this disables all add-ons.
    • Then go to Tools → Add-ons, re-enable only AnkiHub, restart Anki, and try:
      • Open AnkiHub add-on window
      • Log in
      • Subscribe to one deck (e.g., Anki Erlangen)
      • Sync with AnkiHub again

    This helps rule out conflicts (especially with add-ons that hook into syncing or note types).


2. Fully reset AnkiHub state (local only)

On her computer:

  1. In Anki:
    Tools → Add-ons → AnkiHub → Config
  2. In the config window:
    • Log out of AnkiHub if there’s an option / clear token if present.
  3. Back in Tools → Add-ons:
    • Select AnkiHub → click Config and View Files.
    • In the file explorer that opens, close Anki, then:
      • Delete any ankihub_*.json / cache files if present.
  4. Reopen Anki:
    • Log into AnkiHub again from the add-on.
    • Try subscribing to only Anki Erlangen.
    • Run AnkiHub sync.

If this works, the earlier error may have been caused by a corrupted local AnkiHub state.


3. Check for collection / deck issues

Since ā€œerror while downloading and installing deckā€ can happen when Anki has trouble modifying the collection:

  1. Check database

    • Tools → Check Database
    • Let it fix anything it finds.
  2. Try again:

    • After DB check, close and reopen Anki.
    • Try AnkiHub sync / deck install again.
  3. Test in a brand-new profile

    • File → Switch Profile → Add → create a ā€œTest_AnkiHubā€ profile.

    • In that fresh profile:

      • Install AnkiHub add-on only.
      • Log into AnkiHub.
      • Subscribe to Anki Erlangen.
      • Sync with AnkiHub.
    • If it works in the new profile → the issue is with her original profile/collection (possibly note types or prior partial AnkiHub install).

    • If it fails even in the new profile → likely environment-related (permissions, network, antivirus, etc.).


4. Windows / environment specifics

On Windows 10, these sometimes cause ā€œdownload and installā€ errors:

  1. Permissions

    • Ensure Anki is not installed in a protected folder with weird permissions (e.g., inside C:\Program Files with restrictions).
    • Anki’s data folder (shown under Help → About → Open File Location) should be writable by the user.
      • If it’s on a synced folder (OneDrive, Dropbox), try moving it off those services.
  2. Antivirus / Firewall

    • Temporarily disable third‑party antivirus or ā€œweb protectionā€.
    • Add exceptions for:
      • Anki executable
      • The Anki data folder
    • Then try the AnkiHub sync again.

5. About the ā€œimport sys.maxsizeā€ change

You mentioned adding import sys.maxsize to the add-on file. That’s not a standard or recommended fix and could introduce new problems depending on where it’s added. I’d recommend:

  1. Completely remove the AnkiHub add-on:
    • Tools → Add-ons → AnkiHub → Delete
  2. Restart Anki.
  3. Reinstall AnkiHub from the official AnkiWeb add-on page.
  4. Try again (ideally from a fresh profile for testing).

6. Using the log file

You mentioned the log ankihub_addon_logs_ca_ro_1766948670.log.

To help the AnkiHub team (and other users on the forum) debug:

  1. Ask her to:
    • Open the log file and copy the last 30–50 lines around the error, or
    • Attach the full log file to the forum topic (if not already done).
  2. In your reply to this topic, please include:
    • Whether the issue reproduces in a new profile.
    • The exact error message text from the dialog (and a screenshot if possible).
    • Confirmation that all non‑AnkiHub add-ons were disabled during testing.

With that, it’ll be much easier to see whether this is:

  • A known bug with the current AnkiHub version
  • A local environment issue
  • Or something related to the specific collection / note types.

If you can test the ā€œnew profile + only AnkiHub enabledā€ scenario and post the outcome and the tail of the log in this topic, I can help you interpret the next steps more precisely.

AnkiHub is the only addon she has installed.

Thinking

Read topic
Reading: AnkiHub sync cancelled/failed

Thanks for the clarification!

Since AnkiHub is the only add-on, I’d focus on ruling out collection/profile and environment issues next:


1. Test in a completely new profile

On her computer:

  1. File → Switch Profile → Add
  2. Create e.g. Test_AnkiHub.
  3. In that new profile:
    • Install AnkiHub from AnkiWeb (if it’s not already there for all profiles).
    • Log in to AnkiHub.
    • Subscribe only to Anki Erlangen.
    • Run AnkiHub sync.

Please report:

  • Does the same ā€œerror while downloading and installing deckā€ appear in this fresh profile?

If it works in the new profile, the issue is very likely with her original collection (corrupted DB / note types / partial deck install).


2. Check database in the original profile

Back in her main profile:

  1. Tools → Check Database → let it fix anything.
  2. Close and reopen Anki.
  3. Try AnkiHub sync / deck download again.

3. Confirm Anki & environment

Ask her to check:

  1. Anki version: Help → About
    • Confirm it’s exactly 2.1.65+ / 25.09.2 Qt6 official build, not a distro / custom build.
  2. Data folder location:
    • Help → About → Open File Location → ensure it’s not on OneDrive/Dropbox/iCloud etc.
    • If it is, move Anki’s data folder off cloud sync.
  3. Antivirus / security tools:
    • Temporarily disable third‑party antivirus / ā€œransomware protectionā€ / folder protection.
    • Try the AnkiHub sync again.

4. Log file details

The log you mentioned (ankihub_addon_logs_ca_ro_1766948670.log) will be key.

Please ask her to:

  1. Open the log file.
  2. Copy the last 30–50 lines around the error, or attach the file here.
  3. Also include:
    • Whether the new profile test succeeded or failed.
    • The exact full error message text (screenshot is ideal).

Once you can share:

  • Result of ā€œnew profile + only AnkiHubā€
  • DB check result
  • Tail of the log

I can help narrow down whether this is a collection-specific issue, a Windows/permissions problem, or something that looks like an AnkiHub bug that we should escalate.

It looks like the download is timing out. Does she have any issues accessing the website on a web browser? Common causes include network firewalls and slow connections. I recommend testing with a different network (if available) to narrow down the cause.

I don’t know what she did, but it seems like the problem is solved and she can sync!

Thanks for the help.