Having Issues Connecting To Master Due To 'Disconnect By Server Logic'

Options
Hi,
I'm trying to do a simple connect with PUN2 in Unity and I get disconnected due to 'Disconnect By Server Logic'. Before disconnecting, this is what shows in my console:

Server ns.exitgames.com:5058 sent disconnect. PeerId: 955 RTT/Variance:70/26 reason byte: 1 peerConnectionState: Connected

My script is simply this:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;

public class TestConnect : MonoBehaviourPunCallbacks
{
void Start()
{
//PhotonNetwork.GameVersion = "0.1.1";
PhotonNetwork.ConnectUsingSettings();
}

public override void OnConnectedToMaster()
{
print("Connecting to server");
}

public override void OnDisconnected(DisconnectCause cause)
{
print("Disconnected from server for reason " + cause.ToString());
}
}

Can anyone provide some assistance with this? I feel like I have done every check but still no success.

Thanks.

Answers

  • Tobias
    Options
    I guess there is more in your console log than this. The "Get Help" page should explain how to get more info. Also the "Analyzing Disconnects" topic may be of interest...

    Try our PUN Basics Tutorial. It should get you online.
  • Rob161
    Rob161
    edited August 2021
    Options
    Thanks for the info/links. Looks like the issue arises from the authentication. As I am authenticating with Playfab, I take it my Custom Auth setup isn't quite right. I will try the standard Authentication setup and see how I go.