Wrong net amount for player

Report bugs found in Poker Mavens
Grim
Posts: 87
Joined: Thu Oct 15, 2020 8:11 pm

Wrong net amount for player

Post by Grim »

I had a player who joined a table at around 2:30 AM bought in for 200, busted and left. I have a SMS service which reports the net amount and it said -620 ? I checked the event log for that night, and that cashtable was the only action he had past midnight. Checking the callback.log I can see
{"Event":"RingGameLeave","Name":"Atlantis #4 (5-5 Dealer's Choice)","Player":"døvedaffen","Amount":"0","Net":"-620","Expired":"No","Time":"2023-01-01 03:03:24"}
but I have no idea how the software ended up at -620.

Checking the event log before midnight, he's not even in the logs so I'm not sure how it got that number. Any idea?

The event log with his nick:
2023-01-01 02:15:10|Login|døvedaffen logged into session 000000AA from IP <ip>, PC <hex>
2023-01-01 02:15:25|Logout|døvedaffen logged out session 000000AA, PC <same hex>
[...]
2023-01-01 02:22:50|Login|døvedaffen logged into session 000000AB from IP <same ip>, PC <same hex>
[...]
2023-01-01 02:31:11|Account|døvedaffen -200 balance 4200 (Atlantis #4 (5-5 Dealer's Choice))
2023-01-01 02:31:11|House|Ring +200 balance 900 (døvedaffen joins Atlantis #4 (5-5 Dealer's Choice))
2023-01-01 02:31:11|Table|døvedaffen joins Atlantis #4 (5-5 Dealer's Choice)
[...]
2023-01-01 03:03:24|Account|døvedaffen +0 balance 4200 (Atlantis #4 (5-5 Dealer's Choice))
2023-01-01 03:03:24|House|Ring +0 balance 2115 (døvedaffen leaves Atlantis #4 (5-5 Dealer's Choice))
2023-01-01 03:03:24|Table|døvedaffen leaves Atlantis #4 (5-5 Dealer's Choice)
[...]
2023-01-01 03:05:07|Logout|døvedaffen logged out session 000000AB, PC <same hex>
Kent Briggs
Site Admin
Posts: 5901
Joined: Wed Mar 19, 2008 8:47 pm

Re: Wrong net amount for player

Post by Kent Briggs »

Was there any activity by that player on that table from earlier in the day? Is there a rathole period set for that table? If so, I'm wondering if his Net field carried over from then.
Grim
Posts: 87
Joined: Thu Oct 15, 2020 8:11 pm

Re: Wrong net amount for player

Post by Grim »

There's a 360 minutes rathole on all cash tables.
I searched for his nick in today's event log (1/1/2023) and the above is all the hits I got on his nick. Also, he was able to sit down with 200 so that shouldn't indicate any rathole in effect.
I also checked yesterday's event log (31/12/2023) and he never logged in that day.

I should mention that all other players works fine, however he was the first player to trigger this type of sms. And there was SnG running earlier that night, ending 02:24:49 which also triggers a result sms that failed. Probably due to my code. The error log says :
2023-01-01 02:24:50|Callback event error: HTTP/1.1 500 Internal Server Error
2023-01-01 02:25:08|Callback events resumed

So to summarize, SnG finish, callback is fired from mavens server to my web-server which triggers some (most likely) faulty api calls, mavens returns 500. We play some cash game, callbacks works fine, player leave, and the net amount in the callback is (apparently) wrong. Also, the cash player didn't play SnG either.
Grim
Posts: 87
Joined: Thu Oct 15, 2020 8:11 pm

Re: Wrong net amount for player

Post by Grim »

I'm not quite sure what's going on, but I think there's some change to the callbacks?

I was investigating why there wasn't any SMS being sent out when a tournament finished. I can see that the last time it worked was December 24th. After that it hasn't worked. However, my code hasn't changed since November 2nd. I have a callback.php running on a web-server which the pmavens server sends callbacks to. I'm using your example code as starting point and then expanded from there. So on TourneyFinish, I fire off an API call with :

Code: Select all

 
 	 $tmpTrnyName = $_POST["Name"];
         $tmpTrnyTime = $_POST["Time"];
 	 $date = explode(" ", $tmpTrnyTime);
         $params = array("Command" => "TournamentsResults", "Name" => $tmpTrnyName, "Date" => $date[0]);
         $api = Poker_API($params);
and I have some debug code so this part works. However, when I check the callback.log on my web server I see this:

Code: Select all

Event = TourneyFinish
Name = 500kr Sit'n'Go NLHE
Number = 101
Time = 2023-01-03 22:45:23

CB DEBUG, key - value : 0 - Tournament=500kr Sit'n'Go NLHE
CB DEBUG, output_arrayArray
(
)

Event = TourneyFinish
Name = 500kr Sit'n'Go NLHE
Number = 101
Time = 2023-01-03 22:45:23

CB DEBUG, key - value : 0 - Tournament=500kr Sit'n'Go NLHE
CB DEBUG, output_arrayArray
(
)

Event = Balance
Player = ***
Change = -5
Balance = 3606
Source = Atlantis #4 (5-5 Dealer's Choice) rebuy
Time = 2023-01-03 22:45:34
(The CB debug lines are just debug info for me)

while Callback log on pmavens server this:

Code: Select all

{"Event":"Hand","Hand":"39227-139","Type":"Tourney","Name":"500kr Sit'n'Go NLHE","Table":"1","Time":"2023-01-03 22:45:23"}
{"Event":"TourneyFinish","Name":"500kr Sit'n'Go NLHE","Number":"101","Time":"2023-01-03 22:45:23"}
{"Event":"Balance","Player":"Steinardo79","Change":"-5","Balance":"3606","Source":"Atlantis #4 (5-5 Dealer's Choice) rebuy","Time":"2023-01-03 22:45:34"}
and then we have the event log saying:

Code: Select all

2023-01-03 22:45:23|House|Tourney -2250 balance 0 (*** prize from 500kr Sit'n'Go NLHE)
2023-01-03 22:45:24|API|TournamentsResults from ***
2023-01-03 22:45:24|API|TournamentsResults from ***
2023-01-03 22:45:34|Account|*** -5 balance 3606 (Atlantis #4 (5-5 Dealer's Choice) rebuy)
(2 API calls since we get the TourneyFinish twice)

and finally the error log:

Code: Select all

2023-01-03 22:45:24|Callback event error: HTTP/1.1 500 Internal Server Error
2023-01-03 22:45:34|Callback events resumed
So I'm not quite sure why it sends a 500 when it actually sent it twice?

This post might be worthy of a thread on its own, considering my 1st post in this thread was about incorrect cash game net amount but I suspect they're related.
Kent Briggs
Site Admin
Posts: 5901
Joined: Wed Mar 19, 2008 8:47 pm

Re: Wrong net amount for player

Post by Kent Briggs »

Grim wrote: Tue Jan 03, 2023 5:33 pm I'm not quite sure what's going on, but I think there's some change to the callbacks?
Which version of PM are you running?
Grim
Posts: 87
Joined: Thu Oct 15, 2020 8:11 pm

Re: Wrong net amount for player

Post by Grim »

v7.11, upgraded the 21st of December.
Here's SNGs that were played and where SMS was or wasn't sent out:
21st - SMS
22nd - SMS
23rd - SMS
24th - SMS
27th - no SMS
28th - no SMS
31st - no SMS
1st - no SMS
1st - no SMS
1st - no SMS
1st - no SMS (yes, 4 SNGs that day)
3rd - no SMS
Kent Briggs
Site Admin
Posts: 5901
Joined: Wed Mar 19, 2008 8:47 pm

Re: Wrong net amount for player

Post by Kent Briggs »

The callback error indicates that it could not make a connection to your site. But the local log file should still have the records that didn't make it out.
Grim
Posts: 87
Joined: Thu Oct 15, 2020 8:11 pm

Re: Wrong net amount for player

Post by Grim »

Ah jesus. I just remembered that I upgraded the server from Ubuntu 20.04 to 22.04 and with that from php7.x to php8.1 so it's probably something there, right? The upgrade happened on either the 25th or 26th. Can't belive I forgot that.

Any idea how I can check my php7 code with php8 and find out what fails?
Kent Briggs
Site Admin
Posts: 5901
Joined: Wed Mar 19, 2008 8:47 pm

Re: Wrong net amount for player

Post by Kent Briggs »

Grim wrote: Wed Jan 04, 2023 4:32 am Ah jesus. I just remembered that I upgraded the server from Ubuntu 20.04 to 22.04 and with that from php7.x to php8.1 so it's probably something there, right?
I wouldn't think a failed connection would be php related. That typically happens at the O/S level.
Grim
Posts: 87
Joined: Thu Oct 15, 2020 8:11 pm

Re: Wrong net amount for player

Post by Grim »

Well, then I do something to trigger it cause a SNG just finished and the same thing happened. I get a tourney finish, I do an API call for tourney results, I get another finish and do another api call. Callback log on web server says

Code: Select all

Event = TourneyFinish
Name = 500kr Sit'n'Go PLO
Number = 102
Time = 2023-01-04 22:10:54

CB DEBUG, Date : 2023-01-04
CB DEBUG, key - value : 0 - Tournament=500kr Sit'n'Go PLO
CB DEBUG, output_arrayArray
(
)

Event = TourneyFinish
Name = 500kr Sit'n'Go PLO
Number = 102
Time = 2023-01-04 22:10:54

CB DEBUG, Date : 2023-01-04
CB DEBUG, key - value : 0 - Tournament=500kr Sit'n'Go PLO
CB DEBUG, output_arrayArray
(
)
and the mavens server says

Code: Select all

2023-01-04 22:10:55|Callback event error: HTTP/1.1 500 Internal Server Error
2023-01-04 22:11:38|Callback events resumed
Also both servers are (wired) in my home network (i.e. not wireless).
Post Reply