対象バージョン
- xcversion 2.4.0
- fastlane-2.58.0
現象
xcode-installでXcode 9.4を落とそうと、Usernameにアカウントを設定し認証しようとすると
$ xcversion update
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Username: "Apple ID" ⏎
下記エラーが出てアカウントの認証が通らなくなっており、
Xcodeバージョンリストの更新が実施出来なくなってました。
/Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/client.rb:478:in `send_shared_login_request': {"authType"=>"hsa2"} (Spaceship::TunesClient::ITunesConnectError)
aa=68B0A96798A9072EACFF00BBFFDD9DB5; Domain=idmsa.apple.com; Path=/; Secure; HttpOnly, dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly, site=USA; Domain=apple.com; Path=/; Secure; HttpOnly, acn01=e4s4Hu5hV7un6coVs8cVmB9k7/yJ3NM/C7jRoma4ABT0DV2WLow=; Max-Age=31536000; Expires=Thu, 06-Jun-2019 13:58:56 GMT; Domain=apple.com; Path=/; Secure; HttpOnly
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/portal/portal_client.rb:13:in `send_login_request'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/client.rb:646:in `do_login'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/client.rb:395:in `login'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/client.rb:116:in `login'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/portal/spaceship.rb:22:in `login'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.58.0/spaceship/lib/spaceship/portal/spaceship.rb:92:in `login'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/lib/xcode/install.rb:330:in `spaceship'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/lib/xcode/install.rb:370:in `fetch_seedlist'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/lib/xcode/install.rb:199:in `seedlist'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/lib/xcode/install.rb:406:in `list_versions'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/lib/xcode/install.rb:300:in `list'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/lib/xcode/install/update.rb:10:in `run'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.0/bin/xcversion:12:in `<top (required)>'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/bin/xcversion:23:in `load'
from /Users/mitsuaki1229/.rbenv/versions/2.4.2/bin/xcversion:23:in `<main>'
リリースで利用しているアカウントでは認証が通るので、
認証エラーになるアカウントの設定を見直している最中、Itunesconnectにログインしてみると、Apple ID & Privacyの利用許諾が
Continueをタップ後に、再度コマンドを打つと認証が通るようになりました。
おまけ
fastlaneを2.97.0にアップデートしてからなのか、アカウントによってなのかは未検証ですが、下記のようにエラーログに承諾エラーだと分かるのが出てました。。先にこちらが出てほしかったです。。
/Users/mitsuaki1229/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.97.0/spaceship/lib/spaceship/client.rb:472:in `send_shared_login_request': Need to acknowledge to Apple's Apple ID and Privacy statement. Please manually log into https://appleid.apple.com (or https://itunesconnect.apple.com) to acknowledge the statement. (Spaceship::AppleIDAndPrivacyAcknowledgementNeeded)