No connect to master server

Options

This error began to occur to me without touching a single line of code, I am going crazy, it does not connect with the rest of the players. Can someone ask me a solution?

OpJoinLobby is only allowed when connected to a Master Server. Current Server: MasterServer, current State: PeerCreated
error in Line ->
PhotonNetwork.ConnectUsingSettings();





Comments

  • Rivax95
    Options
    Complete log:

    OpJoinLobby is only allowed when connected to a Master Server. Current Server: MasterServer, current State: PeerCreated
    UnityEngine.Debug:LogError(Object)
    Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1835)
    Photon.Realtime.LoadBalancingClient:OpJoinLobby(TypedLobby) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1084)
    Photon.Pun.PhotonNetwork:JoinLobby(TypedLobby) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1968)
    PhotonManager:OnConnectedToMaster() (at Assets/ScripsROOT/Scripts/Lobby/PhotonManager.cs:160)
    Photon.Realtime.ConnectionCallbacksContainer:OnConnectedToMaster() (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3233)
    Photon.Pun.PhotonNetwork:set_OfflineMode(Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:420)
    Photon.Pun.PhotonNetwork:ConnectUsingSettings() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1097)
    PhotonManager:Start() (at Assets/ScripsROOT/Scripts/Lobby/PhotonManager.cs:71)
  • Rivax95
    Options
    Hi guys, it seems that the error has been solved by moving the line to the Awakening, I really do not get to understand the difference, I hope that the contribution serves something.

    Google translate
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Rivax95,

    From the log's stack trace, it looks like you are joining a lobby in offline mode.
    Not sure if PUN supports that.

    Why do you need to join a lobby when in offline mode?
  • Rivax95
    Options
    Hi @JohnTube , thanks for you response

    I never tell you by code that I want to join offline :/
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2019
    Options
    Hi @Rivax95,

    Here is how I knew:

    Photon.Pun.PhotonNetwork:set_OfflineMode(Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:420)


    Actually you have "Start In Offline" mode enabled in Photon Server Settings.