Operation SetProperties (252) error on scene load after game - can't find origin

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Operation SetProperties (252) error on scene load after game - can't find origin

AConfusedPerson
2021-01-11 15:49:09

Hello,

After joining a room, playing a game and returning to the menu and calling PhotonNetwork.LeaveRoom(), I am greeted with Operation SetProperties (252) not called because client is not connected or not ready yet, client state: Leaving. I have looked everywhere in my code and I cannot find what is causing the issue as from what I can see I am not trying to use PhotonNetwork when the menu is first loaded. This does not happen the first time the menu is opened before connecting to Photon.

The stack trace is:
Operation SetProperties (252) not called because client is not connected or not ready yet, client state: Leaving
UnityEngine.Debug:LogError(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2297)
Photon.Realtime.LoadBalancingClient:CheckIfOpCanBeSent(Byte, ServerConnection, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2233)
Photon.Realtime.LoadBalancingClient:OpSetPropertiesOfRoom(Hashtable, Hashtable, WebFlags) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1897)
Photon.Realtime.Room:SetCustomProperties(Hashtable, Hashtable, WebFlags) (at Assets/Photon/PhotonRealtime/Code/Room.cs:397)
Photon.Pun.PhotonNetwork:SetLevelInPropsIfSynced(Object) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2048)
Photon.Pun.PhotonNetwork:NewSceneLoaded() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1346)
Photon.Pun.<>c:b__13_0(Scene, LoadSceneMode) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:125)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

Does anybody know how I can find the origin past "UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)" or any other ideas what it may be?

Comments

JohnTube
2021-01-11 21:58:09

Hi @AConfusedPerson,

Thank you for choosing Photon!

Are you calling PhotonNetwork.LoadLevel at the same time or just after calling PhotonNetwork.LeaveRoom? You shouldn't. Outside of rooms just use regular Unity scene loading as you don't need to sync scenes in this case.
This also should be happening on the master client only right?

AConfusedPerson
2021-01-12 08:07:32

Hello,

This is just on the master client it seems, yes. I wasn't using PhotonNetwork.LoadLevel just the regular Unity scene loading but from what you said I've tried a few things and what seems to have worked is disabling PhotonNetwork.AutomaticallySyncScene before the scene change as it should never been left on anyhow.

Thank you!

Back to top