Anki keeps crashing? (New install, no add ons)

I’m trying to reinstall Anki (24.11) after installing a new operating system (Windows 11).

Every time I open the app, it flashes up and then immediately closes. I tried restarting my computer and the problem still wasn’t solved.

I tried holding shift while opening the program and it worked. However, when I tried to sync my decks from AnkiWeb it immediately crashes and closes after I press enter.

This was a fresh install with no add-ons. I’m really confused with what’s happening.

If none of the troubleshooting steps help, please do the following:

  1. Open anki in safemode in a terminal (anki --safemode).
  2. Press sync.
  3. Your anki crashed here.
  4. Copy the entire output (text) from the terminal into this forum. Please but them here like this:
    ```
    Your terminal output
    ```

The lines with ``` will disappear and a code block gets created.

C:\Users\Administrator>cd C:\Users\Administrator\AppData\Local\Programs\Anki

C:\Users\Administrator\AppData\Local\Programs\Anki>start anki.exe --safemode

C:\Users\Administrator\AppData\Local\Programs\Anki>Anki starting...
Initial setup...
Preparing to run...
2025-01-21 13:24:35,500:INFO:aqt.mediasrv: Serving on http://127.0.0.1:54202
Starting main loop...

This is the full log after the crash.

Does the same thing happen in the beta version posted to the beta testing section of this site?

Hi, sorry for the delayed reply! I tried installing the beta (25.01) and the same thing keeps happening.

When I was installing Anki, I got this error message:

Error opening file for writing: C:\Program Files\Anki\mpv.exe

And the only option it gave me was to cancel the installation.

I found a solution on Reddit to go into my Task Manager and stop mpv.exe from running. I did this and then Anki installed.

But now it seems the program will crash any time it tries to sync (including on startup?)

I found a solution!

The problem was that I had Google Chrome as the default browser on my laptop. I changed my default browser to Firefox and the problem was solved! I’ll close the thread now.

Can anyone tell me why the default browser would have any effect on anki? I don’t see why Anki would crash without a backtrace or error just because of some OS setting which sets configs not even related to Anki.

I don’t understand completely (I don’t know anything about programming), but I think Anki was syncing via Chrome as this was the default browser (In fact, it was the only browser on my laptop). For some reason, I think Chrome was causing the error.

Once I changed the all of the default browser settings to Firefox, the problems stopped.

I highly doubt it though considering the Anki app basically is its own browser (chromium).

I’m glad it works for you. The reason why I asked is that I’m not really satisfied with only knowing what solved it; I also like to understand why it was solved that way. Maybe someone here has any clue to that.

Actually, the problems just started again. I have no idea what’s going on, it just crashes every time I sync.