Marcin's Musings

Random bits of stuff

Solving a "Login Loop" in Mac OS X Lion Due to Corrupt LaunchServices Cache

| Comments

Because it might help someone else Googling and it took me forever to find. I could no longer login to my account after a few system crashes due to bad RAM during the login process.

If you are suffering from a so-called “login loop” in Mac OS X 10.7 Lion - ie. you login to your account and then suddenly you’re back at the login prompt again - your LaunchServices cache might be corrupt.

If you check your Console from another user account and the Stack Trace for a bunch of login related processes (loginwindow etc) shows a crash in:

0       0x00007fff8fa7dd24 CSStoreGetUnit + 40

Then this may be the case.  Older articles around the internets refer to deleting the LaunchServices cache in /Library/Caches or ~/Library/Caches however on my Lion machine I couldn’t find this file.

Where you’ll actually find it is in:


Where XX and YY are random names - your user account will only have access to your own, you’ll need to look into each of the folders under “folders” and find which one is yours (ls -al will show ownership).

The ZZZ is your userid (a number - the first user on the machine is 501 and so on).

Delete this file and you should be able to login! 

Note that this cache stores all of your customised file associations and things like default browser - so you’ll lose those settings. It might even lose your “Login Items” you’ve configured, but I can’t be sure that wasn’t one of the other files I’d previously deleted that stored that :)

Took me about 3 hours of mucking around and searching for clues on the Internet to find that bugger!