Hosted game doesn't disappear in the lobby after closing it

For some reason after the host exits the game, it does not disappear from the lobby. When I try to enter it I catch en exception which is being thrown here.


I also get this message in the console:

Unity.Services.Relay.RelayServiceException: Not Found: join code not found —> Unity.Services.Relay.Http.HttpException`1[Unity.Services.Relay.Models.ErrorResponseBody]: (404) HTTP/1.1 404 Not Found

How can I close the server as a host after exiting the game properly?

Hi there,
It makes sense that you can’t join it after the host leaves. The server is no longer open when the host leaves.
So let’s focus on the error of it not disappearing from the lobby. Are you seeing it from other clients or only from the host? Are there any other errors in the console?

I see it from the clients and from the host. Here it displays a server that has been closed by the host.


I am starting to think that the problem is with the lobby displays.
There are no other errors in the console.
So basically every time I create a new server and then exit it, it is still being displayed in the lobby.

Those 3 servers are being displayed only on the host, but for the client (build) the lobbies list is empty. And after I created those 3 servers and exited them, I created the 4th one and the client stopped to see any servers even the one that I just created and which was not closed.

Yes, I would guess the issue is within the LobbiesList class where we are refreshing the list of available lobbies. I would try logging the options.Filters for each of the lobbies and see what the data looks like. Perhaps the lobbies are reaching an unexpected state we did not account for in the initial code.

Privacy & Terms