Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install xcode with command xcversion install #476

Open
SimJung opened this issue Jul 4, 2023 · 9 comments · May be fixed by #478
Open

Cannot install xcode with command xcversion install #476

SimJung opened this issue Jul 4, 2023 · 9 comments · May be fixed by #478

Comments

@SimJung
Copy link

SimJung commented Jul 4, 2023

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
Copy link

vmontana commented Jul 6, 2023

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
Copy link

funclosure commented Jul 7, 2023

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
Copy link

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
Copy link
Author

SimJung commented Jul 17, 2023

I found another cli tool xcodes from issue here. #467
It seems a good choice for me.
I hope it would be a solution.

https://github.com/XcodesOrg/xcodes

@vmontana @funclosure @csweeney285

@acecilia
Copy link

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
Copy link

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
Copy link
Collaborator

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

@Nezz Nezz linked a pull request Oct 9, 2023 that will close this issue
@piers-smartwyre
Copy link

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. 

@saltman007web
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants