ankitects / anki

Anki's shared backend and web components, and the Qt frontend
https://apps.ankiweb.net
Other
18.94k stars 2.14k forks source link

Anki would stop working if internet not found in Linux. #3395

Closed aaryansinhaa closed 1 month ago

aaryansinhaa commented 2 months ago

The terminal message:

Anki starting...
Initial setup...
Preparing to run...
Wayland support is disabled by default due to bugs:
https://github.com/ankitects/anki/issues/1767
You can force it on with an env var: ANKI_WAYLAND=1
Qt warning: QGuiApplication::setDesktopFileName: the specified desktop file name ends with .desktop. For compatibility reasons, the .desktop suffix will be removed. Please specify a desktop file name without .desktop suffix 
2024-09-01 09:56:14,797:INFO:aqt.mediasrv: Serving on http://127.0.0.1:36601
todo: windows paths in import screen
Starting main loop...
mpv not found, reverting to mplayer

Anki shows no error, rather goes into a loop if no internet found, linux would kill the process because of this. Makes it confusing for new users to figure out the problem

ilkermeliksitki commented 2 months ago

@aaryansinhaa did you try to upload mpv?

krischerven commented 2 months ago

FWIW I can't reproduce this on Fedora GNOME 46, kernel 6.10.7

GithubAnon0000 commented 1 month ago

On debian oldstable anki will freeze for a few seconds if wifi is enabled but internet access is blocked (firewall rule "deny"). Setting the firewall rule to "reject" makes anki think that no internet is available, thus anki won't freeze. The freeze occurs when clicking on the deck after opening anki and when going to the card browser.

dae commented 1 month ago

Anki needs to be able to communicate with itself via localhost. If you've blocked local communication, it won't be able to do that.