XcodesOrg / XcodesApp

The easiest way to install and switch between multiple versions of Xcode - with a mouse click.
MIT License
6.61k stars 291 forks source link

After unsuccessful unxip, attempts to cancel and re-download fail #546

Open babbage opened 3 months ago

babbage commented 3 months ago

Describe the bug The executive summary: After an apparently failed unxip of a downloaded version of Xcode, cancelling this and restarting from scratch repeatedly failed, including after restarts of the computer. Manually deleting the downloaded .xip file and the version of Xcode (partially or fully unxipped?) found in the cache folder then allowed an install to correctly complete. Xcodes seemed to continue to either rely on or be affected by the (perhaps damaged?) files in the cache folder instead of starting afresh after a failed unxip, despite showing a progress bar indicating a new download is completed.

The story: Xcodes indicated that the release version of Xcode 15.3 was out, and that I currently only had Xcode 15.2 installed. When I clicked 'Install' the file downloaded and began unxip, but stalled in this process and did not complete even after being left for lengthy periods (e.g., an hour). Somewhere in the process I noted that whereas I had previously been logged in with my developer AppleID in Xcodes I was no longer logged in, so I attempted to do so. After entering my AppleID and password I was prompted as expected with the verification code and entered this. However, the process displayed a spinner and never showed my AppleID as correctly logged in. At some point I force quit the Xcodes app. I verified that I had the latest version of Xcodes installed and I did. I again initiated the Apple ID login process and it again appeared to spin forever. However, after a restart of Xcodes it then showed my AppleID as correctly logged in.

Alongside all of this, including after the successful login and subsequent restarts of the computer, attempting to install Xcode 15.3 continued to repeatedly fail, by getting stuck during the unxip process. Finally, I found the cache folder via settings and manually delete both the downloaded .xip file and the version of Xcode (partially or fully unxipped?) found in the cache folder. An install then proceeded normally.

To Reproduce Possibly steps above are relevant but I do not have a specific way to reproduce. Unfortunately the (probably?) damaged files were deleted rather than moved when I was trying emptying the cache folder so I do not have copies of these for review.

Expected behavior After a failed unxip, clicking "Install" that goes though a download process should ensure that any previous copies of files in the cache folder are removed before attempting to download and unxip the fresh version.

Screenshots None available sorry.

Version