About

This site deals with technicalities of web development and content management systems. I also try to touch upon content strategy, ECM, DMS, and other related fields. 

I try to publish something new every two weeks alternating between topics.

Navigation
Social
« Why I use Twitter more than Google+ | Main | How to get Mac OSX VPN to work with BT Home Hub 2.0 »
Sunday
Jul312011

How to fix OSX Lion Mail upgrade failures

I just updated my MacBook Air to Lion, and found that I couldn't open my mail. It was trying to upgrade the mail databases to use a new format, and failing silently then quitting. Running Mail.app from the Terminal gave me this: 

Last login: Sun Jul 31 12:18:53 on console
Antony-Hutchisons-MacBook-Air:~ antonyh$ cd /Applications/
Antony-Hutchisons-MacBook-Air:Applications antonyh$ ./Mail.app/Contents/MacOS/Mail 
2011-07-31 12:21:23.164 Mail[320:707] Using V1 Layout
2011-07-31 12:21:30.508 Mail[320:3303] Upgrading Library from 4.93 to 4.93
2011-07-31 12:21:34.428 Mail[320:3303] *** Assertion failure in -[MFMailMigrator _migrateFromV1ToV2Layout], /SourceCache/Message/Message-1244.3/Library.subproj/MFMailMigrator.m:698
MailAccounts were initialized before migration from V1 to V2!
(
0   Message                             0x00007fff8ffabfdb -[MFAssertionHandler _handleFailureWithPreamble:description:arguments:] + 116
1   Message                             0x00007fff8ffac171 -[MFAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 185
2   Message                             0x00007fff8ffb00dd -[MFMailMigrator _migrateFromV1ToV2Layout] + 392
3   Message                             0x00007fff8ffae465 +[MFMailMigrator migrateFromV1ToV2Layout:isComplex:progressDelegate:] + 87
...
(an so on)

Of course, most of this is just gibberish to most folk, the key phrase in all of this is 

MailAccounts were initialized before migration from V1 to V2!

To fix this, go to ~/Library (it's hidden by default in the OSX Lion Finder, you can use the 'Go' menu or use the Terminal), and then go to the Mail folder and remove 'Envelope Index'. By removing '~/Library/Mail/Envelope Index' it can then run and reindex the mailboxes. Then launch Mail again, and it should now work. Unfortunately it didn't, so I decided to make sure there wasn't a permissions problem. Using Disk Utility, run 'Repair Permissions' on the hard disk, then remove the Envelope Index again and relaunch Mail.

Again still not working. Next step was to go into System Preferences, then edit the mail accounts. I removed some inactive accounts, removed my MobileMe accounts (I had two identical for some reason) and re-added it. So now I have one MobileMe account, one Gmail account, and one Google Apps mail account. All three have mail, calendars, and and chat enabled. Run mail, third time lucky...

Et Voila, success! So in summary, for me to get mail working I removed 'Envelope Index', ran repair permissions using Disk Utility, and removed inactive and duplicate email accounts using system preferences. I hope this information helps anybody out there trying to upgrade their Mac computers to the latest edition of the operating system if they are having trouble with the Mail upgrade process.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.