Error after calling PhotonNetwork.JoinOrCreateRoom()

Options
After I upgraded Unity to 2018.2 I get this error after i call PhotonNetwork.JoinOrCreateRoom():

Operation failed: OperationResponse 254: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: MasterServer

I updated to newest Photon version but the problem is still there. It was working alright before.

The whole stack :
Operation failed: OperationResponse 254: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: MasterServer UnityEngine.Debug:LogError(Object) NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1623) ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[]) ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)

The other error that appears right after this one is this :
Failed parsing address: UnityEngine.Debug:LogError(Object) NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1574) ExitGames.Client.Photon.IPhotonSocket:Connect() ExitGames.Client.Photon.SocketUdp:Connect() ExitGames.Client.Photon.EnetPeer:Connect(String, String, Object) ExitGames.Client.Photon.PhotonPeer:Connect(String, String, Object) NetworkingPeer:Connect(String, ServerConnection) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:590) NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2175) ExitGames.Client.Photon.<>c__DisplayClass146_0:<EnqueueStatusCallback>b__0() ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)


Please let me know what could be the cause? Maybe wrong PUN settings?
Thanks
David

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited August 2018
    Options
    Hi @DavidAndreev,

    Thank you for choosing Photon!

    This could be due to:

    - Wrong type of application. Check your AppId and make sure it is not a Chat application.
    - Make sure to call JoinOrCreate only when not joined to a room.
  • Yes, it was my fault in order of calling different methods. Thank you very much for the help.