Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gwhizkids

macrumors G5
Original poster
Jun 21, 2013
13,271
21,451
Upgraded to 11.1 last evening. Today, the Mail app decides to pull a disappearing act. The app remains on the dock, indicating Open. Right clicking the dock icon shows that there are windows “open”. I just can’t see them or get them to open from that contextual menu.

Closing, quitting and force quitting are ineffective to fix this, as is a restart.

I’ve seen some proposed solutions, usually involving removing the app icon from the dock and restarting mail from the applications folder, but none work.

Anyone figured this out?
 

chabig

macrumors G4
Sep 6, 2002
11,434
9,299
Weird. Zoom would normally bring offscreen windows back. Does your Mac think it has two displays? What does it show in System Preferences > Displays?
 

RondoReggie

macrumors newbie
Jun 1, 2020
8
4
Upgraded to 11.1 last evening. Today, the Mail app decides to pull a disappearing act. The app remains on the dock, indicating Open. Right clicking the dock icon shows that there are windows “open”. I just can’t see them or get them to open from that contextual menu.

Closing, quitting and force quitting are ineffective to fix this, as is a restart.

I’ve seen some proposed solutions, usually involving removing the app icon from the dock and restarting mail from the applications folder, but none work.

Anyone figured this out?
shift click mail icon to reset.
 

gwhizkids

macrumors G5
Original poster
Jun 21, 2013
13,271
21,451
Weird. Zoom would normally bring offscreen windows back. Does your Mac think it has two displays? What does it show in System Preferences > Displays?

Yeah it was not that. The app also became unresponsive. As noted, I was able to fix it using some terminal commands from the thread I link to below that I believe reset the plist for the app. Very odd. I assume it has something to do with the 11.1 update.

============================

[SOLVED] Mail.app opened, but nothing is displayed expect the menu bar at the top
https://r.tapatalk.com/shareLink/to...the-top.2272479/&share_type=t&link_source=app
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
I followed the link to the Terminal commands, and I didn't feel like deleting >10GB of mailbox content, so I just deleted the Mail.app caches, and that seemed to work:

Code:
rm -rf ./Caches/com.apple.mail

I hadn't force-quit Mail.app before running deleting the caches, and after I force-quit and relaunched it, I got the "Would you like to reopen windows from your previous session?" popup, which I had not gotten on previous force-quits from this bug. I selected "no", and Mail.app launched properly, with the main window appearing as normal.

Incidentally, I don't know why that specific command worked, considering I was in ~, not ~/Library, but if it doesn't work for you, you can try the following, which should work from anywhere:

Code:
rm -rf ~/Library/Caches/com.apple.mail

Oh, and, yes, the linked page does mention this, but you may need to give Terminal.app access to the directory in question if you haven't done so already. You may get a popup, but otherwise you may need to open System Preferences > Security & Privacy > Privacy > Full Disk Access and do it there.
 
Last edited:

EllenCV

macrumors newbie
Mar 3, 2021
9
2
I have the same problem. My mail has disappeared. The bar is on top, but it won't open. However, when it is open, it's obvious emails are being received because the red circle is showing the count. I tried going into my Time Machine to grab a mail application from a day or two ago but I do not see the mail app. Can anyone help? I don't see the mail caches anywhere to delete. Ugh!
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
The caches are in a hidden folder in your home folder. The “Library” folder in your home folder has been hidden by default since Mac OS X 10.7 "Lion", which was released way back in 2011.

You can open your user "Library" folder by pressing Cmd-Shift-G in Finder, typing ~/Library in the dialogue, and pressing Return.

The folder you want to delete is ~/Library/Caches/com.apple.mail, which you can find by pressing Cmd-Shift-G, typing ~/Library/Caches, pressing Return, and then scrolling down.

When you delete the folder com.apple.mail, you probably want to quit (or force quit) Mail.app first (the -f option in the Terminal command is a workaround for this).
 

EllenCV

macrumors newbie
Mar 3, 2021
9
2
This is helpful, but when I go to Library and find the caches folder, there is no com.apple.email. Could it be called something else or is this my problem? Why can't I find the mail app in Time Machine?
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
Interesting! I just checked, and it looks like Mail never recreated ~/Library/Caches/com.apple.email after I deleted it, which suggests it stores its caches somewhere else now. I did some digging, and here are some other folders you could try deleting:

1. ~/Library/Caches/CloudKit/com.apple.bird/com.apple.mail
➞ Cmd-Shift-G ~/Library/Caches/CloudKit/com.apple.bird, then delete com.apple.mail.

2. ~/Library/Containers/com.apple.mail/Data/Library/Caches
➞ Cmd-Shift-G ~/Library/Containers/com.apple.mail/Data/Library, then delete Caches.

3. ~/Library/Containers/com.apple.mail/Data/Library/Saved Application State
➞ Cmd-Shift-G ~/Library/Containers/com.apple.mail/Data/Library, then delete Saved Application State.

Basically, what seems to have changed is that Apple Mail is now "sandboxed" on macOS, for security purposes. If you're curious about "sandboxing" as a security practice, Apple has an article about it here.

