I'm having a bit of truble with omniauth/openid.
When trying to authenticate, I found this in my logs:
OpenID::FetchingError: Error fetching https://www.google.com/accounts/o8/.well-known/host-meta?hd=profiles.google.com%2Fmy_username: undefined method `io' for nil:NilClass
The important thing there is undefined method io' for nil:NilClass
which comes from openid/fetchers.rb, in the following snippet:
module Net
class HTTP
def post_connection_check(hostname)
check_common_name = true
cert = @socket.io.peer_cert
cert.extensions.each { |ext|
next if ext.oid != "subjectAltName"
ext.value.split(/,\s+/).each{ |general_name|
if /\ADNS:(.*)/ =~ general_name
check_common_name = false
...
That error is generated by @socket.io.peer_cert
, @socket is not defined.
Have any of you encountered this before? Not quite sure what the cause is.
Versions I'm running:
We had this same problem and it was a direct result of Net::HTTP#connect never being invoked. Turns out we had the fakeweb gem scoped into the environment that was throwing the error (development, in our case).
Narrowing fakeweb's scope allows for normal processing of #connect and @socket is once again happy.
group :test do
gem 'fakeweb'
end
We came across the same / very similar problem with both fakeweb
and webmock
(when using the VCR gem). Switching from fakeweb
to typhoeus
seemed to have solved this problem for us.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With