Adventures As Me


How I fixed My Mac App Store 100 Error

Written 11 Jun 2012

Summary

Make sure the permissions on the ~/Library/Cookies directory allows processes to read and write to the directory

How I Discovered This

A couple of weeks ago I began receiving a strange error from the App Store on one of my Apple workstations: A quick Google search on this term showed many other people were experiencing this problem. Apparently this problem is so complex there is not a single solution that works for everyone. From the solutions that worked for other people, and the solution that worked for my situation, my opinion on the matter is that the Mac App Store developers are lazy and inexperienced. With my opinion out of the way, here are some of the solutions people recommend:

  • Logout of the app store, quit the app store, logout of OS X, re-login to all
  • Reboot your workstation
  • Remove all preferences for the App Store
  • Remove a variety of cache files
  • Enable the debug menu in the app store and
    • Clear cookies
    • Reset the Application

After each of the above you are supposed to reattempt your original action in the App Store. None of the above worked for me. In one of the many articles I read, though, I was introduced to a utility named opensnoop, that ships with OS X. The opensnoop utility provides some information on files opened by applications. One key datum is whether the application can open a file. With that in mind I performed the following:

  • Start the App Store
  • Clicked Updates
  • Ensured I was logged into the App Store
  • Started opensnoop (in terminal: sudo opensnoop)
  • Clicked Update All
  • After failure, stopped opensnoop

Scanning the copious output of opensnoop, I noted storeagent was consistently failing to open files in the ~/Library/Cookies directory. Checking the permissions and ownership of the directory revealed the following:

$ ls -lah Library/Cookies/
total 1712
dr-x------   4 user  user   136B Dec  3  2010 .
drwx------@ 74 user  user   2.5K Jun  5 09:28 ..
-rw-r--r--@  1 user  user   419K Dec  3  2010 Cookies.plist
-rw-r--r--@  1 user  user   434K Aug 25  2010 Cookies.plist_tmp_597_0.dat

According to that my account could:

  • List the directory contents
  • Open a file for reading
  • Delete files

However my account could not:

  • Add content to existing files
  • Create a new file

I changed the permissions in the following way:

$ chmod 0750 ~Library/Cookies/

Now my account gains the ability to append to existing files and create new files. In addition, since I do not know what the proper permissions should be, I grant the following permissions to processes that belong to my user group:

  • List the directory contents
  • Open a file for reading
  • Delete files

After making those changes I reattempted to update existing apps in the App Store. Congratulations, it succeeded.

Related Posts