Back up all data.
Quit Messages if it’s running. Force quit if necessary. Relaunch it and test after each of the following steps. If the problem isn't resolved, quit again and go on to the next step.
Step 1
Make sure you know the ID and password you use with iMessage. Launch the Keychain Access application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
Use the search box in the toolbar of the Keychain Access window to find and delete all items with "iMessage" or "com.apple.idms" in the name. Log out and log back in.
Step 2
Hold down the option key and select
Go ▹ Library
from the Finder menu bar. Move the following items from the Library folder to the Trash (some may not exist):
Caches/com.apple.Messages
Caches/com.apple.imfoundation.IMRemoteURLConnectionAgent
Containers/com.apple.iChat
Containers/com.apple.soagent
IdentityServices
Leave the Library folder open. Log out and log back in.
Step 3
Go back to the Finder and move the following item from the open Library folder to the Desktop:
Messages
Note: you are not moving the Messages application. You’re moving a folder named “Messages.”
If Messages now works, delete the Messages folder on the Desktop. Otherwise, quit Messages again. Put back the folder you moved, overwriting the newer one that may have been created in its place.
Step 4
In the Preferences subfolder, there may be several files having names that begin with any of the following strings:
com.apple.iChat
com.apple.ids
com.apple.imdsmsrecordstore
com.apple.imessage
com.apple.imservice
Move them all to the Desktop. There may also be a file with the name "com.apple.imagent.plist". Move that to the Trash.
Also in the Preferences folder, there's a subfolder named "ByHost". Open it and do the same thing.
Log out and log back in. Test again. This time Messages should perform normally, but your settings will be lost. You may be able to put back some of the files you moved to the Desktop in this step. Relaunch and test after each one. Eventually you should find one or more that causes Messages to malfunction. Delete those files and recreate whatever settings they contained.
If the issue is still not resolved, quit Messages again and put all the items you moved to the Desktop back where they were. You don’t need to replace the items you moved to the Trash. Stop here and post your results.
If you later decide that you don’t like the results of Steps 3 and 4, you can undo them completely by quitting Messages and restoring the items you deleted in those steps from your backup.