CreateRoom failed. Client is on GameServer(must be master server for matchmaking) and ready. Wait fo
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
CreateRoom failed. Client is on GameServer(must be master server for matchmaking) and ready. Wait fo
lxg
2021-06-07 07:50:18
Hello, 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:
//Creating room here after a button click:
PhotonNetwork.CreateRoom(CreateGameInput.text, new RoomOptions() { MaxPlayers = 4 });
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...
Thank you
Comments
The background is: There are 3 server types: Name Server, Master Server and Game Server. The Master Server is for matchmaking and the Game Server only runs rooms. It only knows a Master Server it reports to.
So, when you are in a room, you can't do matchmaking. If you called JoinRoom or CreateRoom on a Master Server, the client will switch machines and calling CreateRoom again, will cause this.
Leave the room, wait for the OnConnectedToMasterServer callback and you can do matchmaking again.
Thanks. 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 anyone comes across this and you know your connection is fine, please check what happens n your script AFTER the room is created. Seems this error can be thrown when it tries to join a room but the scene doesn't change.
Toxic_Nuggs
2021-10-13 22:45:49
How do I know if im in a room because i keep getting this error no matter what I do
CreateRoom failed. Client is on MasterServer (must be Master Server for matchmaking)but not ready for operations (State: PeerCreated). Wait for callback: OnJoinedLobby or OnConnectedToMaster.
I would recommend reading and coding-along the Basics Tutorial. It should show in-context how you'd join rooms, etc.
Kshitijv24
2022-04-19 06:11:34
I solve this problem by opening a proton engine website dashboard tab in the browser and then trying to connect with the server and it's worked in my case.
flawlesstroy
2022-06-05 18:43:52
For me the issue was because the default scene is Lobby when you load in, you need to switch to the Loading scene before you load so it can properly connect to Lobby
Tobias 2021-06-07T10:28:36+00:00
The background is: There are 3 server types: Name Server, Master Server and Game Server. The Master Server is for matchmaking and the Game Server only runs rooms. It only knows a Master Server it reports to.
So, when you are in a room, you can't do matchmaking. If you called JoinRoom or CreateRoom on a Master Server, the client will switch machines and calling CreateRoom again, will cause this.
Leave the room, wait for the OnConnectedToMasterServer callback and you can do matchmaking again. Can you explain and show how to do this in code?
Kshitijv24 2022-04-19T06:11:34+00:00
I solve this problem by opening a proton engine website dashboard tab in the browser and then trying to connect with the server and it's worked in my case.
Can you put what your script is because I'm having the same issue but my dashboard is connected and I'm sure my script is fine.
Try using LeaveRoom() when ending a game session
SmolGameDev99
2022-09-30 02:32:46
flawlesstroyyour solution works for me! Ty so much!
Back to top