Emacs error "Failed to initialize color list unarchiver" when I call it in the terminal

Alessandro picture Alessandro · Sep 26, 2018 · Viewed 7.3k times · Source

I've just installed emacs on my MacBook Pro, but when I type "emacs" in my terminal I get this error :

Emacs-x86_64-10_10[5647:247335] Failed to initialize color list unarchiver: Error Domain=NSCocoaErrorDomain Code=4864 "* -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver" UserInfo={NSDebugDescription=* -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver}

Then emacs opens correctly, but I can't compile files because of this error.

Answer

nega picture nega · Sep 27, 2018

This is a known error for Emacs on macOS Mojave. Apparently Emacs has been using a deprecated, and now removed, API. You can follow the thread on the "emacs-devel" mailing list.

Edit 25 JUL 2019:

Since people still seem to be getting to this question, patches for this issue were pushed the emacs-26 branch as of Fri, 28 Sep 2018. The latest version of Emacs 26 (or greater) from source or https://emacsformacosx.com/ will work. If you're just now upgrading and you still get the error/crash with the latest Emacs, delete ~/Library/Colors/Emacs.clr and restart your new Emacs. Emacs will recreate a non-corrupted version of that file as documented here.