Unable to create room

GamingReborn
edited September 2019 in DotNet
Hello,

I am using Photon Real Time in Unity 3D (Not PUN) and everything worked great for a very long time. Lately I find myself unable to join a room I have created (no changes were made to the code).

When the client state changes to "JoinedLobby" I am calling LoadBalancingClient.OpJoinOrCreateRoom(EnterRoomParams opParams) like this:

 public void JoinOrCreateRoom(string roomName, byte maxPlayers, int playerTtl, int emptyRoomTtl)
    {
        try
        {
            if (this.State == ExitGames.Client.Photon.LoadBalancing.ClientState.JoinedLobby)
            {
                ExitGames.Client.Photon.LoadBalancing.RoomOptions roomOptions = new ExitGames.Client.Photon.LoadBalancing.RoomOptions()
                {
                    MaxPlayers = maxPlayers,
                    PlayerTtl = playerTtl,
                    EmptyRoomTtl = emptyRoomTtl,
                    CheckUserOnJoin = true,
                    IsOpen = true,
                    IsVisible = true,
                    CleanupCacheOnLeave = false
                };
                OpJoinOrCreateRoom(roomName, roomOptions, ExitGames.Client.Photon.LoadBalancing.TypedLobby.Default);
            }
            else throw new Exception("Not in lobby.");
        }
        catch (Exception exception)
        {
            Debug.LogError(exception.Message);
            throw exception;
        }
    }
There are no visible errors but the client changes to the states -
1. Joining
then
2. DisconnectingFromMasterserver
then
3. ConnectingToGameserver

and gets stuck there.

What could be the problem?

I tried printing the OperationResponses and Events but I cannot understand them.
The OperationResponse I get is "OperationResponse 229: ReturnCode: 0 (). Parameters: {}" and the event I get is "Event 230: {(Byte)222=(Hashtable){}}"

Please assist.

Comments

  • After further testing once in a very long while it works (if I wait), but trying again after a short delay fails
  • GamingReborn
    edited September 2019
    Some more information -
    I see now that the there is an attempt to open a socket to wss://{server_address_removed}:19091 that never gets opened.
    Sockets 19090 and 19093 work fine.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2019
    Hi @GamingReborn,

    We have rolled out a security update on some Game Servers of some clusters of some regions of the public Photon Cloud.
    The new servers require some client capabilities available only in Unity 2018.2 and .NET 4.x (full TLS 1.2 support).

    So the solution for this is now is to update to Unity 2018.2+ and switch to .NET 4.x.
  • I am using Unity 2018.2.12f1 set to WebGL.
    If I change the communication method to WebSocket from WebScoketSecure everything works fine, but because I have to use WebScoketSecure on the compiled version, this doesn't work for me.

    The original problem I was trying to fix is with rejoining a room. It appears I cannot rejoin a room if I get disconnected.
    I tried switching to the regular "join" method and surprisingly it works great in the editor (with "WebSocket") but doesn't wrok in the build (with "WebSocketSecure").
  • Also, could you please link to a public statement describing the change?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @GamingReborn,

    If I change the communication method to WebSocket from WebScoketSecure everything works fine
    WebSocket communication is not recommended. WebSocketSecure (WSS) should be used instead.

    I am using Unity 2018.2.12f1 set to WebGL.

    Great. Could you set the scripting backend to and version to .NET 4.x instead of 3.5?

    It appears I cannot rejoin a room if I get disconnected.

    Otherwise, I recommend you send an email to developer@photonengine.com with your AppId, a description of the issue and a link to this forum thread.

    The original problem I was trying to fix is with rejoining a room. It appears I cannot rejoin a room if I get disconnected.
    I tried switching to the regular "join" method and surprisingly it works great in the editor (with "WebSocket") but doesn't wrok in the build (with "WebSocketSecure").
    This is a different and unrelated issue. You can create a new forum thread for this if you want.