CharlieHess / slack-poker-bot

A bot that deals Texas Hold'em games in Slack
MIT License
1.66k stars 208 forks source link

Random crash while idle #50

Open jabbink opened 8 years ago

jabbink commented 8 years ago

Sorry for lack of information, but sometimes, while being idle for some hours, the bot just closes; often without an error, sometimes with this error:

/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:579
    throw e;
          ^
TypeError: undefined is not a function
    at AnonymousObserver._onNext (/home/poker/slack-poker-bot/src/player-interaction.js:102:33)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:1778:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:1710:35)
    at AnonymousObserver.tryCatcher (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:567:29)
    at InnerObserver.onNext (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:4154:41)
    at InnerObserver.tryCatcher (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:567:29)
    at AutoDetachObserverPrototype.next (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:5274:51)
    at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:1710:35)
    at AnonymousObserver._onNext (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:5079:13)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (/home/poker/slack-poker-bot/node_modules/rx/dist/rx.js:1778:12)

Oh god, I love Rx, those stacktraces are always so useful.

CharlieHess commented 8 years ago

Ugh, maybe somewhere in here? That's bizarre.

let timeExpired = rx.Observable.timer(0, 1000, scheduler)
  .take(timeout + 1)
  .do((x) => timeoutMessage.updateMessage(formatMessage(`${timeout - x}`)))
  .publishLast();
austinpray commented 8 years ago

Mine is also raising exceptions while idle.

Error: Uncaught, unspecified "error" event.
    at Error (native)
    at Client.emit (events.js:87:13)
    at Client._onLogin (/home/austin/slack-poker-bot/node_modules/slack-client/src/client.js:74:14)
    at /home/austin/slack-poker-bot/node_modules/slack-client/src/client.js:2:59
    at IncomingMessage. (/home/austin/slack-poker-bot/node_modules/slack-client/src/client.js:672:22)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickDomainCallback (node.js:381:11)

I am on c206214ff74c60bca4158045a3925bf32098e31f with node 0.12 on Ubuntu.

image

Hope this helps!

mikekhristo commented 8 years ago

Not noticing this anymore - are you guys still affected?

dkindler commented 8 years ago

I'm still affected by this bug