Nakama Console JavaScript Error: "Cannot read properties of undefined (reading 'size')" when clicking match details

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:

  1. Match state structure:
    – In GameState.init()
    size = 0, – Current player count for Nakama Console

  2. Match labels:
    – In match_init() and utils.update_label()
    size = state.size or 0, – Add size for Nakama Console
    compatibility

  3. Size tracking in match handlers:
    – In match_join() and match_leave()
    state.size = utils.table_count(state.presences)

  4. 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

  1. What i am doing wrong?
  2. What’s the expected structure for match data that the
    Console detail API requires?
  3. Is there a specific API endpoint that needs to be
    implemented for match details?
  4. 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!

Hi @hbvb,

Thank you for reporting this, I believe this is a bug in the new Nakama Console that has been fixed in newer release. If you upgrade to Nakama v3.31.0 (or latest v3.32.0) you shouldn’t have this issue anymore.

Please upgrade and report back.

Best

1 Like

Fixed with 3.32.0. Thank you!