kinnay / SMB35

An open source server for Super Mario Bros. 35
GNU Affero General Public License v3.0
180 stars 24 forks source link

Spectating doesn't work, all players except the last two get Error 2306-0103 upon death #4

Closed just-another-random-person closed 3 years ago

just-another-random-person commented 3 years ago

So we've managed to get a few friends set up their Switch to connect to our own hosted private server, and we finally had around 3-5 players a lot of the time.

We were wondering why almost everyone except the final two players would always immediately get an Error 2306-0103 upon death.

So it seems spectating is broken, anyone who would end up in spectate mode instead gets that error.

One of them suggested it might be because of the game trying to submit coin rankings to the (non-existent) coin leaderboard. But I decided to check the logs and it was: WARNING:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round_with_partial_report not implemented Screen Shot 2021-05-30 at 3 59 05 PM

Is there a quick way we can fix it so spectating works (if the issue is the coin leaderboard thing as they guessed)? We plan to implement coin leaderboards eventually (even via something simple like SQLite), but for now, we hope to get spectating working at least since that's most of the fun of the game.

Also, when someone gets the error, the server just keeps spamming stacktraces (ClosedResourceError) in the log until the game ends (not sure if this is helpful):

Screen Shot 2021-05-30 at 4 00 12 PM

Thanks for any help, and also thanks so much for writing the server code! It's amazing!

just-another-random-person commented 3 years ago

Fixed by implementing missing method

Screen Shot 2021-05-30 at 5 45 51 PM

Spectating works now.

I can do a pull request once I figure out how Git works, haven't fully used it before.

kinnay commented 3 years ago

Cool! I never tested it with more than two players myself 😄

A pull request would be nice. If you can't figure it out just let me know and I'll add the missing method myself.

I was a bit lazy about error handling. Currently, the server ignores exceptions that occur when the server tries to relay an RPC packet to a node. See this line. That's why you are seeing the ClosedResourceError spam. We should probably remove the node instead.

P.S. Here's a list of error codes. Might be helpful if you ever get stuck on an error.

just-another-random-person commented 3 years ago

Removing the node might fix the other issue I just submitted, issue #6.