App Store: An Unknown Error Has Occured

While I was setting up a new Mac mini today, I ran into a strange problem. When I tried to use the App store to install Xcode, I entered my Apple ID and password and got this error: “An unknown error has occurred.” To make sure that my Apple ID was working, I checked it on a different machine, and it was fine. The problem was with this particular machine, not with my Apple ID.

I found this article on Apple’s forum. The first solution fixed my problem. What I needed to do was..

  1. Make sure App Store is closed and invoke Finder.
  2. Click on Go -> Go to Folder.
  3. Enter ~/Library/Cookies and click on Go.
    appstore-unknown-error
  4. Find this file and trash it: com.apple.appstore.plist.

Now invoke App Store and you should be able to enter your Apple ID and password without a problem. If this does not work, you can try going to ~/Library/Caches/com.apple.appstore and trashing the Cache.db file.