-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
robot messageRoom not working #69
Comments
You are using an old version of the adapter, the current one is 0.7.2. What's the hubot version you're running? |
Hubot version is 2.7.4 (I made a mistake and wrote 2.4.6 in my first message). |
Yes please. The 0.6 is using an older api package version too so that might break things too. |
I've changed to 0.7.2 and I'm still getting nothing. |
I'm testing with this script (message-room.coffee) in https://gist.github.com/Mumakil/1a8b2f12c82c6cc04b89 and it works fine. Could you try if you can get any debug information with the error-handler.coffee in the same gist? It adds an error handler to hubot and logs all errors (and also tries to post the error to the first flow it knows about). Also, I didn't notice this before, but the hubot version you're using is somewhat old too. Current is 2.10.0. I've been testing with 2.9.3. |
Hi, kmejka@kmejka ~/D/hubot> ./bin/hubot -a flowdock
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
[Fri Jan 30 2015 15:57:57 GMT+0100 (CET)] INFO /home/kmejka/Dokumenty/hubot/scripts/error-handler.coffee is using deprecated documentation syntax
[Fri Jan 30 2015 15:57:57 GMT+0100 (CET)] INFO /home/kmejka/Dokumenty/hubot/scripts/message-room.coffee is using deprecated documentation syntax
[Fri Jan 30 2015 15:57:58 GMT+0100 (CET)] ERROR hubot-heroku-alive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web_url | cut -d= -f2)`
[Fri Jan 30 2015 15:57:58 GMT+0100 (CET)] INFO Using default redis on localhost:6379
[Fri Jan 30 2015 15:57:58 GMT+0100 (CET)] INFO Data for hubot brain retrieved from Redis
[Fri Jan 30 2015 15:57:58 GMT+0100 (CET)] INFO Found 7 flows.
[Fri Jan 30 2015 15:57:58 GMT+0100 (CET)] INFO Connecting to Flowdock as user Hubot (id 76465).
[Fri Jan 30 2015 15:57:58 GMT+0100 (CET)] INFO Flowdock: connecting
[Fri Jan 30 2015 15:57:59 GMT+0100 (CET)] INFO Flowdock: connected and streaming
[Fri Jan 30 2015 15:58:16 GMT+0100 (CET)] ERROR Unexpected error in Flowdock client: Error: Received status 403
[Fri Jan 30 2015 15:58:20 GMT+0100 (CET)] ERROR Unexpected error in Flowdock client: Error: Received status 403 My {
"name": "y",
"version": "0.0.0",
"private": true,
"author": "y",
"description": "y",
"dependencies": {
"hubot": "^2.11.0",
"hubot-diagnostics": "0.0.1",
"hubot-flowdock": "^0.7.3",
"hubot-google-images": "^0.1.2",
"hubot-google-translate": "^0.1.0",
"hubot-help": "^0.1.1",
"hubot-heroku-keepalive": "0.0.4",
"hubot-maps": "0.0.1",
"hubot-pugme": "^0.1.0",
"hubot-redis-brain": "0.0.2",
"hubot-rules": "^0.1.0",
"hubot-scripts": "^2.5.16",
"hubot-shipit": "^0.1.1",
"hubot-youtube": "^0.1.2"
},
"engines": {
"node": "0.10.x"
}
} |
It seems you are receiving 403 errors from the API, which means the bot probably isn't part of that flow, so it's not allowed to post to the flow. Could you double check that you can see the bot in the flow you're trying to post to and reconnect the bot (newest version of hubot-flowdock 0.7.4 reconnects automatically if flows change). |
I've checked flowdock and the robot is part of the flow, it is displayed there. I can communicate with it and the robot responds. I'll update to the newest version and check then. |
I did a clean install of hubot, with the newest flowdock adapter. I've got the 0.7.4 flowdock adapter in All of these ways failed (no message in flow), for the first two I got an error in the console, |
@Mumakil any update? |
Sorry, couldn't figure out what might be wrong by looking at our logs. Your bot/flows seem to be in correct shape too. By the way, the last format is the correct one, you need to give the To debug, you could add logging to the node-flowdock adapter (should be in |
I have changed the return request(options, (function(_this) {
return function(err, res, body) {
console.log(err, res, body);
var error;
if (err) {
... Unfortunately I don't see anything in the logs. If I use to full long id I get nothing in the logs, but the message does not appear in the flow. If I use a wrong flow id (or the flow name) I get a really long message in the logs with the full json of the error, with the message somewhere kmejka@kmejka-work ~/D/hubot> ./bin/hubot -a flowdock
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
[Mon Feb 09 2015 14:54:35 GMT+0100 (CET)] INFO Ignoring all messages from user ids 0
[Mon Feb 09 2015 14:54:35 GMT+0100 (CET)] WARNING Expected /home/kmejka/Dokumenty/hubot/scripts/deployToStack to assign a function to module.exports, got object
[Mon Feb 09 2015 14:54:35 GMT+0100 (CET)] INFO /home/kmejka/Dokumenty/hubot/scripts/error-handler.coffee is using deprecated documentation syntax
[Mon Feb 09 2015 14:54:35 GMT+0100 (CET)] INFO /home/kmejka/Dokumenty/hubot/scripts/message-room.coffee is using deprecated documentation syntax
[Mon Feb 09 2015 14:54:35 GMT+0100 (CET)] ERROR hubot-heroku-alive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web_url | cut -d= -f2)`
[Mon Feb 09 2015 14:54:35 GMT+0100 (CET)] INFO Using default redis on localhost:6379
[Mon Feb 09 2015 14:54:36 GMT+0100 (CET)] INFO Found 7 flows.
[Mon Feb 09 2015 14:54:36 GMT+0100 (CET)] INFO Connecting to Flowdock as user Hubot (id 76465).
[Mon Feb 09 2015 14:54:36 GMT+0100 (CET)] INFO Flowdock: connecting
[Mon Feb 09 2015 14:54:37 GMT+0100 (CET)] INFO Flowdock: connected and streaming |
@Mumakil any update? module.exports = (robot) ->
robot.respond /test/i, (msg) ->
console.log 'starting test'
robot.messageRoom '624dbb2a-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx', 'dupa2' |
Sorry it took so long to figure out what's wrong: my script had a flaw in the Regex and didn't recognize id's with dashes... I've updated the gist above! There are also some other stability updates. |
@Mumakil and @anttipitkanen, how can we make sure our hubot is part of flowdock... here i am using following environment to set up hubot-flowdock integration... System environment : Also used Following Environment variables... HUBOT_FLOWDOCK_API_TOKEN Also i am able to listening all available flows in Flowdock using windows CMD console....Following is the console display C:\hubot>bin\hubot -a flowdock Then i tried to chat with hubot with some default commands from respective flows...for which i have written coffee script with flow id....but i am not able get response. whereas working fine with shell as a adapter... Do let me know how to get hubot is residing in flowdock after successful streaming with flowdock.... or please do mention steps to inviting hubot in flowdock's room and how to test the integration successful... |
It will be great if anyone address this issue.... |
@VijayBI sorry I'm not a developer on the hubot, hubot-flowdock or flowodck projects. I was just a user of hubot who needed some problem to be solved. Please address this issue to the maintainers of the hubot or hubot-flowdock projects. |
@kmejka its ok, thanks... |
@Mumakil and @anttipitkanen, how can we make sure our hubot is part of flowdock... here i am using following environment to set up hubot-flowdock integration... System environment : Also used Following Environment variables... HUBOT_FLOWDOCK_API_TOKEN Also i am able to listening all available flows in Flowdock using windows CMD console....Following is the console display C:\hubot>bin\hubot -a flowdock Then i tried to chat with hubot with some default commands from respective flows...for which i have written coffee script with flow id....but i am not able get response. whereas working fine with shell as a adapter... Do let me know how to get hubot is residing in flowdock after successful streaming with flowdock.... or please do mention steps to inviting hubot in flowdock's room and how to test the integration successful... |
@VijayBI sorry, neither of us is working for Flowdock anymore so I doubt we'll be of much use. You should probably contact [email protected] if nobody's reading these issues. |
Hi,
I've wanted to try out the messageRoom functionality. Unfortunately I'm having problems with it, either my script is wrong, or I'm using it wrong.The script I wrote essentially does nothing (apart from logging to console). All i get is an entry in the logs:
2014-12-10_12:38:28.19080 [Wed Dec 10 2014 12:38:28 GMT+0000 (UTC)] DEBUG Message 'hubot test222222' matched regex //^[@]?hubot[:,]?\s*(?:test222222)/i/ 2014-12-10_12:38:28.19116 sent message
. Any help would be appreciated.The script:
I got the room id, by doing a call to the flowdock api, like this:
curl -X GET https://<user>:<pass>@api.flowdock.com/flows
My setup:
hubot version - 2.4.6
The text was updated successfully, but these errors were encountered: