CharlieHess / slack-poker-bot

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

Crashed when failed to create board images #14

Closed jameshartig closed 9 years ago

jameshartig commented 9 years ago
Creating board image timed out
Creating board image timed out
Creating board image timed out

/media/james.hartig/slack-poker-bot/node_modules/rx/dist/rx.js:579
    throw e;
          ^
TypeError: Cannot call method 'toString' of undefined
    at /media/james.hartig/slack-poker-bot/src/hand-evaluator.js:24:54
    at Array.map (native)
    at Function.evaluateHands (/media/james.hartig/slack-poker-bot/src/hand-evaluator.js:24:37)
    at PotManager.endHandWithShowdown (/media/james.hartig/slack-poker-bot/src/pot-manager.js:184:34)
    at AnonymousObserver._onNext (/media/james.hartig/slack-poker-bot/src/texas-holdem.js:450:27)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (/media/james.hartig/slack-poker-bot/node_modules/rx/dist/rx.js:1778:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/media/james.hartig/slack-poker-bot/node_modules/rx/dist/rx.js:1710:35)
    at AnonymousObserver.tryCatcher (/media/james.hartig/slack-poker-bot/node_modules/rx/dist/rx.js:567:29)
    at AutoDetachObserverPrototype.next (/media/james.hartig/slack-poker-bot/node_modules/rx/dist/rx.js:5274:51)
    at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/media/james.hartig/slack-poker-bot/node_modules/rx/dist/rx.js:1710:35)```
richardtape commented 9 years ago

I'm getting the same issue. Seems to happen after about 10 hands or so. 2 players only. Was chatting in a separate channel, so only the commands happening in the both's channel.

Welcome to Slack. You are dealer of <snip>
You are in: general
Your open DM's: slackbot, <snip>, <snip>
Creating board image timed out
Creating board image timed out
Creating board image timed out
/sites/slack-poker-bot/node_modules/rx/dist/rx.js:579
    throw e;
          ^
TypeError: Cannot read property 'toString' of undefined
    at /sites/slack-poker-bot/src/hand-evaluator.js:24:53
    at Array.map (native)
    at Function.evaluateHands (/sites/slack-poker-bot/src/hand-evaluator.js:24:37)
    at PotManager.endHandWithShowdown (/sites/slack-poker-bot/src/pot-manager.js:184:34)
    at AnonymousObserver._onNext (/sites/slack-poker-bot/src/texas-holdem.js:450:27)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (/sites/slack-poker-bot/node_modules/rx/dist/rx.js:1778:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/sites/slack-poker-bot/node_modules/rx/dist/rx.js:1710:35)
    at AnonymousObserver.tryCatcher (/sites/slack-poker-bot/node_modules/rx/dist/rx.js:567:29)
    at AutoDetachObserverPrototype.next (/sites/slack-poker-bot/node_modules/rx/dist/rx.js:5274:51)
    at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/sites/slack-poker-bot/node_modules/rx/dist/rx.js:1710:35)
richardtape commented 9 years ago

Also, the bot was sending messages such as

Your hand is: ,

i.e. no hand

It then put this into the main channel

Dealing the turn:
,,,

dealerBOT [4:12 PM]
Dealing the river:
,,,,
richardtape commented 9 years ago

(I also just want to add that this is freaking awesome and thank you so much for putting it together :) )

jasonlemay commented 9 years ago

Had the same problem with Your hand is: , in a room of three players after about 10 hands (other players had the same issue).

And +1 to this is freaking awesome

CharlieHess commented 9 years ago

:sparkling_heart: Thanks for the feedback! I haven't seen this issue yet but I'll fiddle with it tonight. If you're seeing Creating board image timed out a lot it might be a network latency issue; very feasible that there are bugs around this.

CharlieHess commented 9 years ago

Should be fixed with #29.