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

Install Xcode: We could not complete your purchase. Unknown Error.

After I upgrade the system to Mavericks, I remove the Xcode.


Then when I use the terminal, the system prompt saying whether to Get Xcode or Get Command Line Tools or something like that. (because I am using git)


Now I want to install the new version of Xcode, but MAS says: "We could not complete your purchase. Unknown Error."


I've tried all solutions out there can be found, like:


1. sign out/back the account

2. remove app store cookies

3. delete the app store cache

4. delete the /var/folders


Nothing works.


I doubt it has something to do with the already working Command Line Tools. But I cannot find this can uninstall it since it is installed alone without Xcode.


Please help.

MacBook Air (13-inch Mid 2012), OS X Mavericks (10.9)

Posted on Oct 28, 2013 5:19 PM

Reply
3 replies

Oct 28, 2013 11:15 PM in response to rightgenius

If you have more than one user account, these instructions must be carried out as an administrator.

Launch the Console application in any 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. Click Utilities, then Console in the icon grid.

Select

/var/log install.log

from the hierarchical list on the left. If you don't see that list, select

View Show Log List

from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, start over and note the time. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).


If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.

When posting a log extract, be selective. Don't post more than is requested.

Please do not indiscriminately dump thousands of lines from the log into this discussion.


Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

Oct 29, 2013 5:42 AM in response to Linc Davis

Thanks for your quick reponse, Davis


And I didn't notice any relevant information in install.log.

But I find the appstore.log changed every time the COULD-NOT-COMPLETE message prompt.


So Here is the log (from appstore.log):

=============

Oct 29 20:19:06 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: Downloading remote pre-flight from http://a1967.phobos.apple.com/us/r1000/021/Purple4/v4/33/8d/9a/338d9acd-e976-fa2 a-cd41-d12123058b71/signed.dcr.4890243113364818627.pfpkg

Oct 29 20:19:07 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: ERROR unable to write preflight to disk - (null)

Oct 29 20:19:07 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: productID(497799835) preflightPath(/var/folders/np/xbvff85n5jl5v22l6gmpx_9c0000gn/C/com.apple.appsto re/497799835/preflight.pfpkg)

Oct 29 20:19:07 niustekiMacBook-Air.local storeagent[379]: ISURLOperation: Chose not to retry after error: Error Domain=NSURLErrorDomain Code=-1004 "Unknown Error." UserInfo=0x7fcf2bf75460 {NSLocalizedDescription=Unknown Error.}

Oct 29 20:19:07 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: Preflight fetch failed with error - Error Domain=NSURLErrorDomain Code=-1004 "Unknown Error." UserInfo=0x7fcf2bf75460 {NSLocalizedDescription=Unknown Error.}

Oct 29 20:19:07 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: No pre-flight available to verify, failing.

Oct 29 20:19:07 niustekiMacBook-Air.local com.apple.WebKit.WebContent[959]: FRJSInterface: Calling install requirements callback for 497799835 - {

adamID = 497799835;

errorCode = "-1004";

errorDomain = UnknownDomain;

localizedErrorDescription = "Unknown Error.";

success = 0;

}

Oct 29 20:23:10 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: Downloading remote pre-flight from http://a1967.phobos.apple.com/us/r1000/021/Purple4/v4/33/8d/9a/338d9acd-e976-fa2 a-cd41-d12123058b71/signed.dcr.4890243113364818627.pfpkg

Oct 29 20:23:10 niustekiMacBook-Air.local storeagent[379]: ISCheckPreflightOperation: ERROR unable to write preflight to disk - (null)



==========


BTW, I can install other app normally. That's weird.

Oct 29, 2013 1:01 PM in response to rightgenius

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches.


Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.


Test while in safe mode. Same problem?


After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

Install Xcode: We could not complete your purchase. Unknown Error.

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