hipchat / hubot-hipchat

HipChat adapter for GitHub's Hubot
https://www.hipchat.com/help/page/bots
MIT License
666 stars 252 forks source link

Adapter stopped connecting to hipchat #307

Closed dfraser closed 6 years ago

dfraser commented 6 years ago

This adapter was working perfectly for me for years... Now it won't connect at all. Perhaps Hipchat somehow broke compatibility. I've tried resetting the password for the Hipchat account I used, doing an npm update, updating packages on the host computer... no luck.

Here are the logs:

Jun 14 15:57:41 hubot systemd[1]: Starting Hubot...
[Thu Jun 14 2018 15:57:45 GMT-0400 (EDT)] DEBUG Loading adapter hipchat
[Thu Jun 14 2018 15:57:46 GMT-0400 (EDT)] DEBUG HipChat adapter options: {"jid":"xxxx_xxxx@chat.hipchat.com","password":"xxxxx","token":null,"rooms":"All","rooms_blacklist":"","host":null,"bosh":{"url":null},"autojoin":false,"xmppDomain":null,"reconnect":true}
[Thu Jun 14 2018 15:57:46 GMT-0400 (EDT)] INFO Connecting HipChat adapter...
[Thu Jun 14 2018 15:59:54 GMT-0400 (EDT)] DEBUG Disconnecting here
[Thu Jun 14 2018 15:59:54 GMT-0400 (EDT)] INFO Connection went offline
....

Here is my package.json:

{
  "name": "testbot",
  "version": "0.0.0",
  "private": true,
  "author": "",
  "description": "Test bot",
  "dependencies": {
    "amqplib": "0.5.1",
    "hubot": "^2.19.0",
    "hubot-diagnostics": "0.0.1",
    "hubot-google-images": "^0.2.6",
    "hubot-google-translate": "^0.2.0",
    "hubot-help": "^1.0.1",
    "hubot-heroku-keepalive": "^1.0.2",
    "hubot-hipchat": "^2.12.0-6",
    "hubot-maps": "0.0.2",
    "hubot-pugme": "^0.1.0",
    "hubot-redis-brain": "0.0.3",
    "hubot-rules": "^0.1.1",
    "hubot-scripts": "^2.17.2",
    "hubot-shipit": "^0.2.0",
    "sprintf-js": "^1.0.3",
    "thumbor": "^0.1.3",
    "xml2js": "^0.4.17"
  },
  "engines": {
    "node": "0.10.x"
  }
}
OrganicPanda commented 6 years ago

Same here, hope it starts working again soon

rwinikates commented 6 years ago

Also having similar issues with our connection.

bringink commented 6 years ago

I met the same issue. And I found following Workaround for Atlassian Server platform. https://confluence.atlassian.com/hipchatkb/hubot-stopped-working-on-hipchat-server-v2-0-7-and-later-867181545.html https://confluence.atlassian.com/hipchatkb/external-xmpp-ports-5222-5223-disabled-by-default-in-hipchat-server-2-0-7-859442760.html

Unfortunately my hipchat is using Atlassian Cloud which I couldn't find any workaround for cloud so far.

dangerbell commented 6 years ago

Same issue here. Sometimes it claims to reconnect successfully, but I'm never able to use robot.messageRoom() to send a message. It always gives me this error:

2018-06-19T22:40:25.296953+00:00 app[web.1]: [Tue Jun 19 2018 22:40:25 GMT+0000 (Coordinated Universal Time)] ERROR TypeError: Cannot read property 'message' of undefined
2018-06-19T22:40:25.296957+00:00 app[web.1]: at Robot.HipChat.send (/app/node_modules/hubot-hipchat/src/hipchat.coffee:35:7, <js>:50:38)
2018-06-19T22:40:25.296959+00:00 app[web.1]: at Robot.messageRoom (/app/node_modules/hubot/src/robot.js:608:23)
2018-06-19T22:40:25.296960+00:00 app[web.1]: at /app/scripts/github-workflow.coffee:157:70, <js>:111:14
2018-06-19T22:40:25.296962+00:00 app[web.1]: at Object.callback (/app/node_modules/githubot/lib/githubot.js:113:20)
2018-06-19T22:40:25.296963+00:00 app[web.1]: at next (/app/node_modules/async/lib/async.js:723:43)
2018-06-19T22:40:25.296965+00:00 app[web.1]: at /app/node_modules/async/lib/async.js:24:16
2018-06-19T22:40:25.296967+00:00 app[web.1]: at IncomingMessage.<anonymous> (/app/node_modules/scoped-http-client/src/index.js:95:22)
2018-06-19T22:40:25.296968+00:00 app[web.1]: at IncomingMessage.emit (events.js:187:15)
2018-06-19T22:40:25.296970+00:00 app[web.1]: at endReadableNT (_stream_readable.js:1081:12)
2018-06-19T22:40:25.296971+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:63:19)

(github-workflow.coffee is our custom code.)

Oddly enough plugins we didn't write still seem to work. But I can't see a difference between how they're created.

andrewmeissner commented 6 years ago

Same issue here. :(

mwarkentin commented 6 years ago

We are seeing the same - get hundreds of "connection offline" logs when restarting the hubot process.

slepp commented 6 years ago

I found that by using both the master branch of this repo (instead of the 2.12.0-6 release version) and changing the hipchat.coffee send method, it seems to be back to normal now. The repeated connection offline output is cleaned up in this master, but the messageRoom method was still broken afterward.

The commit is https://github.com/slepp/hubot-hipchat/commit/126f87591bc5555c1df329fca91141b7c3ac189c

I've pushed the little change to my own repo: https://github.com/slepp/hubot-hipchat

rberrelleza commented 6 years ago

@slepp if that fixes the issue, could you send a PR? I can merge and release a new version later today.

slepp commented 6 years ago

This may be fixed partly by #308 and #304, those two combined fixed things for us.

dfraser commented 6 years ago

Solved by migrating team to Slack :|

andrewmeissner commented 6 years ago

same...