How to debug BGA Service Error

Game development with Board Game Arena Studio
Post Reply
User avatar
Proton Dody
Posts: 2
Joined: 17 January 2021, 08:46

How to debug BGA Service Error

Post by Proton Dody »

I'm occasionally getting this error in my game and I don't know how to debug it:

Code: Select all

BGA Service Error. Unexpected error: BGA service error (2.boardgamearena.com 17/01 04:29:26
This is seen when clicking on the button "DISPLAY RECENT ERRORS FROM PRODUCTION (UNEXPECTED ERRORS)."

Clicking the other button DISPLAY RECENT ERRORS FROM PRODUCTION (PHP SYNTAX ERRORS) doesn't show any errors.

THE SITUATION:
After many moves by many players, a player reported the game wouldn't let him do an action (draw a card, which is allowed because it's his turn). He said the game showed 'some red BGA error'. He refreshed his browser and only then was able to draw a card. He noticed that someone else had clicked an action at the exact same time he was doing his action and that may have caused the error (in the game, sometimes all players can do things and other times when only 1 player can do something).

All players had to refresh their browsers, which was a very bad user experience. They were seeing text "UPDATING GAME SITUATION..." which didn't seem to move.

Where can I find more detail on the error? Maybe there was something in his browser, but that was gone after he refreshed. I clicked on REPLAY THIS GAME and it doesn't show it.
User avatar
RicardoRix
Posts: 2114
Joined: 29 April 2012, 23:43

Re: How to debug BGA Service Error

Post by RicardoRix »

It sounds very much like what it says. You're not getting any responses from the server. So it's not a bug, and probably not being able to make any logs because the servers aren't even there (pure logical guess).

UPDATING GAME SITUATION... is a definite symptom of this. You can do this yourself by not ending a ajax called php function with a gamestate change or a notification.
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: How to debug BGA Service Error

Post by Een »

Clicking "DISPLAY RECENT ERRORS FROM PRODUCTION (UNEXPECTED ERRORS)" should display the full error. I checked the logs as they had rotated, and here it is. So it seems that a parameter is not received for the drawCard() action (not sure why drawing a card would require an id?)

Code: Select all

17/01 04:29:26 [error] [T139975005] [87109031/binnok] Unexpected exception: Failed to get mandatory argument: id (BGA service error 1610854166)
#0 /var/tournoi/release/games/liverpoolrummy/210110-0717/liverpoolrummy.action.php(116): APP_Action->getArg('id', 1, true)
#1 /var/tournoi/release/tournoi-210114-1340-gs/www/include/webActionCore.inc.php(189): action_liverpoolrummy->drawCard()
#2 /var/tournoi/release/tournoi-210114-1340-gs/www/index.php(242): launchWebAction('liverpoolrummy', 'action_liverpoo...', 'drawCard', false, false, NULL, true, false)
#3 {main}
Post Reply

Return to “Developers”