node-slack-sdk: Reconnect doesn't work very well

I have hubot with slack adapter and it fails to reconnect after connection loss.

# docker logs -f slack-hubot

> topface-slack-hubot@0.2.0 start /app
> coffee ./node_modules/.bin/hubot --adapter slack

Sat, 13 Dec 2014 13:41:55 GMT connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead at node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
Sat, 13 Dec 2014 13:41:55 GMT connect deprecated limit: Restrict request size at location of read at node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
[Sat Dec 13 2014 13:41:55 GMT+0000 (UTC)] DEBUG Loading adapter slack
[Sat Dec 13 2014 13:41:55 GMT+0000 (UTC)] INFO Connecting...
[Sat Dec 13 2014 13:41:57 GMT+0000 (UTC)] INFO Logged in as hubot of topface, but not yet connected
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] INFO Slack client now connected
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Loading scripts from /app/scripts
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Parsing help for /app/scripts/deploy.coffee
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Loading scripts from /app/src/scripts
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Loading hubot-scripts from /app/node_modules/hubot-scripts/src/scripts
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Parsing help for /app/node_modules/hubot-scripts/src/scripts/applause.coffee
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Loading external-scripts from npm packages
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Parsing help for /app/node_modules/hubot-help/src/help.coffee
[Sat Dec 13 2014 13:41:58 GMT+0000 (UTC)] DEBUG Parsing help for /app/node_modules/hubot-google-images/src/google-images.coffee
[Sat Dec 13 2014 13:42:02 GMT+0000 (UTC)] DEBUG Received message: '<censored>' in channel: stage-deploy, from: bobrik
[Sat Dec 13 2014 13:47:50 GMT+0000 (UTC)] DEBUG Received message: '<censored>' in channel: stage-deploy, from: ivanpochtar
[Sat Dec 13 2014 13:47:50 GMT+0000 (UTC)] DEBUG Message '<censored>' matched regex //^\s*[@]?hubot[:,]?\s*(?:deploy me (.*)$)/i/
[Sat Dec 13 2014 13:47:50 GMT+0000 (UTC)] DEBUG Sending to stage-deploy: <censored>
[Sat Dec 13 2014 13:52:06 GMT+0000 (UTC)] DEBUG Sending to stage-deploy: <censored>
[Sat Dec 13 2014 13:53:42 GMT+0000 (UTC)] DEBUG Received message: '<censored>' in channel: stage-deploy, from: ivanpochtar
[Sat Dec 13 2014 15:14:46 GMT+0000 (UTC)] DEBUG Received message: '<censored>' in channel: tf-mobile-random, from: topolog
[Sat Dec 13 2014 15:14:56 GMT+0000 (UTC)] DEBUG Received message: '<censored>' in channel: tf-mobile-random, from: topolog
[Sat Dec 13 2014 17:59:35 GMT+0000 (UTC)] DEBUG Received message: '<censored>' in channel: general, from: tony
[Sat Dec 13 2014 22:38:26 GMT+0000 (UTC)] DEBUG Received message: '<https://vk.com/public3861590?w=wall-3861590_1319>' in channel: random, from: amberovsky
[Sat Dec 13 2014 22:53:33 GMT+0000 (UTC)] ERROR Last pong is too old: 14.895
[Sat Dec 13 2014 22:53:33 GMT+0000 (UTC)] INFO Reconnecting in 1000ms
[Sat Dec 13 2014 22:53:33 GMT+0000 (UTC)] INFO Slack client closed
[Sat Dec 13 2014 22:53:34 GMT+0000 (UTC)] INFO Attempting reconnect
[Sat Dec 13 2014 22:53:34 GMT+0000 (UTC)] INFO Connecting...

and then nothing happens.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 25 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, first off, I apologize for how long it’s taken us to resolve these issues.

I just pushed the 2.0.0 release for this library, which is a ground up refactor with the aim of building a lib that both Slack and our external contributors can easily work with and improve.

It also includes substantially improved reconnection logic and handling, for both routine disconnects as well team_migration events and similar. I’ll also be making sure to expedite fixes for any issues with reconnection logic in particular, as I know that’s been a pain for folks in the past.

So, I’d suggest that the best way to resolve these issues is to upgrade to the latest version. If you have any problems in doing that, please create a new issue and I’ll try and help you in there.

This is really frustrating if hubot does deploys for qa 😢