62

On my iMac running Mountain Lion, Messages is chronically showing that I have 2 unread messages in its Dock icon. However there are no unread messages at all. I've even gone through and clicked on every single conversation in my history, just to make sure there wasn't some long-forgotten message floating around that hadn't been read.

It's not causing any major problems, but it is annoying to constantly think I've got a new message when i don't. Anyone know why this happens?

JVC
  • 2,811
  • After observing this for some time, I noticed that it's not always 2 mesages... sometimes it's 1, sometimes it's none. I have a feeling it's related to the messages being "unread" on other devices - like my phone or ipad - for a while. Eventually the notification seems to disappear. Unless anyone can shed any other light on this, I'm going to assume that's the case and close this question. – JVC Mar 30 '14 at 01:05

9 Answers9

75

I have been getting this on OS X 10.10 (Yosemite). I found a solution in the Apple discussion forums.

User LHindiii there recommended quitting Messages.app then using Activity Monitor to quit the Dock (which will automatically relaunch) and this worked for me.

J Cobb
  • 1,144
21

I was able to solve this by right-clicking Messages in the Dock, clicking on the unread messages that showed up in the resulting contextual menu (they happened to be SMSes added via Continuity), and responding to them.

  • 1
    Well of course, but that doesn't actually address the fundamental issue. That's just what happens when you reply to any message. But these are messages that have already been replied to from another device, so there is nothing to reply to. They simply should not show as unread. – JVC Jan 10 '15 at 16:56
  • 1
    As in your original question, Messages was showing unread conversations in the dock icon, but by sifting through all my conversations I was unable to find one that appeared unread. I did find, however, that unread messages were indicated in the contextual menu referenced in my post. If unread messages are going to appear in the dock icon and contextual menu, they also ought to appear in Messages itself. – Joshua Pokotilow Jan 10 '15 at 20:55
  • 2
    Thank you! This fixed my problem permanently, whereas killing Messages and Dock only fixed it temporarily. As a side note, I only had to click on the unread messages. I didn't have to respond to them. – dontangg Aug 22 '15 at 02:24
  • did not work for me – Stembrain Jul 13 '16 at 12:27
18

This worked for me:

I made a script in Script Editor that ran the following:

tell application "Messages" to quit
    delay 1
tell application "Dock" to quit
    delay 1
tell application "Messages" to launch

Save the script as an application, and launch it every time Message messes up.

user3439894
  • 58,676
Tim
  • 181
6

Easiest solution is to create a script similar to the one above with just one line like this:

tell application "Messages" to "clear unread messages"
grg
  • 201,078
  • 1
    That's pretty handy, thanks! I just still wish I could get to the bottom of why it does this in the first place and make it stop. – JVC Jul 28 '15 at 15:34
  • Certainly seems to be the simplest and most elegant workaround proposed. I will try it out next time I run across this problem (already had done the quit > killall dock > launch messages thing). – squareman Feb 24 '16 at 18:57
  • 1
    Hmm. Just happened to me again today, this simple script unfortunately did not remove the phantom icon count. The three-action script did complete the cleanup however. – squareman Feb 29 '16 at 20:11
  • 1
    did not work for me – Stembrain Jul 13 '16 at 12:27
6

I found that a combination of the previous answers works best as a script in Script Editor:

tell application "Messages" to "clear unread messages"
delay 1
tell application "Messages" to quit
delay 1
tell application "Dock" to quit
delay 1
tell application "Messages" to launch
1

None of these solutions worked for me, on High Sierra.

This did. It does involve clearing all conversations. At this point you've probably already tried that via the iMessage interface without success (as it didn't fix the unread issue).

With iMessage closed;

  • Navigate to ~/Library/Messages/ and delete it's contents.
  • Navigate to ~/Library/Containers/ find com.Apple.iChat and delete.
  • Reboot

Opening (don't) iMessage before the reboot will give you a message telling you "Messages is updating..." This will never complete.

Post reboot, all the necessary files will have been regenerated, and you'll have a brand new, clean iMessage again.

0

try restarting your computer, right click, and open the unread messages

Christy
  • 21
  • Totally inapplicable here. – JVC Apr 05 '16 at 14:09
  • killAll Dock worked for me once, but the next time this problem happened none of the apple script solutions, killall solutions, and right-clicking the dock icon to select unread messages worked. only this reboot cleared the stale badge. – Stembrain Jul 13 '16 at 12:34
0

This is how I cleared phantom unread messages:

  1. Right click on the messages application icon to view the phone number of the unread phantom messages
  2. Type the phone number in mac finder search bar
  3. Move the messages to the trash

Phantom unread messages longer appeared

nohillside
  • 100,768
-1

Use Tinker Tool go to Dock menu and just relaunch dock

  • 1
    Welcome to Ask Different! We're trying to find the best answers and those answers will provide info as to why they're the best. Explain why you think the software you recommended is better than others out there. Providing links can also help the OP, and others, find the software and evaluate it themselves. See [answer] on how to provide a quality answer. – fsb Sep 16 '16 at 20:01