xcpretty / xcode-install

πŸ”½ Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

`xcversion simulators --install` not working #458

Closed monchote closed 2 years ago

monchote commented 2 years ago

I'm unable to install any simulator with xcversion simulators --install and I can't figure out what the problem may be from the command-line output. Any ideas? Thanks a lot in advance.

xcode-install version: 2.8.0 Xcode version: 13.3.0 Command-line output:

➜  ios-app git:(maintenance/xcode13.3.0) βœ— xcversion --verbose simulators --install='iOS 15.2'
Installing iOS 15.2 Simulator for Xcode 13.3.0...
  0 5117M    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
%Please authenticate to install iOS 15.2 Simulator...
Password:
[!] Could not install iOS 15.2 Simulator, please try again

/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/gems/xcode-install-2.8.0/lib/xcode/install.rb:570:in `install'
/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/gems/xcode-install-2.8.0/lib/xcode/install/simulators.rb:45:in `install'
/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/gems/xcode-install-2.8.0/lib/xcode/install/simulators.rb:26:in `run'
/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/gems/xcode-install-2.8.0/bin/xcversion:12:in `<top (required)>'
/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/bin/xcversion:23:in `load'
/Users/ramonarguello/workspace/ios-app/vendor/cache/ruby/2.6.0/bin/xcversion:23:in `<top (required)>'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/Users/ramonarguello/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/Users/ramonarguello/.rbenv/versions/2.6.4/bin/bundle:23:in `load'
/Users/ramonarguello/.rbenv/versions/2.6.4/bin/bundle:23:in `<main>'
monchote commented 2 years ago

Running the command at install.rb:570 manually also fails:

➜  XcodeInstall sudo installer -pkg com.apple.pkg.iPhoneSimulatorSDK15_2.pkg -target /
installer: Package name is com.apple.pkg.iPhoneSimulatorSDK15_2
installer: Installing at base path /
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.)
monchote commented 2 years ago

This also fails: Screenshot 2022-03-17 at 18 55 05

rogerluan commented 2 years ago

@monchote correct me if I'm wrong but seems like this problem is not related to xcode-install at all? Looks like it's failing even when you attempt to install the simulators manually πŸ€” ?

monchote commented 2 years ago

@rogerluan Yeah, it’s a permissions problem on my machine. Closing this issue now.

AkashDhanwani commented 2 years ago

Hey @monchote, what was the permission problem with the machine? Were you able to resolve it? It seems I am also facing the same issue.

monchote commented 2 years ago

@AkashDhanwani Unfortunately I couldn't figure it out. It happens on my work machine and I'm assuming it's something my company has installed in it.

hendych commented 2 years ago

Having this issue too. My machine is M1 on macOS Monterey 12.4 when I tried to download simulator 14.5 runtime Both manual install through the .pkg also fails. But when I went to Xcode and choose Download more simulator runtime the installation was successful.

Used this repo to provision my macos nodes in the cloud. It will be painful to open Xcode and install the simulator manually on each node πŸ˜‚

Previously I was using this in intel cpu with big sur. It had no problem.