Search Unity

Third Party Server Build Crashes By Disconnecting Itself? - Unity Mirror Networking

Discussion in 'Multiplayer' started by JoeMin, Jan 13, 2021.

  1. JoeMin

    JoeMin

    Joined:
    Apr 12, 2017
    Posts:
    1
    Hi! Sorry if this isn't the place to post this particular question- first time poster!

    To preface:
    1. I am creating a multiplayer app using Mirror.
    2. The NetworkManager uses an FQDN (Fully Qualified Domain Name) as the network address.
    3. The FQDN is also using a Global Service Load Balancer.
    4. The new testing environment does take into account that the network address is a domain name and redirects traffic to and from the domain name.
    5. During testing of previous versions, I used IP addresses of the server environments instead of a domain name.
    6. I am using .NET 4.x as the API level to make use of TLS version 1.2
    Problem:
    I now build a headless server build and run it on my virtual environment setup for testing.

    The server initializes properly-
    Server: Start port=443
    Server: listening port=443
    TelepathyTransport initialized!
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)


    Then the server proceeds to try and disconnect a player?
    NullReferenceException: Object reference not set to an instance of an object at GameNetworkManager.OnServerDisconnect (Mirror.NetworkConnection conn)...

    Which is then followed by a curl error:
    Curl error 35: Handshake did not perform verification. UnityTls error code: 7

    After the curl error, OnServerDisconnect continuously gets called resulting in the same null ref error above.

    Yes, its a null ref error, but that bit of code should not even be running at all during server startup. Technically it only gets called when a player connects, then disconnects.

    Upon reading Mirror's documentation of its NetworkManager, it seemed as though IP addresses and FQDN were easily interchangeable in the Network Address parameter. Is there something I missed when changing the Network Address to a domain name?

    Any help would be greatly appreciated! :)
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If you suspect the problem is from using a domain name instead of an IP address, I'd do a test where you first resolve the domain name to an IP address then use the resolved IP address exclusively with Mirror. If the issue still occurs, then it was unrelated to the usage of a domain name.