Why does Messages on OSX always show unread messages?

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.


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.


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.


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"

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