slack-ruby / slack-ruby-client

A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
MIT License
1.21k stars 214 forks source link

Faraday::SSLError (SSL_CTX_load_verify_file: system lib) #418

Closed yurikoval closed 2 years ago

yurikoval commented 2 years ago

Using Heroku for deployment. Default ca_path does not seem to propagate, and I have to override client settings to make it work. According to Faraday's docs, SSL_CERT_FILE should be observed, but my guess is that 's being overwritten to nil in Slack::Web::Config.reset.

Was able to do a workaround with the following:

Override client setting:

Slack::Web::Client.configure do |config|
  config.ca_file = ENV["SSL_CERT_FILE"]
end

Then set SSL cert file location via ENV var: heroku config:set SSL_CERT_FILE="/usr/lib/ssl/certs/ca-certificates.crt"

dblock commented 2 years ago

I believe this was fixed in https://github.com/slack-ruby/slack-ruby-client/pull/416, but not released, can you please confirm? We now always set this to nil and you would need to explicitly do this or another configuration if you don't want defaults.

yurikoval commented 2 years ago

Cool. Looks like it's fixed in the upcoming version.