02 November 2014

What to do if Apple Mail becomes invisible in OSX 10.10

Apple Mail is a solid application, but occasionally it can be infuriating.

Today, all of a sudden, when I opened it, the main viewer window would not appear. The program seemed to work fine in the background: I received notification of new emails, the unread count on the icon would get updated, but there was no window. Trying to use Exposé, "Bring all to Front", "Arrange all to front" wouldn't bring any improvement. Right-clicking on the icon and selecting "Show all windows" would show transparent squares with actual window titles, but trying to click on them would make no difference. File -> New Viewer Window seemed to produce new "transparent" windows, so the list under the Window menu would get longer but I still wouldn't see anything. Using Applescript to resize and reposition a window gave very strange results, with the window appearing half-broken (no Preview column, no Mailbox list, missing toolbars etc) and eventually disappearing again.

Out of desperation, I quit Mail and started digging in the filesystem. I eventually managed to fix the problem by doing the following:

cd /Users/your-user/Library/Containers/com.apple.mail/Data/Library
# 'tar' is just for safety, delete the gz file if fix works
tar -czvf ~/Desktop/Preferences.tar.gz Preferences
rm -rf Preferences


When I then launched Mail, the Viewer window finally appeared and worked correctly. It had lost my original layout, so I had to set a couple of preferences again, but apart from that it seemed to work well and it didn't lose any mail or account information. 

8 comments:

Anonymous said...

Hi, I am having the same problem and while I do not feel I am a complete ludite, I cannot find the file you refer to and I am not entirely sure which bit to delete. Can you re-post in words of one syllable for the hard of understanding please...

toyg said...

Hi, I think there was a mishap with publishing the path. I've now changed it -- look at it again, make sure to replace your-user with your actual username. You will have to open Terminal and type the commands I mentioned (replacing your-user with your username).

toyg said...

Note also that Preferences is not a file -- it's a folder.

Phil Fox Rose said...

This just happened to me in the update to the El Capitan beta today (7/23/15). Your fix, which I found by googling "mac mail becomes invisible" worked like a charm. Thank you! I wish I didn't need to delete the whole directory, but I tried removing just a few files I thought might be responsible and messed things up more, so I just bit the bullet and got rid of it all. Will have to redo some stuff, but I'm back up and running. Thanks again.

Unknown said...

Hi. I can't figure out how to do this. I am not good with terminal. Can you help more precisely. Any windows show in mail. Even not the preference pane in any of my spaces. Why ?
Thanks

Arnold said...

Hi,
tried this fix and it did not bring back my windows :-( When I went browsing in the Preferences directory I noticed an interesting directory named 'Saved Application State' and wondered if this would bring some possible effect.

Tried:
cd Library/Containers/com.apple.mail/Data/Library/
tar -czvf ~/Desktop/SavedApplicationState.tar.gz Saved\ Application\ State/
rm -rf Saved\ Application\ State/

Restarted Mail and window was immediately there :-)

Anonymous said...

The above worked perfectly for me.. Thanks a lot.

Anonymous said...

The above from Arnold worked perfectly for me too.. Many thanks.