Apple Event: May 7th at 7 am PT

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

"An error occurred during purchase."

I hate it when I get error messages that have a single hit in Google, and that one hit is unrelated.


So I have a new MBP. I used SetupAssistent to migrate from my older notebook (MBP Santa Rosa, Snow Leopard). It went pretty smoothly, and I'm getting used to the changes that Mountain Lion brings.


The App store knows I have apps installed, such as some of the iLife suite, and tells me I need to upgrade.


When I click to upgrade or install, however, it prompts me for my Apple ID / password, and then immediately throws this error message. I can retry as many times as I'd like, but it always gives the same result. When I cancel, I get:


"We could not complete your request. There was an an error in the App Store. Please try again later. (20)"


Trying again later didn't solve the issue (at least after one day). My next guess was that the upgrade issue is due to legacy apps (iPhoto, iMovie, etc) having been installed from physical media. But at least Keynote was bought via the App Store, and it generates the same error. Do I need to delete the previous installs?


Any suggestions?

MacBook Pro (Retina, Mid 2012), OS X Mountain Lion (10.8.1), iPhone 4

Posted on Sep 13, 2012 2:07 PM

Reply
Question marked as Best reply

Posted on Sep 20, 2012 10:19 PM

It may be bad form to reply to onesself, but I SOLVED IT!


I tried many of the suggestions found elsewhere in these forums, to no avail. I repaired permissions, I tweaked network preferences, I rebooted numerous times. No luck.


After messing around for a long time, I hit upon the plan of logging in as a new user, doing an upgrade, but monitoring which files changed. This would indicate which ones needed to be examined in my ordinary account.


The ones that were suspicious, I just blew away:

cd ~

rm Library/Preferences/com.apple.storeagent.plist

rm -rf Library/Caches/com.apple.SoftwareUpdate

rm -rf Library/Caches/com.apple.storeagent


No real luck there. For good measure, I got rid of another suspicious character:
rm -rf Library/Preferences/ByHost


Still no luck. I looked at the console again, and saw lines that should have given it all away (but which still took me a while to figure out):

9/20/12 10:02:17.343 PM App Store[1224]: 1224: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-596.2.3/Cookies/DiskCookieStorage.cpp: 792)


Finally, I took a good, close look at Library/Cookies. Then it was obvious:

ls -ld Library/Cookies

dr-x------ 2 samuelg staff 68 Sep 9 17:53 Library/Cookies/


Yuh, wha?!


After that, it just took a quick

chmod 755 Library/Cookies


And everything is back to working the way Steve meant it to. Why "repair permissions" didn't pick it up, I don't know. The date stamp on that directory is when I installed Mountain Lion, so something that happened during the install seems to have caused the problem.


I hope this is helpful to someone else out there!

8 replies
Question marked as Best reply

Sep 20, 2012 10:19 PM in response to unixy_goodness

It may be bad form to reply to onesself, but I SOLVED IT!


I tried many of the suggestions found elsewhere in these forums, to no avail. I repaired permissions, I tweaked network preferences, I rebooted numerous times. No luck.


After messing around for a long time, I hit upon the plan of logging in as a new user, doing an upgrade, but monitoring which files changed. This would indicate which ones needed to be examined in my ordinary account.


The ones that were suspicious, I just blew away:

cd ~

rm Library/Preferences/com.apple.storeagent.plist

rm -rf Library/Caches/com.apple.SoftwareUpdate

rm -rf Library/Caches/com.apple.storeagent


No real luck there. For good measure, I got rid of another suspicious character:
rm -rf Library/Preferences/ByHost


Still no luck. I looked at the console again, and saw lines that should have given it all away (but which still took me a while to figure out):

9/20/12 10:02:17.343 PM App Store[1224]: 1224: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-596.2.3/Cookies/DiskCookieStorage.cpp: 792)


Finally, I took a good, close look at Library/Cookies. Then it was obvious:

ls -ld Library/Cookies

dr-x------ 2 samuelg staff 68 Sep 9 17:53 Library/Cookies/


Yuh, wha?!


After that, it just took a quick

chmod 755 Library/Cookies


And everything is back to working the way Steve meant it to. Why "repair permissions" didn't pick it up, I don't know. The date stamp on that directory is when I installed Mountain Lion, so something that happened during the install seems to have caused the problem.


I hope this is helpful to someone else out there!

Nov 11, 2012 4:04 AM in response to unixy_goodness

Hi unixy,


I am having the same exact issue! When trying to download a program update, I'm getting, "There was an error in the Apple Store. Please try again later (20)." Like you, I waited for over a day, yet I'm still encountering this obstacle.


I tried to follow your solution but I'm wondering if you could clarify. When I go to Library/Cookies, I see three files: -- com.apple.appstore.plist

-- com.apple.Safari.SafeBrowsing.binarycookies

-- Cookies.binarycookies


So, where and how do I implement your solution? To be clear, I can't locate the problematic file you listed (i.e. "ls - ld Library/Cookies" "dr-x------ 2 samuelg staff 68 [....]")


Thanks!

Dec 16, 2012 2:55 AM in response to unixy_goodness

I am having this same issue


When I use the App Store I get an error (alternatively 100 or 13) and the following also appears in the Console messages


Dec 16 03:50:09 Sverige.local App Store[611]: 611: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-596.2.3/Cookies/DiskCookieStorage.cpp: 792)

Dec 16 03:50:09 Sverige.local storeagent[331]: 331: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-596.2.3/Cookies/DiskCookieStorage.cpp: 792)

Dec 16 03:50:14 --- last message repeated 3 times ---

Dec 16 03:50:14 Sverige.local App Store[611]: 611: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-596.2.3/Cookies/DiskCookieStorage.cpp: 792)


Last night I used Carbon Copy Cloner to move my system to a new disk and to move my user account to a new (separate) disk (both SSD). The problem started after I did this. This was with 10.7.4. I updated to 10.7.5 and still had the problem. I upgraded to 10.8.2 and still have the problem.


It seems to be account specific as I can log into another user I created and use the App Store from there...


I have gone in to my account Library and looked at Cookies and Caches and made sure permissions match the other account, etc. No dice.


Any ideas?

Aug 3, 2015 5:31 PM in response to unixy_goodness

I had this same issue in Yosemite, and I eventually tracked it down to being an issue related to needing to reverify my app store payment method. I resolved the issue by clicking "Get" for a new free app in the App Store, which required that I provide by payment method CCVC. This allowed me to download the new app, and once this download was complete, I was able to update my existing apps.

"An error occurred during purchase."

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