google-drive-ruby icon indicating copy to clipboard operation
google-drive-ruby copied to clipboard

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

Open jostster opened this issue 9 years ago • 10 comments

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

jostster avatar Nov 23 '16 02:11 jostster

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.

gimite avatar Nov 23 '16 07:11 gimite

Same issue on Windows. Anyone found a solution?

sundharvs avatar Jan 15 '17 19:01 sundharvs

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

jostster avatar Jan 30 '17 21:01 jostster

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 https://github.com/activeadmin/activeadmin/issues/4707#issuecomment-270490045 .

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 avatar Jan 31 '17 12:01 gimite

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

jhonportella avatar Mar 14 '17 06:03 jhonportella

Do you use activeadmin?

jostster avatar Mar 14 '17 15:03 jostster

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?

jhonportella avatar Mar 14 '17 16:03 jhonportella

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

StefanMajonez avatar Mar 19 '17 09:03 StefanMajonez

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

jostster avatar Mar 19 '17 18:03 jostster

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

wmlutz avatar Aug 07 '17 19:08 wmlutz