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

Improve error messages on timeout #30

Closed
KrauseFx opened this issue May 24, 2015 · 5 comments
Closed

Improve error messages on timeout #30

KrauseFx opened this issue May 24, 2015 · 5 comments
Assignees
Labels

Comments

@KrauseFx
Copy link
Contributor

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/protocol.rb:158:in `rescue in rbuf_fill': Net::ReadTimeout (Faraday::TimeoutError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/protocol.rb:152:in `rbuf_fill'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/protocol.rb:144:in `readline'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http/response.rb:39:in `read_status_line'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http/response.rb:28:in `read_new'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1406:in `block in transport_request'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1376:in `request'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1369:in `block in request'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:852:in `start'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1367:in `request'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:82:in `perform_request'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:40:in `block in call'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:32:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
    from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/connection.rb:177:in `post'
    from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.1.2/lib/spaceship/client.rb:298:in `request'
    from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.1.2/lib/spaceship/client.rb:229:in `create_provisioning_profile!'
    from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.1.2/lib/spaceship/provisioning_profile.rb:65:in `create!'
    from /Users/felixkrause/Developer/fastlane/sigh/lib/sigh/spaceship/runner.rb:81:in `create_profile!'
    from /Users/felixkrause/Developer/fastlane/sigh/lib/sigh/spaceship/runner.rb:36:in `block in run'
    from /Users/felixkrause/Developer/fastlane/sigh/lib/sigh/spaceship/runner.rb:35:in `times'
    from /Users/felixkrause/Developer/fastlane/sigh/lib/sigh/spaceship/runner.rb:35:in `run'
    from /Users/felixkrause/Developer/fastlane/sigh/lib/sigh/manager.rb:9:in `start'
    from ./bin/sigh:36:in `block (2 levels) in run'

How should timeout be handled? How about we try it up to 3 times and then raise the exception?

This line is causing the exception when there is a timeout:

@client.send(method, url_or_path, params, headers, &block)
@KrauseFx KrauseFx changed the title Improved error messages on timeout Improve error messages on timeout May 24, 2015
@snatchev
Copy link
Contributor

Are timeouts just network issues? In other words, does a re-try increase the chances of success of a request? If so, a retry count should be simple enough to implement. What were you thinking in terms of the message in the timeout exception?

@KrauseFx
Copy link
Contributor Author

@snatchev I created a few hundred provisioning profiles on a very stable internet connection and one request timed out. I think re-trying 3 times with the default timeout time should be good. Not so much talking about the internet connection itself, but also Apple's servers.

@KrauseFx
Copy link
Contributor Author

I'll implement this today 👍

@KrauseFx KrauseFx assigned KrauseFx and unassigned snatchev May 24, 2015
@KrauseFx
Copy link
Contributor Author

Implemented with 56f865b

@fastlanebot
Copy link

This issue was migrated to fastlane/fastlane#3562. 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 12, 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