The Robservatory

Robservations on everything…

 

Fix a “could not complete your purchase” App Store error

I've been having an odd issue with the Mac App Store app on my Mojave-running iMac: Sometimes the App Store app will fail to install an update for some app. When that happens, I see a dialog with this text as the title:

We could not complete your purchase.

Below that is a single word, "cancelled," and that's all. Searching the web, I came across this thread on stackexchange.

What finally worked for me was a combination of things listed there—none of these steps on their own seem to fix the problem, but all together do, at least until it occurs again.

  1. Quit the App Store app.
  2. Switch my DNS to another provider.
  3. In Terminal, paste this command and press Return:
    open "$TMPDIR/../C/com.apple.appstore/"
  4. Confirm that the Finder opened a window to the com.apple.appstore folder, then drag everything there to the trash.
  5. Back in Terminal, paste this line and press Return: killall -9 appstoreagent
  6. Relaunch the App Store app.

This method has worked for me each time I've had this issue. It's annoying that it keeps recurring, but at least the fix is relatively simple.

20 Comments

Add a Comment
  1. I had this error on my Mojave-mac too and was first puzzled, waited a few days and as it not resolved on its own, today I clicked at my Account Icon at the lower left side, did a login and thats it. It was maybe another error, but it is worth a first check before switching to another DNS provider.

  2. This has been happening to me frequently. It almost always starts working if I switch from one wifi network to another - like from the 2.4 GHz to 5 GHz network my router puts out, or vice-versa.

  3. There's an easier way, at least in Mojave
    If the Mac App Store is opened, quit it.
    Open the Finder.
    From the Finder, menu click Go and choose Go to Folder option.
    Enter this address:
    ~/Library/Caches/com.apple.appstore/Cache.db
    Click Go.
    Move contents to the Trash.

    1. This worked for my Mojave MacBook Pro, with the exception that the correct folder to Go to was ~/Library/Caches/com.apple.appstore/ and the folder (and contents) to delete was CommerceRequestCache.

      No reboots, no network changes, no Terminal. Thanks much!

  4. Went to ~/Library/Caches/com.apple.appstore/ and deleted the CommerceRequestCache folder.

    After restarting the App Store, updates still would not work.

    Turned off VPN, and tried again. This time the update worked. VPN certainly has an impact on this problem.

  5. For me, what worked was changing DNS. I was using the defaults coming from my router. Problem disappeared after changing to Google's 8.8.8.8. and 8.8.4.4. (System Preferences/Network/WiFi/Advanced.../DNS).

  6. I'm wondering if there are several issues at play. I've seen this error a handful of times since Rob posted this, and I've been able to work it down to simply removing the 'mds.lock' file from the mds/ folder inside the OP com.apple.appstore/ folder and killing appstoreagent. Once I do that, the other files (.db) in the mds/ folder update, their 'Date Modified' change; whereas prior, the mod dates were significantly in the past (maybe the last time I did a successful update?? dunno, I'll track that now).

  7. I noticed that this happens more or less randomly. Two Macs with same OS etc and on one it happend, the other not.

    The one that (again and again) wouldn't update, could be 'fixed' by simply clicking on my account name (bottom left), then View Information (top right), giving password, going back to 'Updates' in the left column et voilà: Then updating worked.

  8. I've been researching for hours on eliminating the Mojave "we could not complete your purchase. cancelled" issue. Many of the postings declared there wasn't any fix. Some Terminal Commands would work once, then not again when the error reappeared. Your fix, so far, is a FIX. Thank you very much

  9. Thanks for this! Temporarily changing my DNS provider to default solved the problem straight away.

Leave a Reply to Sam Brannen Cancel reply

Your email address will not be published. Required fields are marked *

The Robservatory © 2021 • Privacy Policy Built from the Frontier theme