Anki closes immediately after opening the browse window

Before the error happened, I was…
[Replace this text.]

Error message (don't change this)
Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-13.4.1-arm64-arm-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-08-02 19:13:17

Traceback (most recent call last):

  File "aqt.taskman", line 122, in _on_closures_pending

  File "aqt.taskman", line 71, in <lambda>

  File "aqt.taskman", line 90, in wrapped_done

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 33, in on_sync_done
    on_done(future_with_exception(future.exception()))

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/gui/auto_sync.py", line 74, in sync_with_ankiweb
    future.result()

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

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

  File "concurrent.futures.thread", line 58, in run

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/gui/sync.py", line 44, in sync_all_decks_and_media
    self._sync_all_decks()

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/gui/sync.py", line 73, in _sync_all_decks
    should_continue = self._sync_deck(ah_did)

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/gui/sync.py", line 89, in _sync_deck
    result = self._sync_deck_extensions(ankihub_did)

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/gui/sync.py", line 142, in _sync_deck_extensions
    if not (deck_extensions := client.get_deck_extensions_by_deck_id(ankihub_did)):

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 872, in get_deck_extensions_by_deck_id
    response = self._send_request(

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 207, in _send_request
    response = self._send_request_with_retry(prepped, stream=stream)

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 221, in _send_request_with_retry
    response = self._send_request_with_retry_inner(request, stream=stream)

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

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

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/lib/tenacity/__init__.py", line 314, in iter
    return fut.result()

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

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

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

  File "/Users/kaikokesh/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 244, in _send_request_with_retry_inner
    session.close()

  File "requests.sessions", line 799, in close

  File "requests.adapters", line 366, in close

  File "urllib3.poolmanager", line 223, in clear

  File "urllib3._collections", line 100, in clear

  File "urllib3.poolmanager", line 174, in <lambda>

  File "urllib3.connectionpool", line 496, in close

  File "http.client", line 965, in close

  File "socket", line 501, in close

  File "ssl", line 1301, in _real_close

  File "socket", line 495, in _real_close

OSError: [Errno 41] Protocol wrong type for socket

Sentry link (for developers)

Can you try deleting the ankihub addon and reinstalling and see if it still persists?

I just tried that. It is still happening. Specifically when open the browse window and try to select all or use other command functions the whole program closes. I then get a window that says “anki unexpectedly closed” I have uninstalled the app and deleted ankihub. What should I try now? I am not using a monitor btw

Does this still occur when ankihub addon is completely deleted?

yes it does

Can you install Anki version 2.1.64 and see if it resolves, this might not be an ankihub related issue