Subject: Re: bug#32854: Error upon starting Emacs from macOS Mojave's Terminal: "Failed to initialize color list unarchiver"

From: Alan Third <[email-masked]>
Date: Thu, 25 Jul 2019 08:02:24 +0100

On Tue, Jul 23, 2019 at 09:31:55PM +0300, Eli Zaretskii wrote:
> > On Thu, Sep 27, 2018 at 05:23:22PM +0300, Evan Aad wrote:
> > > Ever since I upgraded my macOS to the latest version, 10.14 Mojave, a
> > > couple days ago (which I followed by performing a 'brew upgrade' in
> > > the Terminal), whenever I start Emacs from the terminal, I get the
> > > following error message.
> > > 
> > > 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}
> > > 
> > > I never encountered this message before. Despite the error message,
> > > Emacs starts opens, and seems to be functioning properly.
> > > 
> > > GNU Emacs 26.1  (build 1, x86_64-apple-darwin17.5.0, NS appkit-1561.40
> > > Version 10.13.4 (Build 17E202))  of 2018-05-31
> > 
> > Thanks for reporting this. I’ve just pushed a fix to emacs-26, so I
> > expect that will make its way through to homebrew soon.
> 
> Alan, what commit fixed this bug?  I didn't find any reference to
> bug#32854 in the Git log around Sep 28, 2018, nor any changes that
> sounded like they were fixing some color-related issue, neither on the
> emacs-26 branch nor on master.  Did you perhaps forget to push the
> change?  Or did I miss something?

The original discussion about it happened in emacs devel so there was
no bug number. The commit is:

    9ad0f1d15c06eb07dfbd9bd3e3b8a0d747942152

and if I’m reading the tags correctly it is definitely in Emacs 26.2.

What I’d suggest to Evan is to delete the colour file, as it’s
possible Emacs 26.1 has left a corrupt version:

    rm $HOME/Library/Colors/Emacs.clr
    
Then restart Emacs twice. The first time it will recreate the file and
probably not emit any error, the second time should let us know if the
error has gone.

-- 
Alan Third