Join room error: Game does not exist

Hi

There are many rooms in our Photon self-host server that after each room is filled, that room with PluginHost.SetProperties (0, new System.Collections.Hashtable () {{/ * IsVisible * / 254, false} }, null, true) will be hidden from the lobby, and players will then enter the room with the PhotonNetwork.JoinRoom (roomId) function.
But sometimes some rooms, even though they are still active in Photon and their roomTtl value is not zero, but PhotonNetwork.JoinRoom (roomId) does not work and gives the error "Game does not exist". Any suggestion?

Comments

  • hi, @atworld

    usually this error is returned if either room was not yet created or already removed. if you say that most of the time it works like this than good.

    in order to understand better what is going on we have to understand what server sends you such response? How do you see that room is still alive?

    could you set log level to debug and collect logs to see what is going on?

    best,
    ilya
  • We log all server plug-in events in the console.
    In cases where there are no active users in the room, the room ttl value in BeforeCloseGame is set for up to 6 hours. However, in some cases it is not possible to enter the room before calling OnCloseGame and error 32758 is given when joining.
    Could this room have been closed without running OnCloseGame?
  • @atworld did you update MaxEmptyRoomTTL in GameServerSettings?

    >Could this room have been closed without running OnCloseGame?
    No, it should not

    debug logging will help you and us understand better what is going on. Do you have a way to reproduce the issue?

    best,
    ilya
  • I updated the MaxEmptyRoomTTL value in GameServerSettings to 43,200,000 (12 hours) but the problem was not resolved.
    In all of these cases, there are rooms on the game server but the user cannot enter the room with PhotonNetwork.JoinRoom (roomId) and those rooms will eventually close when EmptyRoomTTL expires.
    The construction scenario of the rooms is as follows:
    1. Build a room by a client with EmptyRoomTTL = 0
    2. If the room is empty, the remaining time is calculated according to the rules of the game in BeforeCloseGame and EmptyRoomTTL is set on the server.
    Will the problem be solved if the value of EmptyRoomTTL is set by the client when the room is being built?
  • hi, @atworld

    >Will the problem be solved if the value of EmptyRoomTTL is set by the client when the room is being built?
    I can not say. I do not know what is the reason for the issue. We have to find out first.
    I would propose next thing. Next time when you will be able to reproduce this issue activate debug logs for GameServer and MasterServer. And try to join game on master. if it does not work try to join on GameServer.
    I do not know how do you test. if testing is not very intensive you may switch on DEBUG logging from the start.

    once you get logs, please share them with me. and share room name

    best,
    ilya
  • hi @chvetsov

    I will try to get more information about this problem.
    chvetsov wrote: »
    I would propose next thing. Next time when you will be able to reproduce this issue activate debug logs for GameServer and MasterServer. And try to join game on master. if it does not work try to join on GameServer.
    How can I connect directly to the game server and enter a room? Do I have to do this with the JoinRoom function?

  • hi, @atworld

    what type of client lib are you using?
    @JohnTube could you help with client lib connection to GS?

    best,
    ilya

  • JohnTube
    JohnTube ✭✭✭✭✭
    hi @atworld,

    Which client SDK and version do you use?
    I assume it's a Unity or .NET/C# one?

    In general we do not offer a way to directly join on GameServer as this is not recommended (on Photon Cloud, of course on your self-hosted server you are free to do whatever you want).

    In client there is a connect method, simply connect to the GameServer using its IP address and port, given an authentication token cached, you already got before on NameServer or MasterServer, call OpAuthenticate there as it's needed, then call OpJoinRoom.
    If you are stuck let us know.

    @chvetsov I'm not sure if connecting directly to GameServer is needed here.

    I think setting EmptyRoomTtl from plugin in BeforeCloseGame simply does not work.
    You could try to change the EmptyRoomTtl before.

    And changing EmptyRoomTtl works only in v5, if you are using v4 it does not work at all!
  • atworld
    atworld
    edited November 2020
    hi @JohnTube,

    >Which client SDK and version do you use?
    I use the Unity client SDK and all the rooms are built in SQL Lobby.

    >@chvetsov I'm not sure if connecting directly to GameServer is needed here.
    Although few games have this problem, I also think that a direct connection to GameServer is not necessary.

    >And changing EmptyRoomTtl works only in v5, if you are using v4 it does not work at all!
    Based on my tests, EmptyRoomTtl in the BeforeCloseGame event sets properly in the plugin in version 4.0.29.11263 Photon Server.

    >You could try to change the EmptyRoomTtl before.
    I will set EmptyRoomTtl on the client and check the result.
    Also, do you recommend using Default Lobby instead of SQL Lobby because the list status of all the rooms in it is constantly updated?