Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Improve error message when auth token expires while waiting for "iTunes Connect to process the new build" #136

Closed
kommen opened this issue Feb 10, 2016 · 4 comments
Labels

Comments

@kommen
Copy link

kommen commented Feb 10, 2016

Every time I use pilot to upload a build and iTunes Connect is again slow with processing builds, I get an error like this after about a while:

[17:14:28]: Waiting for iTunes Connect to process the new build
[17:15:00]: Waiting for iTunes Connect to process the new build
[17:15:32]: Waiting for iTunes Connect to process the new build
[17:16:58]: Variable Dump:
[17:16:58]: {:PLATFORM_NAME=>nil, :LANE_NAME=>"testflight", :IPA_OUTPUT_PATH=>"/Users/Deploy/projects/<app>.ipa", :DSYM_OUTPUT_PATH=>"/Users/Deploy/projects/<app>.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/deploy/Library/Developer/Xcode/Archives/2016-02-10/<app> 2016-02-10 16.46.58.xcarchive", :CERT_FILE_PATH=>"/Users/Deploy/projects/<app>/certificates/<stripped>.cer", :CERT_CERTIFICATE_ID=>"<stripped>", :SIGH_PROFILE_PATH=>"/Users/Deploy/projects/<app>/fastlane/profiles/AppStore_<bundleid>.mobileprovision", :SIGH_PROFILE_PATHS=>["/Users/Deploy/projects/<app>/fastlane/profiles/AppStore_<bundleid>"], :SIGH_UDID=>"<stripped>", :SIGH_PROFILE_TYPE=>"app-store"}
[17:16:58]: {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unauthorized access"], "info"=>nil}, "statusCode"=>"ERROR"}

+------+-----------+-------------+
|        fastlane summary        |
+------+-----------+-------------+
| Step | Action    | Time (in s) |
+------+-----------+-------------+
| 1    | cocoapods | 7           |
| 2    | gym       | 92          |
| 3    | cert      | 17          |
| 4    | sigh      | 19          |
| 5    | resign    | 89          |
| 6    | pilot     | 1583        |
+------+-----------+-------------+

[17:16:58]: fastlane finished with errors
-------------------------------------------------------------------------------------------
😨  An error occured. Please enable crash reports using `fastlane enable_crash_reporting`.
👍  This makes resolving issues much easier and helps improve fastlane.
🔒  The reports will be stored securely on getsentry.com.
🙊  More information about privacy: https://github.com/fastlane/fastlane/releases/tag/1.33.3
-------------------------------------------------------------------------------------------
/Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spaceship-0.19.4/lib/spaceship/client.rb:268:in `parse_response': [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unauthorized access"], "info"=>nil}, "statusCode"=>"ERROR"} (Spaceship::Client::UnexpectedResponse)
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spaceship-0.19.4/lib/spaceship/tunes/tunes_client.rb:514:in `build_trains'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spaceship-0.19.4/lib/spaceship/tunes/build_train.rb:48:in `all'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spaceship-0.19.4/lib/spaceship/tunes/application.rb:195:in `build_trains'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spaceship-0.19.4/lib/spaceship/tunes/application.rb:233:in `all_processing_builds'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/pilot-1.3.0/lib/pilot/build_manager.rb:73:in `block in wait_for_processing_build'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/pilot-1.3.0/lib/pilot/build_manager.rb:70:in `loop'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/pilot-1.3.0/lib/pilot/build_manager.rb:70:in `wait_for_processing_build'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/pilot-1.3.0/lib/pilot/build_manager.rb:21:in `upload'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/actions/pilot.rb:18:in `run'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:143:in `block (2 levels) in execute_action'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:129:in `block in execute_action'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:128:in `chdir'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:128:in `execute_action'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/fast_file.rb:149:in `method_missing'
    from Fastfile:34:in `block in parsing_binding'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/lane.rb:36:in `call'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/lane.rb:36:in `call'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:52:in `block in execute'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:46:in `chdir'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/runner.rb:46:in `execute'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/bin/fastlane:38:in `block (2 levels) in run'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane_core-0.36.1/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/bin/fastlane:150:in `run'
    from /Users/Deploy/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fastlane-1.57.0/bin/fastlane:156:in `<top (required)>'
    from /Users/deploy/.rbenv/versions/2.2.0/bin/fastlane:23:in `load'
    from /Users/deploy/.rbenv/versions/2.2.0/bin/fastlane:23:in `<main>'

It looks like for some reason (probably a timeout?) the auth token expires. It would be nice to have this case handled more gracefully, as it seems to me it's kinda likely to run into it. For me, I see this more often than a processed build before the token expires.

@KrauseFx
Copy link
Contributor

I don't think it's an expired token, but just random server errors/timeouts. This should be fixed with this PR as far as I know fastlane-old/spaceship#235

@kommen
Copy link
Author

kommen commented Feb 11, 2016

Ok, I'll give it a try and reopen if necessary. Thanks Felix!

@kommen kommen closed this as completed Feb 11, 2016
@KrauseFx
Copy link
Contributor

Thanks @kommen 👍

@fastlanebot
Copy link

This issue was migrated to fastlane/fastlane#3247. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo 🚀

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants