xcode-install icon indicating copy to clipboard operation
xcode-install copied to clipboard

Cannot install xcode with command `xcversion install`

Open SimJung opened this issue 1 year ago • 8 comments

Hello. xcversion install command that worked fine until last week suddenly has a problem. I tried to run command xcversion install 14.1 (14, 14.2, 14.3, 14.3.1), but it shows error log below:

xip: error: The archive “Xcode_14.1.xip” is damaged and can’t be expanded.
No `Xcode.app(or Xcode-beta.app)` found in XIP. Please remove (My home dir)/Library/Caches/XcodeInstall/Xcode_14.1.xip if you suspect a corrupted download or run `xcversion update` to see if the version you tried to install has been pulled by Apple. If none of this is true, please open a new GH issue.

So, I tried to remove cache directory, run command xcversion update and still not working.

Downloading xip file from https://xcodereleases.com/ has no problem.

Hope this is a temporary issue.

Thank you!

SimJung avatar Jul 04 '23 07:07 SimJung

Hi. I'm having the same issue:

image

The cache dir has a small .xip. Removing it doesn't solve the issue.

image

It seems that anything has changed on xcodereleases.com.

Does anyone find "xcversion install 14.3" working?

vmontana avatar Jul 06 '23 11:07 vmontana

Previously I can install the Xcode 15 beta 2 successfully, (1 or 2 weeks ago) but when I'm trying today for both 15 beta 2, 15 beta 3, it seems not working now, having the same issue as the description above

error: The archive “Xcode_15_beta_2.xip” is damaged and can’t be expanded.
No `Xcode.app(or Xcode-beta.app)` found in XIP. Please remove /Users/victor/Library/Caches/XcodeInstall/Xcode_15_beta_2.xip if you suspect a corrupted download or run `xcversion update` to see if the version you tried to install has been pulled by Apple. If none of this is true, please open a new GH issue.

funclosure avatar Jul 07 '23 05:07 funclosure

Seeing same issue:

100 33951 0 33951 0 0 23214 0 --:--:-- 0:00:01 --:--:-- 23334% %xip: error: The archive “Xcode_14.2.xip” is damaged and can’t be expanded. No Xcode.app(or Xcode-beta.app) found in XIP. Please remove /Users/conorsweeney/Library/Caches/XcodeInstall/Xcode_14.2.xip if you suspect a corrupted download or run xcversion update to see if the version you tried to install has been pulled by Apple. If none of this is true, please open a new GH issue.

csweeney285 avatar Jul 11 '23 02:07 csweeney285

I found another cli tool xcodes from issue here. https://github.com/xcpretty/xcode-install/issues/467 It seems a good choice for me. I hope it would be a solution.

https://github.com/XcodesOrg/xcodes

@vmontana @funclosure @csweeney285

SimJung avatar Jul 17 '23 05:07 SimJung

Experiencing the same:

xip: error: The archive “Xcode_14.1.xip” is damaged and can’t be expanded.
No `Xcode.app(or Xcode-beta.app)` found in XIP. Please remove /Users/.../Library/Caches/XcodeInstall/Xcode_14.1.xip if you suspect a corrupted download or run `xcversion update` to see if the version you tried to install has been pulled by Apple. If none of this is true, please open a new GH issue.

acecilia avatar Jul 27 '23 18:07 acecilia

That's because Apple changed something on their side so xcode-install urls are not valid anymore. However, we could patch installed gem to accommodate to those changes: sudo sed -i '' -e 's/devcenter\/download\.action/services-account\/download/' /Library/Ruby/Gems/2.6.0/gems/xcode-install-2.8.1/lib/xcode/install.rb

In this example gem is installed via system ruby. If you use custom ruby installation (brew) you should change the path to install.rb

bmarkowww avatar Aug 08 '23 10:08 bmarkowww

There are also other alternatives: https://github.com/xcpretty/xcode-install/blob/master/MIGRATION.md

rogerluan avatar Aug 16 '23 16:08 rogerluan