heroiclabs / nakama

Distributed server for social and realtime games and apps.

Home Page:https://heroiclabs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept party member throws exception on server

fsufyan opened this issue · comments

Accept party member operation not working.
Reproduced on both swift and c# sdks.

Steps to Reproduce

  1. Create a private party.
  2. Create another session socket and join the party.
  3. Leader socket try to acceptPartMember().

Actual Result

No error received on client side causing infinite wait.
Server stacktrace:
{"level":"error","ts":"2023-10-11T18:23:40.210Z","caller":"http/server.go:3217","msg":"http: panic serving 172.18.0.1:44748: assignment to entry in nil map\ngoroutine 444 [running]:\nnet/http.(*conn).serve.func1()\n\tnet/http/server.go:1854 +0xbf\npanic({0x1d02200, 0x26b0060})\n\truntime/panic.go:890 +0x263\ngithub.com/heroiclabs/nakama/v3/server.(*PartyPresenceList).Reserve(0xc000e52370, 0xc0004a25a0)\n\tgithub.com/heroiclabs/nakama/v3/server/party_presence.go:62 +0xb4\ngithub.com/heroiclabs/nakama/v3/server.(*PartyHandler).Accept(0xc0001dc8c0, {0xc00088c3c0, 0x24}, {0x4000800ef4, 0x7}, 0xc0003a43f0)\n\tgithub.com/heroiclabs/nakama/v3/server/party_handler.go:397 +0x356\ngithub.com/heroiclabs/nakama/v3/server.(*LocalPartyRegistry).PartyAccept(0xc000245740, {0x0?, 0xc00065c0a0?}, {0xa5, 0x14, 0x34, 0x1d, 0x3c, 0x1, 0x4e, ...}, ...)\n\tgithub.com/heroiclabs/nakama/v3/server/party_registry.go:135 +0xd3\ngithub.com/heroiclabs/nakama/v3/server.(*Pipeline).partyAccept(0xc000041130, 0xc0008a6b30?, {0x26d5240, 0xc000ec51e0}, 0xc000e52870)\n\tgithub.com/heroiclabs/nakama/v3/server/pipeline_party.go:256 +0x3f4\ngithub.com/heroiclabs/nakama/v3/server.(*Pipeline).ProcessRequest(0xc000041130, 0xc0003a4460, {0x26d5240, 0xc000ec51e0}, 0xc000e52870)\n\tgithub.com/heroiclabs/nakama/v3/server/pipeline.go:179 +0xcef\ngithub.com/heroiclabs/nakama/v3/server.(*sessionWS).Consume(0xc000ec51e0)\n\tgithub.com/heroiclabs/nakama/v3/server/session_ws.go:252 +0x7fe\ngithub.com/heroiclabs/nakama/v3/server.NewSocketWsAcceptor.func3({0x26bfd40, 0xc0004861c0}, 0xc0009ee200)\n\tgithub.com/heroiclabs/nakama/v3/server/socket_ws.go:134 +0xe42\nnet/http.HandlerFunc.ServeHTTP(0xc0009ee100?, {0x26bfd40?, 0xc0004861c0?}, 0xc0007d5860?)\n\tnet/http/server.go:2122 +0x2f\ngithub.com/gorilla/mux.(*Router).ServeHTTP(0xc00010a240, {0x26bfd40, 0xc0004861c0}, 0xc0009ee000)\n\tgithub.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf\ngithub.com/gorilla/handlers.(*cors).ServeHTTP(0xc000343050, {0x26bfd40, 0xc0004861c0}, 0xc0009ee000)\n\tgithub.com/gorilla/handlers@v1.5.1/cors.go:138 +0x6c2\nnet/http.serverHandler.ServeHTTP({0xc000ed2ea0?}, {0x26bfd40, 0xc0004861c0}, 0xc0009ee000)\n\tnet/http/server.go:2936 +0x316\nnet/http.(*conn).serve(0xc0004ce120, {0x26c1338, 0xc00007e660})\n\tnet/http/server.go:1995 +0x612\ncreated by net/http.(*Server).Serve\n\tnet/http/server.go:3089 +0x5ed"}

Context

  • Unity/C#
  • Swift

Environment

  • Nakama: v3.17.1 on docker
  • Database: Cockroach v23.1.8
  • Operating System and version: macOS Ventura 13.5.1

Fixed in 424ebc5 and will be part of the next release. 🙇