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

Faraday::SSLError: SSL_connect SYSCALL... on Windows #239

Open
jostster opened this issue Nov 23, 2016 · 10 comments
Open

Faraday::SSLError: SSL_connect SYSCALL... on Windows #239

jostster opened this issue Nov 23, 2016 · 10 comments
Labels

Comments

@jostster
Copy link

I see there was other issues similar to this but this one returned a 5. I also tried what posted in the other tasks but I feel they were prematurely closed. After running some checks https://www.ssllabs.com/ssltest/analyze.html?d=www.googleapis.com&s=172.217.5.106 it seems that google-drive-ruby should default to TLS1.2 but it is trying SSL2/SSL3. None of the googles servers allow SSL2/SSL3. Could the plugin be updated?

I currently have OpenSSL 1.0.2j and Ruby 2.3.1

@gimite
Copy link
Owner

gimite commented Nov 23, 2016

Are you using Windows? It is working fine with Linux, so looks like an issue specific to Windows. Maybe Windows Ruby doesn't support TLS?

google-drive-ruby is just using google-api-client for API calls, so I guess it's a general issue of Windows Ruby, httpclient, or google-api-client.Maybe you can try each of them directly to see if the issue is specific to which layer.

@sundharvs
Copy link

Same issue on Windows. Anyone found a solution?

@jostster
Copy link
Author

jostster commented Jan 30, 2017

@gimite sorry about this delay. Yes I am on windows. I am also using activeadmin. If i remove the activeadmin gem, the rake task runs fine, the moment I enable activeadmin in the gemfile it fails. There was an issue referenced above, but it was closed since non of the developers have a windows machine. Could it be a header being forced overridden?

@gimite
Copy link
Owner

gimite commented Jan 31, 2017

Hmm I'm not sure what causes the issue. But it looks like it's not a bug of google_drive library because you reproduced the error without using google_drive library at activeadmin/activeadmin#4707 (comment) .

So it should be an issue caused by either activeadmin, google-api-client or their dependency e.g., httpclient or Windows Ruby.

I will keep this issue open so that people with the same issue can discuss, though there's nothing much I can do here.

@gimite gimite added the blocked label Feb 12, 2017
@gimite gimite changed the title Faraday::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A Faraday::SSLError: SSL_connect SYSCALL... on Windows Feb 12, 2017
@jhonportella
Copy link

I am having exactly the same issue on windows, When I try to do the "On behalf of you" authorization, after initializing config.json and running session = GoogleDrive::Session.from_config("config.json") in console, a URL is given to me where a permit the use of my google drive and google docs and in response google gives me a code that I copy and paste in my console, what is expected is that my config.json must be rewritten but instead of that I am having the following error.

Faraday::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read se
rver hello A

Does anybody have the answer to this issue?, my ruby version is ruby 2.0.0p643 (2015-02-25) [x64-mingw32] and my OpenSSL version on ruby is OpenSSL 1.0.0o 15 Oct 2014

@jostster
Copy link
Author

Do you use activeadmin?

@jhonportella
Copy link

It is not in my gemfile, but I think it is using it, I made it work reinstalling a new version of rails and ruby. Rails 5.0 and ruby 2.2.6 and avoiding validation in my application.rb using

require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

But it is not a good idea since my application is not going to be safe anymore. Without those lines I can not handle comunication with my google drive account. Do you have any idea of what can I do instead of adding those lines in my app?

@StefanMajonez
Copy link

Try installing the gem 'certified' and using it in your program - worked for me.

@jostster
Copy link
Author

@StefanMajonez I have that installed. It resolves the error code 1 error but not the error code 5

@wmlutz
Copy link

wmlutz commented Aug 7, 2017

This is going to sound wild, but removing an underscore from my script's file name solved the problem for me.

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

No branches or pull requests

6 participants