Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail crash / Mountain Lion: "AddressBook datafile is a directory"

My Mail app began crashing yesterday -- a few days after upgrading to Mountain Lion. I posted the crash dump, but no resolution yet.


It crashes right away on starting up the app.


Today, I noticed the following Console message -- it appears every time I click on the Mail app:



7/31/12 10:34:12.815 AM Mail[4427]: -[ABAddressBook sharedAddressBook] Error: The AddressBook datafile is a directory!



I'm hoping someone on these forums can figure out the issue/resolution from this clue.


Thanks!

Posted on Jul 31, 2012 10:40 AM

Reply
31 replies

Oct 3, 2012 8:38 PM in response to parro55

Hi All,

I am also having this problem with Mail constantly (and I mean constantly) crashing. I've tried all of the above suggested fixes (where I could actually find the relevant files) to no avail. Is Apple going to fix this problem or what. I love my Mac but email is so crucial to our everyday lives now that I'm seriously thinking of changing to another brand. Anyone have any news?

Oct 8, 2012 9:28 AM in response to MARONJ

I also could not find the ~/Library/Containers folder until I revealed all the hidden folders/files. I opened terminal and typed:


defaults write com.apple.Finder AppleShowAllFiles TRUE


Then:


killall Finder


Which relaunched Finder.


My ~Library/Containers folder showed up then as a hidden file. After I had trashed the com.apple.mail file my mail started working properly. Then I typed this into Terminal:


defaults write com.apple.Finder AppleShowAllFiles FALSE


That hid my files again (I had to relaunch Finder again to see the change)


Also, as another note, I have two hard drives running two different Mountain Lion versions on my Mac Pro, and I had to trash the com.apple.mail folder from both drives for mail to work on either.

Oct 8, 2012 9:56 AM in response to jenncmatt

I tried this a few times with no success. The crux of the problem seems to be when Mail tries to find contacts, because the crash happens reliably while I'm typing in the "To:" field. After typing 2 or 3 letters, Mail crashes.


So far nothing has helped.


Given the number of posts here and hundreds of crash reports sent in, it's pretty sad that Apple hasn't figured out what's wrong.

Oct 8, 2012 1:27 PM in response to Stan Jensen

Um, I keep up to date with everything that the App Store says needs updating. The update I installed yesterday covered Mail, but had something to do with the display of Japanese characters.


The thing is that I have 2 Macs: an iMac 2010 and a MBA 2011, both running the exact same versions of all the system software and all the same basic Apple software, yet Mail is essentially non-functional on the MBA and works just fine on my iMac.


Based on my reading of all the posts in this and related threads, all sorts of different "solutions" are "working", but people then re-post to say the fix didn't last or suggest another "solution." There's something fundamentally wrong with Mail, and Apple needs to wake up and fix it. Unless they're abandoning their computer customers to focus on mobile devices.


I downloaded Sparrow, and although I don't like being linked in yet another way to Google, Sparrow works on my MBA, and Mail does not.

Oct 25, 2012 2:57 AM in response to snailspace

I had lost auto-complete when entering email addresses. My Contacts data (from iCloud) was fine but for some reason Mail had lost the ability to see it. This was a fresh install that worked fine for weeks and then just stopped. Note that I wasn't doing anything tricky either (Google mail, etc.)


The sean-chan post was what pointed me in the right direction. This folder ...

/Users/Chris/Library/Containers/com.apple.mail/Data/Library/Application Support/

... contains symlinks for these folders ...

AddressBook

iCloud

SyncServices

... the originals of which are located in here ...

/Users/Chris/Library/Application Support/


Once i recreated those symlinks I was back in business. I realize my problem is a tangent to this thread but I think folks might want to explore this Containers folder as it appears to be vital to how Mail finds things.

Jan 1, 2013 6:31 PM in response to sean_chan

This solved the mail issue for me - AND another issue I was having in iPhoto believe it or not - when I was trying to add in e-mail addresses to share a photostream, it would not autocomplete any of the addresses I had in my address book. Renaming the ~/Library/Containers/com.apple.mail folder has corrected that issue as well! Thanks Sean!

Jan 23, 2013 10:31 PM in response to hyperchris

This worked for me as well. Upon inspection of the original symlinks in my .../Data/Library/Application Support/ folder, the AddressBook and SyncServices links were broken (e.g. pointed to nowhere as in AddressBook ->). I recreated the AddressBook and SyncServices symlinks to point to the corresponding folders within the ~/Library/Application Support/ folder, and everything appears to be working now, whereas before Mail would crash on startup with the system log message, "Error: The AddressBook datafile is a directory!". Now, my address book entries work as expected when composing a new message.



Thanks for the hint!

Feb 25, 2013 6:04 AM in response to Sanjaya Kumar

Strangely, I've deleted the ~/library/containers/com.apple.mail folder and each time it's fixed the problem, and within a few days the problem has recurred again. I've run a repair on the drive from Disk Utility (booting from recovery partition). This time I did a reinstall of Mountain Lion - didn't fix the problem, but again I've deleted that folder and will see if it recurs again. Clicking on a contact in address book and selecting Send Email caused Mail to launch and crash, then crash every time it launched. Again, deleting that folder has fixed it for now - but I cannot understand why the problem keeps coming back.

Mail crash / Mountain Lion: "AddressBook datafile is a directory"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.