mishk0 / slack-bot-api

:rocket: Simple way to control your Slack Bot
MIT License
1.35k stars 178 forks source link

SSL Exception #55

Open brianantonelli opened 7 years ago

brianantonelli commented 7 years ago

I'm using your library in a project and one of my users is having an issue. When the code attempts to send a message to Slack it gets an SSL cert issuer error, I cannot reproduce this on other machines.

/usr/local/lib/node_modules/horus/node_modules/vow/lib/vow.js:105
            throw e;
            ^

Error: Error: unable to get local issuer certificate
    at Bot.<anonymous> (/usr/local/lib/node_modules/horus/node_modules/slackbots/index.js:42:28)
    at Array.<anonymous> (/usr/local/lib/node_modules/horus/node_modules/vow/lib/vow.js:713:56)
    at Immediate.callFns (/usr/local/lib/node_modules/horus/node_modules/vow/lib/vow.js:24:35)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

This error is occurring on OSX with Node v0.12.0 and v7.1.0. The code looks like:

slack.on('start', function() {
    slack.postMessageToGroup(channel, message, null, function(data){ /** ... */ });
});
mpaz-redstage commented 5 years ago

how to fix this issue?