avatarkava / beavisbot

A node.js powered bot for plug.dj and dubtrack.fm
https://github.com/avatarkava/beavisbot/wiki
MIT License
22 stars 20 forks source link

Dub Ban crashes the bot #115

Closed dorkix closed 8 years ago

dorkix commented 8 years ago

Hey, after banning someone from the room, doing .idle crashes the bot with following error:

at emitOne (events.js:77:13) at IncomingMessage.<anonymous> (/home/ubuntu/workspace/node_modules/dubapi/node_modules/pubnub/node.js/pubnub.js:2259:17) at doNTCallback2 (node.js:429:9) at process._tickCallback (node.js:343:17))

and sometimes banning someone crashes the bot without doing any other command with following error

TypeError: Cannot read property 'username' of undefined at IncomingMessage.<anonymous> (/home/ubuntu/workspace/node_modules/dubapi/node_modules/pubnub/node.js/pubnub.js:2259:17) at doNTCallback2 (node.js:429:9) at process._tickCallback (node.js:343:17)

I think new dubapi and dubtrack updates might have screwed something.

Also whoever executes ban bot recognizes them as they left the room along with banned user even though they are still in the room

It doesn't give any more info other than that.

avatarkava commented 8 years ago

Is that the full stack trace (error message) you're getting on both those? They look incomplete.

dorkix commented 8 years ago

Yes i copy/pasted everything that spits out in the terminal window when bot crashes. Any time someone is banned, bot crashes and user that initiated ban is reported to leave room alongside banned user in the terminal window.

dorkix commented 8 years ago

UPDATE : after trying to reproduce this crash as best as i can, theres new exception stack in my last comment >>

PS. Crash occurs ONLY after doing ANY [.] command (ex. [.idle]) AFTER banning someone.

dorkix commented 8 years ago

Any news about this problem? Thought it might be on dub's end(can still be?!) because of updates but it is still broken, is this info satisfactory? I added descriptions of what happens at time of the bot crash. http://imgur.com/2avrqQF -> screenshot of the error stack when bot crashes

PS. i also emailed dubtrack, hopefully they will check it out to see if the problem is on their end