Out of nowhere the room listing does not work.
Options
Hello!
Everything seemed to be fine with Photon and the room listing before today.
Normally whenever I would create a room on clients it would show but that is not the case today.
I get a "Connected to Photon" debug message when starting the first instance and it is able to create a room just fine.
It isn't until I run a second instance and attempt to join the room that the first instance made that I run into trouble.
I hit my head against the wall for a bit trying to find some kind of error code because it isn't until I close the first instance that I get this error message...
Unity Console Preview
Unity Console Extended Message
I am so confused.
Everything seemed to be fine with Photon and the room listing before today.
Normally whenever I would create a room on clients it would show but that is not the case today.
I get a "Connected to Photon" debug message when starting the first instance and it is able to create a room just fine.
It isn't until I run a second instance and attempt to join the room that the first instance made that I run into trouble.
I hit my head against the wall for a bit trying to find some kind of error code because it isn't until I close the first instance that I get this error message...
Unity Console Preview
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Unity Console Extended Message
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <437ba245d8404784b9fbab9b439ac908>:0) System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0) System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0) JoinEventMenu.OnRoomListUpdate (System.Collections.Generic.List`1[T] roomList) (at Assets/Scripts/EventMenu/JoinEventMenu.cs:56) Photon.Realtime.LobbyCallbacksContainer.OnRoomListUpdate (System.Collections.Generic.List`1[T] roomList) (at Assets/3rdParty/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3970) Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/3rdParty/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2880) ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at <11e9abbca912444aa80ed58a280369fc>:0) ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at <11e9abbca912444aa80ed58a280369fc>:0) ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at <11e9abbca912444aa80ed58a280369fc>:0) Photon.Pun.PhotonHandler.Dispatch () (at Assets/3rdParty/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205) Photon.Pun.PhotonHandler.FixedUpdate () (at Assets/3rdParty/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:139)
I am so confused.
0
Best Answer
-
Hi JohnTube and Tobias,
Thanks for the quick reply.
I am still stuck on PUN 1 with the project I am working on right now. It has been in development for a long while and is about to hit prod soon. I am using the free 20 CCU plan.
Changing the lobby type from SqlLobby to default solved the issue for me, thanks a lot!
6
Answers
-
Hi flowingisart,
I also experienced something similar.
Suddenly the PhotonNetwork.GetRoomList() started returning an empty array even though I have created rooms. I am however able to join the room by using the PhotonNetwork.JoinOrCreateRoom method and everything else works as expected. The PhotonNetwork.countOfRooms actually gives the correct number of active rooms, but lack the information I need.
I don't think the issue is on the client side. I tested an application that has been running issue free in prod for 6 months. It also gives me the same empty array on PhotonNetwork.GetRoomList().
I believe it has something to do with the problems they had on the Photon server side.
I hope they are able to find the bug soon.0 -
Hi @flowingisart, @Tykjen,
Thank you for choosing Photon!
If your apps are on the free 20 CCU plan they have been switched to the new lobbies v2.
So if you are using SqlLobby type and expect a list of rooms this is no longer available in lobbies v2.
Read more here.
If your apps are not on the free 20 CCU plan or you are using the default lobby type then it's something else.0 -
Which version of PUN are you using?
PhotonNetwork.GetRoomList() is not in the more recent PUN 2 versions, so I wonder.0 -
Hi JohnTube and Tobias,
Thanks for the quick reply.
I am still stuck on PUN 1 with the project I am working on right now. It has been in development for a long while and is about to hit prod soon. I am using the free 20 CCU plan.
Changing the lobby type from SqlLobby to default solved the issue for me, thanks a lot!
6