slack-ruby-client icon indicating copy to clipboard operation
slack-ruby-client copied to clipboard

JRuby support, Faraday::SSLError: No message available

Open dblock opened this issue 9 years ago • 7 comments

Integration tests are failing against an actual slack service.

1) integration test gets hello
     Got 0 failures and 2 other errors:
     1.1) Failure/Error:
            response = connection.send(method) do |request|
              case method
              when :get, :delete
                request.url(path, options)
              when :post, :put
                request.path = path
                request.body = options unless options.empty?
          Faraday::SSLError:
            No message available
          # ./vendor/bundle/jruby/1.9/gems/webmock-1.22.5/lib/webmock/http_lib_adapters/net_http.rb:109:in `request'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:82:in `perform_request'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response_middleware.rb:30:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/request/multipart.rb:14:in `call'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
          # ./vendor/bundle/jruby/1.9/gems/faraday-0.9.2/lib/faraday/connection.rb:181:in `post'
          # ./lib/slack/web/faraday/request.rb:25:in `request'
          # ./lib/slack/web/faraday/request.rb:10:in `post'
          # ./lib/slack/web/api/endpoints/rtm.rb:21:in `rtm_start'
          # ./lib/slack/real_time/client.rb:74:in `build_socket'
          # ./lib/slack/real_time/client.rb:46:in `start_async'
          # ./spec/integration/integration_spec.rb:22:in `connection'
          # ./spec/integration/integration_spec.rb:44:in `start_server'
          # ./spec/integration/integration_spec.rb:91:in `(root)'
          # ./spec/integration/integration_spec.rb:6:in `(root)'
          # ./vendor/bundle/jruby/1.9/gems/vcr-3.0.1/lib/vcr.rb:244:in `turned_off'
          # ./spec/integration/integration_spec.rb:6:in `(root)'
     1.2) Failure/Error: fail ThreadError, 'queue empty' if @queue.empty?

dblock avatar Jan 08 '16 16:01 dblock

This issue still exists in jruby 9.1.1.0

alexbrowne avatar May 28 '16 00:05 alexbrowne

😞

dblock avatar May 28 '16 17:05 dblock

Any updates on this?

linuxboytoo avatar May 19 '17 14:05 linuxboytoo

FYI, I'm getting the same error. Mine turns out to be a couple of issues.

In config.rb the reset method is making this exec:

openssl version -a | grep OPENSSLDIR | awk '{print $2}'|sed -e 's/\"//g'

Dumping self after the reset has run shows that there is a \n in the ca_path. It looks like the exec needs a chomp thrown on the end of it.

{:headers=>{"Accept"=>"application/json; charset=utf-8", "User-Agent"=>"Slack Ruby Client/0.8.1"}, :ssl=>{:ca_path=>"/usr/lib/ssl\n", :ca_file=>"/usr/lib/ssl\n/ca-certificates.crt"}}

The other issue is the ca_file needs to be certs/ca-certificates.crt.

vlajbert avatar Jun 24 '17 02:06 vlajbert

I am experiencing this with 9.1.13.0 and with 1.7.27

digitalextremist avatar Nov 05 '17 17:11 digitalextremist

Actually, the version of the gem I was running was my form of 0.7.9 ... once I updated the fork to 0.10.1 the error went away //

digitalextremist avatar Nov 05 '17 18:11 digitalextremist

Maybe we can track down what was changed and whether this is actually fixed?

dblock avatar Nov 06 '17 16:11 dblock