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

[BUG] xcode resource attempts to auth with Apple even if the on-disk Xcode is up-to-date #234

Closed
aaronclarke opened this issue May 11, 2021 · 0 comments

Comments

@aaronclarke
Copy link
Contributor

Describe the Bug

The xcode resource attempts to auth with Apple even if the on-disk Xcode is up-to-date.
This is because the Xcode installed? method that we use to guard against re-install/upgrade shouldn't be tied up in that initialization, but it is.

Error Message

    ================================================================================
    Error executing action `install_xcode` on resource 'xcode[install Xcode 12.4]'
    ================================================================================
    
    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /opt/chef/embedded/bin/xcversion update ----
    STDOUT: 
    STDERR: /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:909:in `handle_error': Access forbidden (Spaceship::AccessForbiddenError)
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:886:in `block in send_request'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:646:in `with_retry'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:882:in `send_request'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:726:in `request'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:481:in `send_shared_login_request'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/portal/portal_client.rb:28:in `send_login_request'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:808:in `do_login'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:393:in `login'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/client.rb:355:in `login'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/portal/spaceship.rb:25:in `login'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/spaceship/lib/spaceship/portal/spaceship.rb:103:in `login'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/lib/xcode/install.rb:354:in `spaceship'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/lib/xcode/install.rb:395:in `fetch_seedlist'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/lib/xcode/install.rb:214:in `seedlist'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/lib/xcode/install.rb:433:in `list_versions'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/lib/xcode/install.rb:324:in `list'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/lib/xcode/install/update.rb:10:in `run'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    	from /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/xcode-install-2.7.0/bin/xcversion:12:in `<top (required)>'
    	from /opt/chef/embedded/bin/xcversion:23:in `load'
    	from /opt/chef/embedded/bin/xcversion:23:in `<main>'
    ---- End output of /opt/chef/embedded/bin/xcversion update ----
    Ran /opt/chef/embedded/bin/xcversion update returned 1
    
    Cookbook Trace: (most recent call first)
    ----------------------------------------
    /var/chef/cache/cookbooks/macos/libraries/developer_account.rb:20:in `authenticate_with_apple'
    /var/chef/cache/cookbooks/macos/libraries/developer_account.rb:15:in `initialize'
    /var/chef/cache/cookbooks/macos/resources/xcode.rb:25:in `new'
    /var/chef/cache/cookbooks/macos/resources/xcode.rb:25:in `block in class_from_file'

Chef Exception

Chef exception(s) if any.

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

No branches or pull requests

2 participants