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

SocketError getaddrinfo: Hôte inconnu. on callback #3

Closed
cumpais opened this issue Mar 28, 2012 · 4 comments
Closed

SocketError getaddrinfo: Hôte inconnu. on callback #3

cumpais opened this issue Mar 28, 2012 · 4 comments

Comments

@cumpais
Copy link

cumpais commented Mar 28, 2012

Hi,

Once the user clicks on the gmail link (havent started tested the others yet), I go to google and on the callback i get this error:

Started POST "/contacts/gmail" for 127.0.0.1 at 2012-03-28 14:34:16 +0200

Started GET "/oauth2callback?code=4/JRqeE4JhdgYeqOtDesifrYFJ7FFY" for 127.0.0.1 at 2012-03-28 14:34:20 +0200

SocketError (getaddrinfo: H�te inconnu. ):

I'm running on localhost. Hôte Inconnu = unknown host in french :)

@Diego81
Copy link
Owner

Diego81 commented Mar 28, 2012

It looks very strange. The path "/contacts/gmail" should be accessed through a GET and not a POST.
How does you initializer file looks like? Can you provide more info from the logs?

@cumpais
Copy link
Author

cumpais commented Mar 29, 2012

Worth to mention that this codes runs perfectly on a Windows 7 machine. I get this error on a Windows XP.

Here's my omnicontacts file

    require "omnicontacts"
    Rails.application.middleware.use OmniContacts::Builder do
      importer :gmail, "my code", "my secret", {:redirect_path => "/contacts/gmail/callback", :ssl_ca_file => Rails.root.join('lib/assets/curl-ca-bundle.crt').to_s}
    importer :yahoo, "consumer_id", "consumer_secret", {:callback_path => '/callback'}
    importer :hotmail, "client_id", "client_secret"
    end

Here's the latest lines of the log file

Started GET "/contacts/gmail" for 127.0.0.1 at 2012-03-29 09:51:52 +0200
Started GET "/contacts/gmail/callback?code=4/eJApRp0xUjyLIhH0i0cr-HyuiRxn" for 127.0.0.1 at 2012-03-29 09:52:08 +0200
SocketError (getaddrinfo: H�te inconnu. ):
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:762:in `initialize'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:762:in `open'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:762:in `connect'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:744:in `start'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1284:in `request'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1239:in `request_post'
  omnicontacts (0.1.2) lib/omnicontacts/http_utils.rb:61:in `block in https_post'
  omnicontacts (0.1.2) lib/omnicontacts/http_utils.rb:82:in `https_connection'
  omnicontacts (0.1.2) lib/omnicontacts/http_utils.rb:60:in `https_post'
  omnicontacts (0.1.2) lib/omnicontacts/authorization/oauth2.rb:43:in `fetch_access_token'

@Diego81
Copy link
Owner

Diego81 commented Mar 29, 2012

It seems there is something wrong with your network configuration.
Try to run a simple script that downloads a web page and see if that works.
Something like this:

require 'net/http'

Net::HTTP.new("www.google.com").request_get("/search?q=something")

If this doesn't work, it is not something related to OmniContacts.

@cumpais cumpais closed this as completed Mar 30, 2012
@cumpais
Copy link
Author

cumpais commented Mar 30, 2012

It works, but you're right, it actually was a network issue elsewhere. Thanks

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

No branches or pull requests

2 participants