Search Unity

Internal Unity "Timeout during connection test"

Discussion in 'Multiplayer' started by Aubrey-Falconer, Mar 28, 2009.

  1. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Due to living in a rural area, I am stuck with a high latency satellite internet connection. Occasionally, when running Network.TestConnection, it returns no errors visible to my script, but it writes a message in the console that looks like this:

    Timeout during connection test (Filename: /Users/build/builds/unity-trunk/unity/Projects/../Runtime/Network/NetworkManager.cpp Line: 2590)

    Whenever this happens, I can never seem to connect to any networked games afterwards (calling Network.Connect logs a "Sent connect request to facilitator" message - and that's it). I quit Unity, try starting it and playing my game a couple times till it doesn't display the message, and then I can connect to games. I have never seen this message while using a lower latency wifi connection while traveling.

    This would be annoying in any case, but since I don't know how to tell what is wrong - or even that anything is wrong - through scripting, I am afraid that it would be very confusing to end users who have no feedback other than that they can't connect to any games.

    Has anyone else experienced this?

    Happy Coding,

    -Aubrey
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Unity networking is through UDP
    UDP sadly dislikes ultra high latency connections that on top have a high packet drop rate. What you experience there is what sadly is to be expected within your specific and rare environment.
     
  3. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Thanks very much for your reply, but that wasn't quite what I wanted to hear :)

    For testing I installed BZFlag (an open source multiplayer tank game), and I can play it just fine - excepting the lag of course...

    I can understand that Unity wouldn't like my connection, but that doesn't mean that it should fail some kind of networking test without letting my script know about it - right?
     
  4. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    I'm curious if you find the network test to even be useful?

    I just tried connecting to the first 5 Mars Explorer servers but got a connection error telling me to forward a port on all of them.

    I actually don't use the Connection Tester. NAT problems have been the biggest issue for me, and I found that the Connection Tester didn't seem to really help.

    I set Network.useNat=true; for all servers, and this seemed to help a lot.

    For some strange reason, people with 'bad' routers are often able to connect to people that have public IPs (even with useNat turned on).
     
  5. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    That's very interesting Proton!

    I'll add an option for this in the game, and let everyone know how it works for my users.

    Connection related issues have been a big problem for me too, but not as big as something which I think is related to RPC buffers that causes games to hang after 10 or 20 minutes of play...

    It's realllly difficult to debug networking issues when you are on satellite internet :)
     
  6. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Sorry to resurrect a thread this old - but I now have low latency, high speed radio internet (hooray for technology!) - and the aforementioned error message still occasionally (around 1 in 50 - 100 runs) appears for me (with the same results).

    What is on line 2590 of NetworkManager.cpp - and what can I do about it?
     
  7. roberto_sc

    roberto_sc

    Joined:
    Dec 13, 2010
    Posts:
    144
    Hello. Did you find a solution for your problem? I am having the same issue. Look for UniWeb in the asset store, maybe it can help you.