Error During Syncing from my Mac

Before the error happened, I was…
Trying to sync my Anki on my Mac. It will sync on my iPhone, but not MacBook even after changing internet connections.

Error message (don't change this)
Anki 2.1.66 (70506aeb) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-14.2.1-arm64-arm-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-05-02 06:06:15

Traceback (most recent call last):

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 247, in _send_request_with_retry
    response = self._send_request_with_retry_inner(

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/lib/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/lib/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/lib/tenacity/__init__.py", line 326, in iter
    raise retry_exc from fut.exception()

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


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 255, in _send_request_with_retry
    response = last_attempt.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/lib/tenacity/__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 270, in _send_request_with_retry_inner
    response = session.send(request, stream=stream, timeout=timeout)

  File "requests.sessions", line 703, in send

  File "requests.adapters", line 519, in send

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='app.ankihub.net', port=443): Max retries exceeded with url: /api/login/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x12d2d0df0>: Failed to establish a new connection: [Errno 61] Connection refused'))


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


Traceback (most recent call last):

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/gui/menu.py", line 186, in login
    token = ankihub_client.login(credentials=credentials)

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 276, in login
    response = self._send_request("POST", API.ANKIHUB, "/login/", json=credentials)

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 229, in _send_request
    response = self._send_request_with_retry(

  File "/Users/alexturner/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 257, in _send_request_with_retry
    raise AnkiHubRequestException(e) from e

1322529746.ankihub_client.ankihub_client.AnkiHubRequestException: AnkiHub request exception: HTTPSConnectionPool(host='app.ankihub.net', port=443): Max retries exceeded with url: /api/login/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x12d2d0df0>: Failed to establish a new connection: [Errno 61] Connection refused'))

Sentry link (for developers)

Are you still having this issue?

Yes

What can I do to fix this?

Do you have any firewall or antivirus software running?

I do not

Do you have any trouble accessing https://app.ankihub.net in your web browser? Can you try updating to the latest Anki version? https://apps.ankiweb.net/

I can access that link. When I try to update to the latest version, it prompts me to replace my current version. How can I do this without losing all of the cards I have made while it has not been able to sync?

I just fixed the issue by doing a hard reboot of my computer. Now the syncing will work.

2 Likes

You won’t lose your cards when you update, even without syncing.