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

Improve error messages on timeout #3562

Closed
fastlanebot opened this issue May 24, 2015 · 4 comments
Closed

Improve error messages on timeout #3562

fastlanebot opened this issue May 24, 2015 · 4 comments

Comments

@fastlanebot
Copy link

Original issue by @KrauseFx - Imported from fastlane/spaceship#30
/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)
@fastlanebot
Copy link
Author

@snatchev commented

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?

@fastlanebot
Copy link
Author

@KrauseFx commented

@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.

@fastlanebot
Copy link
Author

@KrauseFx commented

I'll implement this today 👍

@fastlanebot
Copy link
Author

@KrauseFx commented

Implemented with fastlane-old/spaceship@56f865b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant