Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Messages on OS X Erases Messages After Restart

I have a 15" Mid 2015 MBP running the latest build of OS X El Capitan: 10.11.4, and my iPhone and iPad are running 9.3.1. Messages were syncing beautifully, both SMS and iMessages. If my Mac was asleep for a few days, I'd open it up and after a few minutes it would start syncing all my messages that had occured on my iPhone and iPad over the last few days until it was all caught up, just as it should. I then installed a new app on my Mac and it required me to restart. All of a sudden, upon restarting, virtually all my messages in the Messages app reverted to roughly two weeks ago (to about 04/11/2016). No amount of shutting the app down, or restarting has caused it to resolve the issue.


This isn't the first time I've had this issue, but it's frustrating because I actually set up this new MacBook (I've only had it a couple of weeks) brand new so as to avoid any issues. Why would it suddenly remove weeks of messages upon restart and not sync them? I suspect they are all there (I have the setting on to save the conversations even if the messages are deleted in the app), but why are they not syncing!? It's so frustrating!


Thanks for any help.

MacBook Pro with Retina display, OS X El Capitan (10.11.4)

Posted on Apr 27, 2016 1:12 PM

Reply
6 replies

Apr 27, 2016 2:02 PM in response to ffarsheed

Hi,


The App "Writes" to Preferences files and various storage places.

You as the Mac User Account owner have to have Permissions to Write, and in return, Read to and from these places.


iMessages are stored as "history" in ~/Library/Messages in three Database items.

However it also can Save Chats in ~/Library/Containers/com.apple.iChat/Data/Library/Messages/Archive


You need Ownership and Read and Write Permissions to both the longer Containers Read and Write Route and the final storage place.


The ~/Library folder is hidden in more recent versions of the Mac OS

Open A Finder window and use the Go Menu whilst holding down the ALT key.

Select the Library in the Menu when you do this.

Navigate to Messages

Choose one of the .db items and then use the CMD + i Get Info keystrokes

Scroll to the bottom of the Info Panel

Highlight you name.

Unlock the padlock and use the Cogwheel type icon.

Your Name should have (me) in the name.

You should have Read and Write Permissions

In the drop down from the cogwheel you should see the Make yourName (Me) the Owner is a greyed out form if you Own the file.

This pic is for another file but shows the file Location and the Info Panel

User uploaded file


Some Installs will change these permissions when they should not.


You also have to have Permission and Ownership of all the intervening folders.

In this Thread Reset Home Folder permissions and ACLs Error use the Linc Davis posts marked Helpful on Aug 31st 2013 to find out if you have many items that need doing.

Then use the Green Solved Post to change them to what they should be if it is loads.


Some Edit corrections.







User uploaded file

10:00 pm Wednesday; April 27, 2016


 iMac 2.5Ghz i5 2011 (El Capitan)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 iPhone and an iPad (2)

Apr 27, 2016 2:03 PM in response to ffarsheed

Please back up all data before proceeding.

This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Triple-click anywhere in the following line on this page to select it:

sudo find ~ $TMPDIR.. -exec chflags -h nosappnd,noschg,nosunlnk,nouappnd,nouchg {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any one 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 and start typing the name.

Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. You may be prompted to select a language, then the OS X Utilities screen will appear.

If you use FileVault 2, select Disk Utility, then select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another drive icon. Select Unlock from the File menu and enter your login password when prompted. Then quit Disk Utility to be returned to the main screen.

Select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

resetp

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button.

Select

Restart

from the menu bar.

Apr 28, 2016 12:23 PM in response to ffarsheed

Hi,



The Save Messages can be in ~/Library/Containers/com.apple.iChat/Data/Library/Messages/Archive but that fact alone does not get them back in the main window of Messages.


The same goes for the Chat.db items in ~/Library/Messages


I have yet to find which file stores which Chats or conversations are currently on display.

When turned on my computer this evening It showed I had a text Message (SMS) from my phone carrier.

I turned on the computer at 19.44 and the item seems to have been detected at 19.46 when I launched the app.

Two of the three Chat.db items display these two separate times.


My App seems to Write to these files straight away.

However I would guess it is possible for the app to display the iMessages and other chats without getting to Write to the files.

These would tend to be "lost" at the end of a Session much like an unsaved Document in Pages.



User uploaded file

8:23 pm Thursday; April 28, 2016


 iMac 2.5Ghz i5 2011 (El Capitan)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 iPhone and an iPad (2)

Messages on OS X Erases Messages After Restart

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.