MacOS High Sierra Messages app unread icon reappearing, causing system to hang

high sierramacosmessages

I am experiencing a strange problem with the inbuilt messages app on my iMac. For 2 of the threads in the app, the unread count is not resetting and when I read the thread, the blue unread icon initially disappears before immediately reappearing again. Furthermore, doing this seems to cause the rest of the system to hang for some time afterwards, so it's becoming quite problematic. I have tried the following to fix this problem:

  • Force quitting the app.
  • Deleting the threads (problem reappeared on next communication with the person in question).
  • killall Dock in Terminal.
  • Booting in safe mode.
  • Changing notification settings.
  • Scrolling far back through the threads.
  • Reinstalling OS (not a complete clean reinstall).

None of these things have worked and I'm now at a loss for what else to try. Has anyone seen this issue before?

Best Answer

I think the solution can be found in DeerSteak's answer from: https://apple.stackexchange.com/a/332311/100302

  1. Quit Messages.app
  2. Open a Terminal and:

    cd ~/Library/Messages/Archive
    
  3. Search for the stuck message (compare timestamp) e.g.

    find . -iname 'annoying person*.ichat'
    
  4. Once you've located the offender, delete it

  5. Restart the Dock

    killall Dock