Open redterror opened 9 years ago
Could you see if there are any relevant log lines when the bot starts? Also, which version of the adapter are you running?
I don't think any of these startup lines are relevant, but here's what I'm seeing:
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Loading adapter flowdock
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] INFO Ignoring all messages from user ids 0
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Loading scripts from /opt/hubot/scripts
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Loading scripts from /opt/hubot/src/scripts
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Loading hubot-scripts from /opt/hubot/node_modules/hubot-scripts/src/scripts
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/ackbar.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/do-it-live.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/eight-ball.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/excuse.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/facepalm.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/homer.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/im.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/inigo-montoya.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/isup.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/kittens.coffee
[Wed Jul 29 2015 15:26:29 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/meme_generator.coffee
[Wed Jul 29 2015 15:26:30 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-scripts/src/scripts/xkcd.coffee
[Wed Jul 29 2015 15:26:30 GMT+0000 (UTC)] DEBUG Loading external-scripts from npm packages
[Wed Jul 29 2015 15:26:30 GMT+0000 (UTC)] DEBUG Parsing help for /opt/hubot/node_modules/hubot-fliptable/src/fliptable.coffee
[Wed Jul 29 2015 15:26:30 GMT+0000 (UTC)] INFO Found 3 flows, and I have joined 2 of them.
[Wed Jul 29 2015 15:26:30 GMT+0000 (UTC)] INFO Connecting to Flowdock as user hubot (id 115860).
[Wed Jul 29 2015 15:26:30 GMT+0000 (UTC)] INFO Flowdock: connecting
[Wed Jul 29 2015 15:26:31 GMT+0000 (UTC)] INFO Flowdock: connected and streaming
[Wed Jul 29 2015 15:26:31 GMT+0000 (UTC)] INFO Flowdock: listening to flows: XXXX, YYYYY
We're on adapter version 0.7.6.
Hmm, no clues there... There have been some problems when using an old npm (https://github.com/flowdock/hubot-flowdock/issues/76), and updating the npm itself has resolved the issue. We've however made changes to how the dependencies are loaded so that shouldn't be an issue anymore. Just out of curiosity, which version npm are you using?
I think the root cause was that there were two versions of the core hubot
package installed, and the bot had a different version and the adapter had a different version. Some parts inside hubot are doing
Message = require('./message')
...
if message instanceof Message
# react to message
which causes obvious problems when those packages were different.
Originally the box had an old npm (1.13.x), so I upgraded it to 2.13.2, but didn't see any change. On the topic of dependencies, I don't suppose there might be an issue with the package.json generated by my chef cookbook here:
{
"name": "chef-managed-hubot",
"version": "2.13.2",
"author": "GitHub Inc.",
"private": true,
"keywords": "github hubot campfire bot",
"description": "A simple helpful Robot for your Company",
"licenses": [{
"type": "MIT",
"url": "http://github.com/github/hubot/raw/master/LICENSE"
}],
"repository" : {
"type": "git",
"url": "https://github.com/github/hubot.git"
},
"dependencies": {
"hubot": "2.13.2",
"hubot-scripts": "2.16.1",
"hubot-flowdock": ">= 0.6.0",
"hubot-fliptable": ">= 0.0.0",
"optparse": "1.0.3"
},
"engines": {
"node": ">= 0.8.x",
"npm": "1.1.x"
}
}
PS - Hi Otto! Took me a few to realize why your avatar was so familiar.
Hi Dave =) I'm sorry but I don't see anything that might be wrong. I'll try to dig deeper tomorrow.
Thanks! Just curious, might it have anything to do with the display-name setting in the flowdock app? There the bot is set to 'hubot' (to match the name), but seeing as how this whole issue is related to name recognition I thought I'd ask all the same.
It should tell you in the log if the name does not match the one the bot thinks it's called. If the displayname is the same name than you give it on command line, it should be fine.
I'm not sure if this is the same issue or just something similar, but we're having issues with this as well, specifically when sending messages to the flowdock messages REST API endpoint.
Hubot responds to messages coming from flowdock chat when somebody sends "@hubotname some-message" through the chat UI. But if a message is sent to the flowdock messages REST API using an appropriate flow token for a room where the bot is present and includes "@hubotname" in the message parameter hubot does not respond. It will respond when posting to the private message api using hubot's user id, however.
This is probably a dumb / basic issue, but I recently upgraded our hubot from 2.4.6 to 2.13.2 and the bot no longer responds to its name or to PMs. By "upgraded" I mean I simply mv'ed the old folder aside and did a fresh install with the same settings via a chef cookbook.
Several "when I hear" style plugins do work fine, and the debug output shows the bot is receiving content:
The bot is started as:
hubot --name hubot --adapter flowdock
and our API token is set in the env.