slack-ruby / slack-ruby-bot

The easiest way to write a Slack bot in Ruby.
MIT License
1.12k stars 187 forks source link

Unknown SSL Method #80

Open joslinm opened 8 years ago

joslinm commented 8 years ago
➜  minimal git:(master) ✗ uname -a
Darwin Maslows-iMac.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
➜  minimal git:(master) ✗ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.4
BuildVersion:   15E65
➜  minimal git:(master) bundle exec ruby pongbot.rb
I, [2016-06-16T10:04:46.963200 #33321]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
I, [2016-06-16T10:04:47.153326 #33321]  INFO -- : post https://slack.com/api/rtm.start
D, [2016-06-16T10:04:47.153385 #33321] DEBUG -- request: Accept: "application/json; charset=utf-8"
User-Agent: "Slack Ruby Client/0.7.4"
Content-Type: "application/x-www-form-urlencoded"
I, [2016-06-16T10:04:47.359756 #33321]  INFO -- Status: 200
source 'http://rubygems.org'
D, [2016-06-16T10:04:47.359857 #33321] DEBUG -- response: content-type: "application/json; charset=utf-8"
transfer-encoding: "chunked"
connection: "close"
access-control-allow-origin: "*"
cache-control: "private, no-cache, no-store, must-revalidate"
content-security-policy: "referrer no-referrer;"
date: "Thu, 16 Jun 2016 14:04:47 GMT"
expires: "Mon, 26 Jul 1997 05:00:00 GMT"
pragma: "no-cache"
server: "Apache"
strict-transport-security: "max-age=31536000; includeSubDomains; preload"
vary: "Accept-Encoding"
x-accepted-oauth-scopes: "rtm:stream,client"
x-content-type-options: "nosniff"
x-oauth-scopes: "identify,read,post,client,apps"
x-xss-protection: "0"
x-cache: "Miss from cloudfront"
via: "1.1 042ceabe1d85408fc3ac018cd255d256.cloudfront.net (CloudFront)"
x-amz-cf-id: "l2bMAivK1dAMGnsChWgAAoeFqJ-0yIM0sXKwfdw1rt0jrZoN6IpbGw=="
D, [2016-06-16T10:04:47.377760 #33321] DEBUG -- Slack::RealTime::Concurrency::Celluloid::Socket#connect!: WebSocket::Driver::Client
E, [2016-06-16T10:04:47.442201 #33321] ERROR -- : Actor crashed!
ArgumentError: unknown SSL method `TLSv1_2_client'.
    /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/concurrency/celluloid.rb:97:in `initialize'
    /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/concurrency/celluloid.rb:97:in `new'
    /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/concurrency/celluloid.rb:97:in `build_ssl_context'
    /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/concurrency/celluloid.rb:92:in `build_socket'
    /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/concurrency/celluloid.rb:34:in `run_loop'
    /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/concurrency/celluloid.rb:29:in `connect!'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:16:in `dispatch'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
    /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
/Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:35:in `terminate': task was terminated (Celluloid::TaskTerminated)
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:323:in `block in cleanup'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:321:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:321:in `cleanup'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:307:in `shutdown'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:299:in `handle_crash'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:171:in `rescue in run'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:150:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:131:in `block in start'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/actor/system.rb:78:in `block in get_thread'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:50:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
    from (celluloid):0:in `remote procedure call'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:45:in `value'
    from /Library/Ruby/Gems/2.0.0/gems/celluloid-0.17.3/lib/celluloid/proxy/sync.rb:22:in `method_missing'
    from /Library/Ruby/Gems/2.0.0/gems/slack-ruby-client-0.7.4/lib/slack/real_time/client.rb:51:in `start!'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/server.rb:37:in `start!'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/server.rb:29:in `block (2 levels) in run'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/server.rb:69:in `handle_exceptions'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/server.rb:27:in `block in run'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/server.rb:26:in `loop'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/server.rb:26:in `run'
    from /Users/markjoslin/dev/scratchpad/slack-ruby-bot/lib/slack-ruby-bot/bot.rb:6:in `run'
    from pongbot.rb:9:in `<main>'
dblock commented 8 years ago

@joslinm Did you manage to work through this? I would check the version of OpenSSL. Mine is OpenSSL 0.9.8zh 14 Jan 2016.

openssl version -a

then

brew update
brew install openssl
brew link --force openssl
joslinm commented 8 years ago

Mine is same exact version, so I don't think it's that

mike-bailey commented 8 years ago

Can confirm, also had this issue.

mike-bailey commented 8 years ago

Fixed mine. @joslinm what is your ruby version?

dblock commented 8 years ago

@mike-bailey Care to tell us how?

mike-bailey commented 8 years ago

@dblock Updated Ruby from like 2.0 to 2.2 or something. Not at machine currently. This is why I asked what the ruby version was.

Sent from my iPhone

On Jul 12, 2016, at 8:24 AM, Daniel Doubrovkine (dB.) @dblockdotorg notifications@github.com<mailto:notifications@github.com> wrote:

@mike-baileyhttps://github.com/mike-bailey Care to tell us how?

You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/dblock/slack-ruby-bot/issues/80#issuecomment-232031596, or mute the threadhttps://github.com/notifications/unsubscribe/AHQTMXc0PHNpq4S1G9dFsVARerCvKPZ-ks5qU4eDgaJpZM4I3bPe.

aliekens commented 8 years ago

Running Ruby 2.3.1 in rbenv, OpenSSL 0.9.8. Code runs fine while developed on a Mac, but I get the following "Actor crashed!" when running the same setup on a Debian box:

I, [2016-07-18T11:02:22.221848 #10249]  INFO -- : post https://slack.com/api/rtm.start
D, [2016-07-18T11:02:22.221945 #10249] DEBUG -- request: Accept: "application/json; charset=utf-8"
User-Agent: "Slack Ruby Client/0.7.5"
Content-Type: "application/x-www-form-urlencoded"
I, [2016-07-18T11:02:22.820308 #10249]  INFO -- Status: 200
D, [2016-07-18T11:02:22.820444 #10249] DEBUG -- response: content-type: "application/json; charset=utf-8"
transfer-encoding: "chunked"
connection: "close"
access-control-allow-origin: "*"
cache-control: "private, no-cache, no-store, must-revalidate"
content-security-policy: "referrer no-referrer;"
date: "Mon, 18 Jul 2016 09:02:22 GMT"
expires: "Mon, 26 Jul 1997 05:00:00 GMT"
pragma: "no-cache"
server: "Apache"
strict-transport-security: "max-age=31536000; includeSubDomains; preload"
vary: "Accept-Encoding"
x-accepted-oauth-scopes: "rtm:stream,client"
x-content-type-options: "nosniff"
x-oauth-scopes: "identify,read,post,client,apps"
x-slack-backend: "z"
x-slack-req-id: "eabda279-a54d-4456-81e4-dffcfd528072"
x-xss-protection: "0"
x-cache: "Miss from cloudfront"
via: "1.1 keyremoved.cloudfront.net (CloudFront)"
x-amz-cf-id: "keyremoved=="
D, [2016-07-18T11:02:22.838881 #10249] DEBUG -- Slack::RealTime::Concurrency::Celluloid::Socket#connect!: WebSocket::Driver::Client
E, [2016-07-18T11:02:23.269552 #10249] ERROR -- : Actor crashed!
ArgumentError: unknown SSL method `TLSv1_2_client'.
        /home/username/.rbenv/versions/2.3.1/lib/ruby/2.3.0/openssl/ssl.rb:112:in `ssl_version='
        /home/username/.rbenv/versions/2.3.1/lib/ruby/2.3.0/openssl/ssl.rb:112:in `initialize'
        /home/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/slack-ruby-client-0.7.5/lib/slack/real_time/concurrency/celluloid.rb:97:in `new'