nodejitsu / kohai

I am kohai. I am a pluggable irc bot for managing real-time data events.
91 stars 17 forks source link

New tweets cause TypeError - no tweet to channel #68

Open willwh opened 12 years ago

willwh commented 12 years ago

Hi guys, here's my output.

When a user tweets to an account or hashtag I am tracking, the bot pukes:

willwh@web:~/node/kohai$ node bin/kohai TypeError: Cannot read property 'commandString' of undefined at [object Object].gotMessage (/home/willwh/node/kohai/lib/kohai.js:57:33) at [object Object]. (/home/willwh/node/kohai/lib/listeners.js:18:17) at [object Object]. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/eventemitter2/lib/eventemitter2.js:246:22) at [object Object].emit (/home/willwh/node/kohai/node_modules/hook.io/lib/hookio/hook.js:322:38) at [object Object].message (/home/willwh/node/kohai/node_modules/hook.io/lib/hookio/hook.js:451:14) at apply (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:127:17) at EventEmitter.handle (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:104:13) at /home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:69:20 at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/lazy/lazy.js:62:13) at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/lazy/lazy.js:46:19)

I'm connected to the Stratics IRC network - with a friend tweeting to one of the tracked tags: https://twitter.com/#!/w0bni

What more info can I provide to assist?

Marak commented 12 years ago

Without diving into it, I'm not really sure. It's probably a bad configuration setting that got set along the the way.

Can you try adding some console.log statements around https://github.com/nodejitsu/kohai/blob/master/lib/kohai.js#L53 to determine what data is getting passed into gotMessage() function? It would help if you let me know the values are you seeing for data and this.channels in that method.

willwh commented 12 years ago

Hi Marak, I can later today.... just finishing lunch and back to work. I thought maybe this would be caused by the tweet contents, (i.e. it was; !op wobni #darkfall)

So I fired up the bot again and my friend tweeted without a leading ! - although;

TypeError: Cannot read property 'length' of undefined at new Levenshtein (/home/willwh/node/kohai/node_modules/hook.io-twitter/node_modules/levenshtein/lib/levenshtein.js:68:44) at /home/willwh/node/kohai/node_modules/hook.io-twitter/lib/twitter.js:150:17 at Array.forEach (native) at [object Object].checkDistance (/home/willwh/node/kohai/node_modules/hook.io-twitter/lib/twitter.js:149:23) at [object Object].checkLanguage (/home/willwh/node/kohai/node_modules/hook.io-twitter/lib/twitter.js:141:8) at [object Object].checkTweet (/home/willwh/node/kohai/node_modules/hook.io-twitter/lib/twitter.js:128:10) at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io-twitter/lib/twitter.js:92:14) at EventEmitter.emit (events.js:64:17) at EventEmitter.processTweet (/home/willwh/node/kohai/node_modules/hook.io-twitter/node_modules/ntwitter/lib/twitter.js:257:14) at EventEmitter.emit (events.js:64:17) TypeError: Cannot read property 'commandString' of undefined at [object Object].gotMessage (/home/willwh/node/kohai/lib/kohai.js:57:33) at [object Object]. (/home/willwh/node/kohai/lib/listeners.js:18:17) at [object Object]. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/eventemitter2/lib/eventemitter2.js:246:22) at [object Object].emit (/home/willwh/node/kohai/node_modules/hook.io/lib/hookio/hook.js:322:38) at [object Object].message (/home/willwh/node/kohai/node_modules/hook.io/lib/hookio/hook.js:451:14) at apply (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:127:17) at EventEmitter.handle (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:104:13) at /home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:69:20 at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/lazy/lazy.js:62:13) at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/lazy/lazy.js:46:19) TypeError: Cannot read property 'commandString' of undefined at [object Object].gotMessage (/home/willwh/node/kohai/lib/kohai.js:57:33) at [object Object]. (/home/willwh/node/kohai/lib/listeners.js:18:17) at [object Object]. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/eventemitter2/lib/eventemitter2.js:246:22) at [object Object].emit (/home/willwh/node/kohai/node_modules/hook.io/lib/hookio/hook.js:322:38) at [object Object].message (/home/willwh/node/kohai/node_modules/hook.io/lib/hookio/hook.js:451:14) at apply (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:127:17) at EventEmitter.handle (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:104:13) at /home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/dnode-protocol/index.js:69:20 at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/lazy/lazy.js:62:13) at EventEmitter. (/home/willwh/node/kohai/node_modules/hook.io/node_modules/dnode/node_modules/lazy/lazy.js:46:19)

willwh commented 12 years ago

After updating node (was running 4.9 - eep) - seems like this is running nicely, although;

Tweet kept directly: @ilovedarkfall: @DarkfallMMORPG Can you folks tweet out blog updates? in console now - so I assume that is something in my config