Help for Error: "Client is not on Master Server or not yet ready to call operations."

Foxh9
Foxh9
I am new to Photon networking and have been following the basics tutorial but I am getting this error when I try to create a room and join to it. I searched for solutions but havent found any solutions.

Here is the full log from starting the game and trying to create & join a room:
https://pastebin.com/LiSWUhSF

Here is my network manager code:
https://pastebin.com/vMQBzmVA

The log message 'Connected to master' appears and when inspecting the PhotonNetwork object in Visual Studio debugger, it's state is reported as 'ConnectedToNameServer' and 'IsConnectedAndReady' variable is true.
However, the room gets created and I am able to join it after the error occurs.

I tried to set the master server region in the server settings but the same error occured.
I also tried to connect to a local master server which I quickly set up from the SDK but just got disconnected with an unknown error message.

What can I do to fix this?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Foxh9,

    Thank you for choosing Photon!

    1. Creating rooms automatically joins it.
    2. Photon operations are asynchronous, the client sends operation to the server and then receives a response after some time. The operation calls' methods return a boolean that means that the client has successfully queued/sent the operation request command and does not mean that the operation is successful or not.

    So this needs to be removed:
                if (created)
                    PhotonNetwork.JoinRoom("Test Room");
  • Thanks @JohnTube that fixed the issue!
    I need to read the tutorials more carefully :)