[Solved] [PUN2] Unable To Connect to Master Server

Options
BJDubb
BJDubb
Hi,

For the past 2 months I have been working on a FPS Multiplayer game with PUN2

It was working fine until about 30 mins ago when all of the sudden, I hit play and I would not connect to the master server. I have spent this half hour debugging with pun logging on full and I have come to no resolve.

If anybody could help me it would be greatly appreciated!

P.S. if you need anything, just ask.

Unity Version: 2019.1.8f1
PUN Version: Pun 2.14

PUN Server Settings:
https://imgur.com/a/98eHrpV

My Script:
https://imgur.com/a/TdEiXUo

My Script:
public void Awake()
        {
            //PhotonNetwork.AutomaticallySyncScene = true;
            
        }
        
        public void Login()//, string email, int rank)
            {
                //var _tempData = Instantiate(tempData, Vector3.zero, Quaternion.identity);
                //_tempData.GetComponent<TempData>().username = usernameInput.text;
                //loginButton.gameObject.SetActive(false);
                Connect();
            }

        public void Connect()
            {
                PhotonNetwork.GameVersion = "0.0.0";
                PhotonNetwork.ConnectUsingSettings();
                Debug.Log("Attemping to connect!");
            }

        public override void OnConnectedToMaster()
            {
                Debug.Log("Connected to Master Server");
                //main.SetActive(false);
                //PhotonNetwork.JoinLobby();
                //rooms.SetActive(true);
                base.OnConnectedToMaster();
            }

Comments

  • BJDubb
    BJDubb
    edited September 2019
    Options
    I'm really sorry to bump this but I am wasting development time trying to get this fixed. :(
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2019
    Options
    Hi @BJDubb,

    Does the client get disconnected?
    What do you see in the logs?

    Does this happen in the Unity Editor on in a build?
    What is the target platform?

    What is the scripting backend?
    What is the .NET version?

    Could you reproduce on a fresh clean empty new project with just PUN2 imported and using any of the demo scenes?
  • BJDubb
    BJDubb
    edited September 2019
    Options
    Hi John,

    Thanks for your response.

    (That other thread you closed was a different project in the same situation btw)

    It seems to have "fixed itself".

    Thanks for your help though.

    How do I mark as solved?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2019
    Options
    I have edited the title.
    Next time you could start a topic as Question type and mark it answered/complete once done.

    In order to help others, what was the issue?
  • BJDubb
    Options
    Apologies for not starting as a question.

    I genuinely am not sure about what the issue was.
    As I said, just as I got a reply from you I jumped on to Unity and it worked.
    Could have been a simple network issue. I disabled my firewall too but that didnt work immediately, however that could be a potential solution.