FWIW, the reason Mail.app doesn't appear in Time Machine probably has something to do with the read-only system volume, another security feature, in this case introduced in macOS 10.15 Catalina in 2019, which you can read about here.

Because macOS and all of the core applications are now read-only, they can only be modified from the macOS Recovery system, which you can read about here.

When you use Time Machine in the macOS Recovery system, instead of restoring individual files, you are restoring the entire internal disk drive to a previous state. In general, the fact that the system volume is read-only makes it effectively impossible for Mail.app itself to get corrupted.

(If you are the tinkering type, I assume it's possible to make modifications to the system volume from macOS Recovery, but that ability is made as inconvenient as possible—i.e. you have to restart your computer into a special maintenance mode, macOS Recovery, in order to do so—so that people won't casually bork their macOS or its core applications.)
 

EllenCV

macrumors newbie
Mar 3, 2021
9
2
Bless you Elsie! Although I didn't have the first one, I deleted the second two and my emails all returned immediately. You are a genius!
 

Unsupported

macrumors 6502a
Jul 23, 2020
706
752
a land far, far away...
Interesting! I just checked, and it looks like Mail never recreated ~/Library/Caches/com.apple.email after I deleted it, which suggests it stores its caches somewhere else now. I did some digging, and here are some other folders you could try deleting:

1. ~/Library/Caches/CloudKit/com.apple.bird/com.apple.mail


2. ~/Library/Containers/com.apple.mail/Data/Library/Caches


3. ~/Library/Containers/com.apple.mail/Data/Library/Saved Application State


Basically, what seems to have changed is that Apple Mail is now "sandboxed" on macOS, for security purposes. If you're curious about "sandboxing" as a security practice, Apple has an article about it here.

FWIW, the reason Mail.app doesn't appear in Time Machine probably has something to do with the read-only system volume, another security feature, in this case introduced in macOS 10.15 Catalina in 2019, which you can read about here.

Because macOS and all of the core applications are now read-only, they can only be modified from the macOS Recovery system, which you can read about here.

When you use Time Machine in the macOS Recovery system, instead of restoring individual files, you are restoring the entire internal disk drive to a previous state. In general, the fact that the system volume is read-only makes it effectively impossible for Mail.app itself to get corrupted.

(If you are the tinkering type, I assume it's possible to make modifications to the system volume from macOS Recovery, but that ability is made as inconvenient as possible—i.e. you have to restart your computer into a special maintenance mode, macOS Recovery, in order to do so—so that people won't casually bork their macOS or its core applications.)

Very, very interesting!

Do you think deleting those caches, and/or files, could solve a problem that I and others have experienced with Big Sur and others have for many years in previous OSs?

ie: Missing alert sounds for new mail and lack of sounds set in Rules?
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
Do you think deleting those caches, and/or files, could solve a problem that I and others have experienced with Big Sur and others have for many years in previous OSs?

ie: Missing alert sounds for new mail and lack of sounds set in Rules?

I mean, you could try that!

Another thing that could be fairly safe is renaming `~/Library/Containers/com.apple.mail` to `~/Library/Containers/com.apple.mail.bak` and then setting up Mail.app from scratch. (Obviously this is less feasible with POP than with IMAP.) The best place to start if you're using Big Sur, though, is probably deleting any obsolete non-sandboxed caches.

