Unable to sync anking with ankihub

Before the error happened, I was…
I just renewed my ankihub subscription after a long time and I can’t sync anking, other deck are syncing normally

Error message (don't change this)
Anki 25.09.4 (d52ca669) (ao)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: Windows-11-10.0.26200-SP0

Traceback (most recent call last):

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 349, in _send_request_with_retry
    return send_with_retry()

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 326, in iter
    raise retry_exc from fut.exception()

tenacity.RetryError: RetryError[<Future at 0x2209c942dd0 state=finished raised ConnectionError>]


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 353, in _send_request_with_retry
    response = last_attempt.result()

  File "C:\Users\bashe\AppData\Local\AnkiProgramFiles\python\cpython-3.13.5-windows-x86_64-none\Lib\concurrent\futures\_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^

  File "C:\Users\bashe\AppData\Local\AnkiProgramFiles\python\cpython-3.13.5-windows-x86_64-none\Lib\concurrent\futures\_base.py", line 401, in __get_result
    raise self._exception

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 346, in send_with_retry
    return self.thread_local_session.get().send(request, stream=stream, timeout=timeout)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\bashe\AppData\Local\AnkiProgramFiles\.venv\Lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)

  File "C:\Users\bashe\AppData\Local\AnkiProgramFiles\.venv\Lib\site-packages\requests\adapters.py", line 700, in send
    raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ankihub.s3.amazonaws.com', port=443): Max retries exceeded with url: /ankihub_addon_logs_bashnq_1787129470.log?AWSAccessKeyId=AKIASSGURO7AU2A7QZOX&Signature=YmxghVNTkoJSgsNeXoP8YDg93pM%3D&Expires=1787129653 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000002209452DE50>: Failed to resolve 'ankihub.s3.amazonaws.com' ([Errno 11001] getaddrinfo failed)"))


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "C:\Users\bashe\AppData\Local\AnkiProgramFiles\python\cpython-3.13.5-windows-x86_64-none\Lib\concurrent\futures\thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)

  File "C:\Users\bashe\AppData\Local\AnkiProgramFiles\.venv\Lib\site-packages\aqt\operations\__init__.py", line 243, in wrapped_op
    return self._op(mw.col)
           ~~~~~~~~^^^^^^^^

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\gui\errors.py", line 104, in <lambda>
    op=lambda _: _upload_logs(key),
                 ~~~~~~~~~~~~^^^^^

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\gui\errors.py", line 579, in _upload_logs
    client.upload_logs(
    ~~~~~~~~~~~~~~~~~~^
        file=log_file_path(),
        ^^^^^^^^^^^^^^^^^^^^^
        key=key,
        ^^^^^^^^
    )
    ^

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\addon_ankihub_client.py", line 98, in upload_logs
    s3_response = self._send_request("PUT", API.S3, s3_url_suffix, data=log_data, is_long_running=True)

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 312, in _send_request
    return self._send_request_with_retry(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        prepped,
        ^^^^^^^^
    ...<2 lines>...
        is_long_running=is_long_running,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^

  File "C:\Users\bashe\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 355, in _send_request_with_retry
    raise AnkiHubRequestException(e) from e

1322529746.ankihub_client.ankihub_client.AnkiHubRequestException: AnkiHub request exception: HTTPSConnectionPool(host='ankihub.s3.amazonaws.com', port=443): Max retries exceeded with url: /ankihub_addon_logs_bashnq_1787129470.log?AWSAccessKeyId=AKIASSGURO7AU2A7QZOX&Signature=YmxghVNTkoJSgsNeXoP8YDg93pM%3D&Expires=1787129653 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000002209452DE50>: Failed to resolve 'ankihub.s3.amazonaws.com' ([Errno 11001] getaddrinfo failed)"))

Sentry link (for developers)

Hello,

Please restart Anki and let us know if you continue to experience this issue repeatedly.

I’ve tried restarting it multiple time, made sure I’m using the latest version of anki and ankihub add on as well, it changed nothing

This is usually caused by local network issues. Please try:

  1. Check if you have any VPN or proxy settings configured and try disabling that. See the “Disable Proxy” part of this video: https://youtu.be/NTTlVmoGXPo?t=32
  2. Make sure you have the latest Windows updates installed.
  3. Try updating to the latest Anki release: https://apps.ankiweb.net/
1 Like

I have tried this and it didn’t solve the issue, I also spent a long time trying to fix the issue using chatgpt, here is the summary of what chatgpt thinks the problem is + what I’ve done (in case it can be used as a clue):

“I’m having an AnkiHub connection issue on Anki 26.08.1 (Windows 11). The add-on is supported on this version.

The error is:

NameResolutionError: Failed to resolve 'ankihub.s3.amazonaws.com'

I tested ankihub.s3.amazonaws.com and api.ankihub.net using Cloudflare, Google, Quad9, and OpenDNS; all return NXDOMAIN / Non-existent domain. ankihub.net itself resolves normally.

The issue also occurs on my phone’s mobile hotspot. I’ve flushed the DNS cache, confirmed the hosts file is clean, and confirmed there is no proxy, VPN, or DNS-filtering software.”

I’ve solved the issue!
Seems like my internet provider is blocking one of the server domains needed to download updates, syncing while a VPN is running solves this issue. I hope this helps someone in the future :D.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.