smoak / njabbr

Node.js Jabbr.net client
4 stars 7 forks source link

Problems getting it started #2

Closed lindsve closed 11 years ago

lindsve commented 12 years ago

Hi,

I'm trying to get Hubot working with Jabbr now, following the post at http://www.laurentkempe.com/post/Automate-your-Jabbr-chat-using-Github-Hubot-all-running-on-a-Windows-machine.aspx

When I try to start Hubot, I get the following error:

PS C:\hubot\node_modules\hubot> node .\node_modules\coffee-script\bin\coffee .\bin\hubot -a jabbr

undefined:1 0","Error":null,"S ^ SyntaxError: Unexpected token ´╗┐ at Object.parse (native) at transportLogic.send (C:\hubot\node_modules\hubot\node_modules\hubot-jabbr\node_modules\njabbr\lib\signalr.js:106: 27) at Request.SignalRHttp.post as _callback at Request.init.self.callback (C:\hubot\node_modules\hubot\node_modules\hubot-jabbr\node_modules\njabbr\node_modules \request\main.js:122:22) at Request.EventEmitter.emit (events.js:91:17) at Request. (C:\hubot\node_modules\hubot\node_modules\hubot-jabbr\node_modules\njabbr\node_modules\reques t\main.js:661:16) at Request.EventEmitter.emit (events.js:115:20) at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (C:\hubot\node_modules\hubot\node_modules\h ubot-jabbr\node_modules\njabbr\node_modules\request\main.js:623:14) at IncomingMessage.EventEmitter.emit (events.js:115:20) at IncomingMessage._emitEnd (http.js:366:10) PS C:\hubot\node_modules\hubot> explorer . PS C:\hubot\node_modules\hubot>

Any idea what can be wrong?

smoak commented 12 years ago

What version of hubot are you using? hubot-jabbr only supports 2.3 or above.

lindsve commented 12 years ago

I started from scratch, so I'm on the latest from npm (v2.3.4). Tried first with the latest version of node and then reverted to 0.8.2 which seems to be the one used in the blog post. No difference though.

Jabbr is the latest from github.

smoak commented 12 years ago

Hmm, it's possible the latest Jabbr from git has some changes that make this break. I'm not able to run Jabbr locally from git so I've just been coding/testing against http://jabbr.net. If you have your Jabbr server public, I could try pointing the bot at it and see whats going on.

lindsve commented 12 years ago

Unfortunately, we have our Jabbr server inside our VPN. I see that they publish which changeset they use on jabbr.net so I can try to pull that and try it again with the same version on our server.

lindsve commented 12 years ago

It was deployed a new version to Jabbr.net yesterday. Can you try the bot with it and see if it works there?

smoak commented 12 years ago

Looks like it doesn't work. I'll have to investigate why.

smoak commented 12 years ago

It appears like this is caused by signalr sending back a BOM. Someone has a fix for it in the pipeline: https://github.caom/SignalR/SignalR/pull/963 In the meantime I'll add a quick check to "de-bom" responses if it's present

lindsve commented 12 years ago

Nice, thanks for figuring out the issue. I'll keep an eye open and see if the pull request is integrated and try again.

lindsve commented 11 years ago

Updated to latest today and the problem above is now gone. I still can't get Hubot to appear in our Jabbr chat room though.

When I start hubot with "node node_modules\coffee-script\bin\coffee bin\hubot" then hubot starts and I can interact with him. When I add the adapter though with "node node_modules\coffee-script\bin\coffee bin\hubot -a jabbr", then it sits there waiting (I assume the script is running), but Hubot does not appear in the chat room that I've specified in the environment variable HUBOT_JABBR_ROOMS. Any idea how to troubleshoot this further?

smoak commented 11 years ago

It looks like the protocol also changed with the latest jabbr.net. I'm currently working on updating this to work with this updated protocol. It's mostly finished, but needs some extra polish before I release it. You can track the progress on this branch: https://github.com/smoak/njabbr/tree/rewrite I'll let you know when I release an update (hopefully this week). It'll be released with version 2.0.0 in order to work with the updated protocol.

lindsve commented 11 years ago

Cool, thanks for the update

smoak commented 11 years ago

Hey I've finished rewriting njabbr and have released it to master and v 1.0.0 to npm. I was able to use it and connect it to the current version of http://jabbr.net so please let me know if it doesn't work for you.

lindsve commented 11 years ago

Works like a charm. Thanks!