Hi Nakama,
I’m experiencing a persistent JavaScript error in the
Nakama Console when trying to view match details.
Problem:
- When clicking on a match row in the Console’s Matches
page, I get this JavaScript error:
TypeError: Cannot read properties of undefined (reading
‘size’)
at tgt.fn (https://localhost:7351/static/index-Bf6jngw-
.js:935:120838) - The error is accompanied by a 400 API error: Failed to
load resource: the server responded with a status of 400 - Match listing works fine, but match detail views fail to
load
Environment
- Nakama Version: 3.30.0 ( showing only as “+” in Console settings page)
- Match Type: Authoritative matches using Lua runtime
- Match Handler: Custom match handler with proper lifecycle
functions
What I’ve Tried
I’ve extensively tested adding size fields in multiple
locations:
-
Match state structure:
– In GameState.init()
size = 0, – Current player count for Nakama Console -
Match labels:
– In match_init() and utils.update_label()
size = state.size or 0, – Add size for Nakama Console
compatibility -
Size tracking in match handlers:
– In match_join() and match_leave()
state.size = utils.table_count(state.presences) -
Nested objects: Added size fields to stats, match_info,
etc.
Current State
- Matches are created and run correctly
- Console shows matches in the listing with proper presence
count - Match functionality works perfectly for players
- Only the Console detail view fails with the JavaScript
error
Questions
- What i am doing wrong?
- What’s the expected structure for match data that the
Console detail API requires? - Is there a specific API endpoint that needs to be
implemented for match details? - Could this be related to using a development build of
Nakama?
Any guidance would be greatly appreciated. The matches work
perfectly for gameplay, but I can’t debug or monitor them
through the Console due to this error.
Thanks!