FWIW there are also other places in `~/Library` that seem to relate to Mail, which you can find by navigating to `~/Library` and then searching from the Finder toolbar for "mail". (Doing this search from regular Spotlight doesn't work because `~/Library` is usually excluded from search results.)

If you want to try resetting any of the other references, you can suffix the filename (or folder name) with `.bak` or something similar, so you can easily restore (i.e. not just rely on Time Machine, though backup redundancy is ideal).
 
  • Like
Reactions: Unsupported

Unsupported

macrumors 6502a
Jul 23, 2020
706
752
a land far, far away...
T
I mean, you could try that!

Another thing that could be fairly safe is renaming `~/Library/Containers/com.apple.mail` to `~/Library/Containers/com.apple.mail.bak` and then setting up Mail.app from scratch. (Obviously this is less feasible with POP than with IMAP.) The best place to start if you're using Big Sur, though, is probably deleting any obsolete non-sandboxed caches.

FWIW there are also other places in `~/Library` that seem to relate to Mail, which you can find by navigating to `~/Library` and then searching from the Finder toolbar for "mail". (Doing this search from regular Spotlight doesn't work because `~/Library` is usually excluded from search results.)

If you want to try resetting any of the other references, you can suffix the filename (or folder name) with `.bak` or something similar, so you can easily restore (i.e. not just rely on Time Machine, though backup redundancy is ideal).

Thanks, this is the bug I was talking about. It's been around for several years in several OSs. It started for me with Big Sur...

https://www.reddit.com/r/MacOS/comments/juqo7s
 

Unsupported

macrumors 6502a
Jul 23, 2020
706
752
a land far, far away...
Well, unfortunately, my mail disappeared again today, but I went through the same steps as yesterday and it's back. I don't think it's been totally resolved.

Please send feedback to Apple, the more feedback they get on bugs the more likely they are to fix them:


 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
Since I'm not experiencing the issue with missing notifications, I'm not in a position to test ways of resolving it.

For both of you, again, the thermonuclear approach to fixing the problem is to remove all vestiges of Mail.app from your Library folder (ideally by renaming the files with a .bak, -old, etc. suffix or moving them to your Documents or Desktop folder, not merely deleting them) and then setting up Mail.app from scratch.

The only complication you might run into with the thermonuclear approach is if you have being using POP instead of IMAP, in which case you'd need to export and then reimport your "On My Mac" mailboxes. If you're using POP, before you move/rename the existing Mail folders, go Mailbox -> Export Mailbox... for each of the Mailboxes in the "On My Mac" section in the sidebar. Then, after you've set up Mail.app from scratch, go File -> Import Mailboxes... to bring them back in.

Obviously you might not be able to export individual mailboxes if your problem is the main window not appearing, but File -> Import Mailboxes appears to be clever enough to be able to process the old Mail folder from your Library folder, so you can just import that rather than going through the process of exporting. This approach just runs the risk that you might be more likely to reimport whatever configuration had been causing the problem in the first place, so once you reimport the entire folder it might be desirable to export the individual mailboxes, wipe Mail.app, and go through the entire process again just to be sure any corrupted settings, etc., are gone.

If you're using IMAP instead of POP, none of this should be necessary, as the entire contents of your email account is mirrored on the server, so you can just redownload it (which might help with eliminating any corrupted files). If you're using POP currently, I would recommend switching over to IMAP when you set up Mail.app from scratch and then reupload the reimported mailboxes to your email server, so that you don't have to deal with that rigmarole again.

If the problem is notifications, either you might have to set them up from scratch, or they might get reimported from iCloud. Mail.app rules seem to be separate from iCloud.com rules, which is kind of annoying, but server-side rules (whether iCloud or another provider) have the advantage of being applied even if, say, your MacBook is powered down. I used to use Mail.app rules much more extensively, but they've always been somewhat janky.
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
FWIW I've adopted the general practice of not using Migration Assistant when I get a new Mac and instead redownloading everything from the cloud. This way, my data gets refreshed every 5 years or so, so I'm less likely to be carrying forward corrupted configuration files, etc., from time immemorial (as I've been using macOS for almost 20 years).
 

EllenCV

macrumors newbie
Mar 3, 2021
9
2
Help! In the containers folder com.apple.mail has disappeared (I trashed it yesterday) and now my mail won't open again. The fix that worked yesterday isn't there today.
 
  • Wow
Reactions: elsiehupp

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
Help! In the containers folder com.apple.mail has disappeared (I trashed it yesterday) and now my mail won't open again. The fix that worked yesterday isn't there today.
Can you try going to ~/Library and then searching for the word "mail" from the search tool in the Finder toolbar? I found that the Mail container is a bit weird in that it seems to exist in multiple places. like, for example, it also might appear at ~/Library/Mail rather than ~/Library/Containers/com.apple.mail. It's quite slippery!
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
If you want to do the search using the command line, open Terminal from Applications > Utilities, and try the following two commands:
Bash:
find ~/Library -iname com.apple.mail
Bash:
find ~/Library -iname mail | grep -v Containers
(They might take a while to process.)

The -iname option makes the search query immediately following it only search filenames and folder names (rather than also file contents), and using -iname rather than -name makes the search case-insensitive.

The "pipe"—the symbol |, which is the key above Return, not a capital letter "i"—takes the output of the find command and feeds it to the following command, in this case grep. grep takes an input and filters the lines by a secondary search query, and the -v option excludes lines with the search query. You could actually then pipe the output into another grep command over and over again if you want to get really detailed with a search. You can read more about grep on Wikipedia here.

So the first command is searching for files or folders with the name (case-insensitive) including the text com.apple.mail, and the second command is searching for files or folders with the name (case-insensitive) matching the text mail, then filtering out any results containing the text Containers. (The reason for excluding Containers is that you might have dozens of irrelevant results in other containers otherwise.)

Also, something to note is that there's a much faster command line search tool, locate, but on macOS it doesn't seem to search hidden folders, which makes it a lot less useful.

As for the search results, it's possible to delete things using the command line, but it's fairly dangerous to try and do so if you don't know what you're doing, so I would recommend investigating the search results using the Finder instead.
 

EllenCV

macrumors newbie
Mar 3, 2021
9
2
In the Library there is a folder called Mail and one called Mail Downloads. There is also a folder called caches. In the caches folder there is a com.apple.mail.
 

elsiehupp

macrumors newbie
Jan 11, 2021
14
1
In the Library there is a folder called Mail and one called Mail Downloads.
If you want to try the "thermonuclear" approach I mentioned earlier, you could rename those two directories to Mail.bak and Mail Downloads.bak and try setting up Mail.app from scratch (which, yes, I know, is kind of a pain).

FYI there's nothing special about the suffix .bak. It's not a file extension or anything; it's just a convention to use it as an abbreviation for "Backup". You can just as easily rename the folders in some other way if you prefer (though I recommend using a suffix so that the old and new folders are next to each other in an alphabetically sorted view).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.