Jesus/dropbox_api

Net::OpenTimeout at... execution expired

juniorjp opened this issue · 3 comments

In the last step of Oauth2 when I use:

dropbox_authenticator.get_token(params[:code])

I'm getting the error from the title. I'm using http://localhost:3000 for now.

Any help would be greatly appreciated.

Jesus commented

Looks like a network issue. Maybe you're behind a proxy?

I'm not using any proxy. It worked in the staging server so I got the access token, but none of the requests are working localhost, like list_folder. I'm getting the same error.

It's weird because it's the first time I've seen this happening. I use a lot of other APIs and they work fine.

This is the stack trace if it helps to figure out something.

/home/jirico/.rvm/gems/ruby-2.3.1/gems/socksify-1.7.1/lib/socksify.rb:178:in `initialize': execution expired (Faraday::ConnectionFailed)
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/socksify-1.7.1/lib/socksify.rb:178:in `initialize'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:880:in `open'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:880:in `block in connect'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:878:in `connect'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:852:in `start'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1398:in `request'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/faraday-0.12.2/lib/faraday/adapter/net_http.rb:80:in `perform_request'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/faraday-0.12.2/lib/faraday/adapter/net_http.rb:38:in `block in call'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/faraday-0.12.2/lib/faraday/adapter/net_http.rb:85:in `with_net_http_connection'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/faraday-0.12.2/lib/faraday/adapter/net_http.rb:33:in `call'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/middleware/decode_result.rb:4:in `call'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/faraday-0.12.2/lib/faraday/rack_builder.rb:141:in `build_response'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/faraday-0.12.2/lib/faraday/connection.rb:386:in `run_request'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/endpoints/base.rb:52:in `run_request'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/endpoints/base.rb:15:in `get_response'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/endpoints/base.rb:11:in `perform_request'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/endpoints/files/list_folder.rb:37:in `block in <class:ListFolder>'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/client.rb:14:in `block in add_endpoint'
	from snippets/dropbox_debug.rb:3:in `<top (required)>'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/railties-4.1.16/lib/rails/commands/runner.rb:60:in `load'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/railties-4.1.16/lib/rails/commands/runner.rb:60:in `<top (required)>'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `require'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `block in require'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:232:in `load_dependency'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `require'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/railties-4.1.16/lib/rails/commands/commands_tasks.rb:128:in `require_command!'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/railties-4.1.16/lib/rails/commands/commands_tasks.rb:95:in `runner'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/railties-4.1.16/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/railties-4.1.16/lib/rails/commands.rb:17:in `<top (required)>'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `require'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `block in require'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:232:in `load_dependency'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:247:in `require'
	from /home/jirico/rails/cherry_klub/bin/rails:8:in `<top (required)>'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:241:in `load'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:241:in `block in load'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:232:in `load_dependency'
	from /home/jirico/.rvm/gems/ruby-2.3.1/gems/activesupport-4.1.16/lib/active_support/dependencies.rb:241:in `load'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /home/jirico/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

EDIT:

One thing I noticed is if I pass a wrong path, it works: client.list_folder('/foo') , returning:
path/not_found/ (DropboxApi::Errors::NotFoundError) which means it's communicating with Dropbox

The timeout occurs only when the query is on a correct folder.

I think it has something related to decoding the result?
from /home/jirico/.rvm/gems/ruby-2.3.1/gems/dropbox_api-0.1.12/lib/dropbox_api/middleware/decode_result.rb:4:in call'
`
EDIT 2:
I tested on my mobile internet and it worked, so I will close this issue.