xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.58k stars 237 forks source link

Cannot install xcode with command `xcversion install` #476

Open SimJung opened 12 months ago

SimJung commented 12 months ago

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!

vmontana commented 12 months ago

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?

funclosure commented 12 months ago

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.
csweeney285 commented 11 months ago

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.

SimJung commented 11 months ago

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

acecilia commented 11 months ago

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.
bmarkowww commented 10 months ago

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

rogerluan commented 10 months ago

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

piers-smartwyre commented 1 month ago

This is still an issue today

The archive “Xcode_15.4.xip” is damaged and can’t be expanded.
No `Xcode.app(or Xcode-beta.app)` found in XIP. Please remove /Users/administrator/Library/Caches/XcodeInstall/Xcode_15.4.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.