fastlane: spaceship on master: sigh doesn't work without iTunes Connect account

Hi,

Shortly: Sine sigh 1.6.x it is not possible to download provisioning profile using Apple ID which doesn’t have access to iTines Connect.

If the Apple ID has access to the iTunes Connect it is possible to download or create provisioning profile using sigh, this is normal behaviour. But in my case, I’ve special user (Apple ID) which has only access to Member Center / Developer Program which is used to download provisioning profiles and use them in the Jenkins node. With this account I’m not able to download any provisioning profile. This issue doesn’t occur on the sigh 1.5.x and it is probably related to the new spaceship which can handle “two factor authentication”. As I saw in the code, spaceship/sigh tries to login to the iTunes Connect which in my case always fails.

Console log:

/lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/client.rb:407:in `parse_response': [!] Apple provided the following error info: (Spaceship::Client::UnexpectedResponse)
    authentication.failed
    Your session has expired.  Please log in.
    from /lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/portal_client.rb:41:in `teams'
    from /lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/ui/select_team.rb:35:in `select_team'
    from /lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/portal_client.rb:57:in `select_team'
    from /lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/spaceship.rb:37:in `select_team'
    from /lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/spaceship.rb:81:in `select_team'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:16:in `run'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/manager.rb:7:in `start'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/bin/sigh:35:in `block (2 levels) in run'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /lib/ruby/gems/2.2.0/gems/fastlane_core-0.41.1/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/bin/sigh:93:in `run'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/bin/sigh:111:in `<top (required)>'
    from /bin/sigh:23:in `load'
    from /bin/sigh:23:in `<main>'

Spaceship log: spaceship1459794302_34489.txt

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Looks like my problem (at least this one) is gone.

After my tests this my summary:

sigh spaceship Results
1.6.1 0.24.1 Fails, but with different error [1]
1.5.0 0.24.1 Fails, but with different error [1]
master 0.24.1 Fails, but with different error [1]
1.6.1 master Fails with original error
1.5.0 master Fails with original error
master master Fails with original error

The issue comes from spaceship, not from the sigh and it is related to the version on the master branch, not to the released version. So, I’m really sorry that I didn’t check it more precisely. I’ll change the issue name.

The error marked as [1] is something new and it is related to the changes on the “developer portal” and keychain configuration. I’ll create separate task for it but you can check stack trace below:

Error [1]:

/lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/portal_client.rb:311:in `download_certificate': [!] Couldn't download certificate, got this instead: {"responseId"=>"abcea721-85af-4dd3-9536-fd44627ec39b", "resultCode"=>1200, "resultString"=>"webservice.certificate.downloadNotAllowed", "userString"=>"You are not permitted to download this certificate.", "creationTimestamp"=>"2016-04-05T19:48:46Z", "protocolVersion"=>"QH65B2", "userLocale"=>"en_US", "requestUrl"=>"https://developer.apple.com/services-account/QH65B2/account/ios/certificate/downloadCertificateContent.action", "httpCode"=>200} (Spaceship::Client::UnexpectedResponse)
    from /lib/ruby/gems/2.2.0/gems/spaceship-0.24.1/lib/spaceship/portal/certificate.rb:309:in `download_raw'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:87:in `block (2 levels) in fetch_profiles'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:85:in `each'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:85:in `block in fetch_profiles'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:82:in `each'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:82:in `find_all'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:82:in `fetch_profiles'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/runner.rb:20:in `run'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/lib/sigh/manager.rb:7:in `start'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/bin/sigh:35:in `block (2 levels) in run'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /lib/ruby/gems/2.2.0/gems/fastlane_core-0.41.2/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/bin/sigh:93:in `run'
    from /lib/ruby/gems/2.2.0/gems/sigh-1.6.1/bin/sigh:111:in `<top (required)>'
    from /bin/sigh:23:in `load'
    from /bin/sigh:23:in `<main>'