CreateRoom failed. Client is on GameServer(must be master server for matchmaking) and ready. Wait fo

Hi guys, I’m realllly stuck on an issue.

My multiplayer was working fine then i upgraded to pun2 and now when i connect I get this error:

CreateRoom failed. Client is on GameServer(must be master server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

I am quite sure my script is fine:

//establishing connections here:

    private void Awake()
    {
        PhotonNetwork.ConnectUsingSettings();
    }

    public override void OnConnectedToMaster() // callback function for when first connection is made
    {
        PhotonNetwork.JoinLobby(TypedLobby.Default);
        Debug.Log("Connected");

    }

//Creating room here:

PhotonNetwork.CreateRoom(CreateGameInput.text, new RoomOptions() { MaxPlayers = 4 }, null);

Can anyone help? I’ve read everything i can find on this. Most posts say that there is no connection but I confirmed connection using debug in the onconnectedtomaster function as shown above…

Update for anyone who comes across this issue:

I was able to resolve it. turns out the problem wasn’t the connection or the room creation. the OnJoined function needed to be a public override and I had it as private. it worked like that on pun but apparently not pun 2. the error was pretty misleading.

If you come across this and you know your connection is fine, please check what happens AFTER the room is created. Seems this error can be thrown when it tries to join a room but the scene doesn’t change.

2 Likes

hey mate,
i tried but it didnt work for me…

thanks, you may succeed in life. you saved me from wasting 1 hour in that

oh i think it will help me thx guis