Anki won't open on MacOS

What is the macOS version shown in Apple menu→About This Mac?

Maybe the error was “is a directory”, since this message often pops-up when a software is trying to read from a file, that there is something at the path of the wanted file, but it’s a directory, not a file.
So my guess is that somehow, a directory was created in the App folder, in place of a file that should have been loaded to launch Anki properly, which is why deleting this directory and re-installing from source solved the issue.
If this happens again, to debug this issue, I would recommend using strace to see what are the last files the applications tried to open just before freezing, and then checking them one-by-one to ensure they really are files, and not directories.

macOS Monterey Version 12.1

The layout of the .app folder has changed a few times, and the path mentioned above is a folder in 2.1.49, but not in the 2.1.50 beta.

@Nickie I tried an install on a different machine running 12.1, but can’t seem to reproduce this problem, and I’m afraid I’m not sure what might be causing it. The only other thing that might be worth trying is to rename your prefs21.db file in your data folder to something else, then start Anki normally - does that help at all?

https://docs.ankiweb.net/files.html#file-locations

Hi! I’ve had the same issue as you with my Mac after updating my Anki app. I’m having an issue with opening it with terminal. Can you please share exactly what I need to type into Terminal after the “%” ? I’m not very familiar with how this works. Thank you!

I think just typing anki then pressing Enter should work (because Anki should be in your PATH).
If it doesn’t work, try /Applications/Anki.app/Contents/MacOS/anki.

1 Like

It finally worked, thank you so much! The app was frozen when I first got it to open, but I force quit and then re-opened it while holding down “Shift” and everything looks good!

If it goes well when you hold Shift, it means that the issue is (most likely) an add-on. You can find out which one by disabling batches of add-ons until it works.

I’ve had a similar problem and for me the solution was to fix the permissions of my home folder by running:

diskutil resetUserPermissions / `id -u`

I hope this helps!

1 Like