Search Unity

NAT Traversal - Automatic port forwarding, punch-through, and more!

Discussion in 'Assets and Asset Store' started by thegreatzebadiah, Apr 5, 2016.

  1. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Eventually it will be but I'm very busy at the moment so I'm trying not to add any new features. My focus at the moment is just to make sure the plugin is stable and support is responsive. It's probably already possible to use the lobby manager with the plugin, you just need to override the right methods to make sure StartClientAll and StartHostAll get called instead of the normal StartClient / StartHost. I've never used the lobby manager personally though so I can't say for sure.

    Yeah, it's top of my list now. If only because I want it for my own game.

    Somewhere around 90% but there's a lot of variation depending on who you ask, when the survey was done, whether or not mobile devices are included, etc.

    There are a number of reasons punchthrough can fail. One of the most common is if both parties are using symmetric nat. If that is the case then punchthrough will never succeed unless some router settings change. There are other cases though where punchthrough may fail once but then work when you try it again. Sometimes this is a timeout issue or caused by too many punchthroughs too quickly. Sometimes the port prediction that the Facilitator tries to do just doesn't work and the router and Facilitator can't find a port to agree on. In any of those cases if you just keep trying to connect it will eventually work.

    I don't have any hard numbers on this, just anecdotes. The relays used to be really slow when they were first introduced so it was a huge obvious improvement to connect directly. That's not as true any more if you live in North America or just happen to be near a relay. On the other hand, if you're in Australia with the nearest relay a continent away the gains will be huge. So it really depends on everyone's proximity to the relays and each other.
     
  2. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    Right on, this is great news. Is there an ETA on host migration? You're awesome!
     
  3. NFMynster

    NFMynster

    Joined:
    Jul 1, 2013
    Posts:
    71
  4. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    Is there an easy way to tell which connection(s) are using which type of connection? I'd love an easy way to see that iv'e got 3 punch-though's and 2 relay server connections... Does that even make sense?
     
  5. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @Jos-Yule It's pretty easy to tell on the client by checking if directClient, relayClient, or punchthroughClient is connected. You could then send that info to the host so that it can keep track. Unfortunately there's no built in way to check the connection type of each client on the host. I'll keep it in mind for the next wave of updates though.

    Unfortunately not. I was just doing a bit of reading into it though and I came across this line in the Unity docs:
    "This works for direct connection games. Additional work is required for this to function with the matchmaker and relay server." I'm not sure if that info is outdated or what but if it doesn't even work for relay connections it sounds like a real headache. I hope that's just old news though and when I get around to implementing it everything just works (fingers crossed).
     
  6. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    I was hoping to dive into the Open.NAT code and see if I could do something with this info but I've been too busy and honestly it's beyond the scope of what I feel I should be doing anyway. I'm afraid I'm going to have to direct you to the Open.NAT support page for this particular issue. I'm not normally one to push off a problem onto someone else but I think you're much more likely to get the issue resolved in a timely manner by going straight to the source.
     
  7. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    I spent some more time using the Open.NAT dll directly and doing some testing, and i think it is way more likely that it is problems on my end, and not the open.nat stuff. They are doing all the things I was doing and more (and better!), so there you go.

    Ok, that's great, i'll push that up to the server via CMDs or whatever.

    Thanks!
     
  8. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    Ok, i can't get things to connect correctly. In trying to simplify my complex code-base, i've set the NetworkManager to only use the Relay & Unity MatchMaking. I get the following logs on my client



    The network does not appear to be actually connected as the ClientScene is not "ready".

    Here is how i am starting the network on the host and the client (sending MatchID, Facilitator GUID, Password etc via a steam lobby, i have confirmed that the data is the same/correct) -

    Code (CSharp):
    1. snm.StartHostAll(giac.currentGameName, (uint)snm.maxConnections, true, giac.currentGamePassword, 0, 0, OnCreateMatchCallback);
    Code (CSharp):
    1. snm.StartClientAll(smm.publicIP, smm.internalIP, ulong.Parse(smm.guid), (UnityEngine.Networking.Types.NetworkID)(long.Parse(smm.matchID)), OnJoinMatchCallback, smm.matchPassword);
    I feel like it is sort of connected, but for some reason the NetworkManager still isn't properly setup?
     
  9. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    So, once again, going back to basics, running the example scene does work mint, so it has to be some kind of setting or param that i have set incorrectly...
     
  10. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    FYI Here is, with a better log, that network not inited error - i'm using almost exactly the same code as you are in the Example scene.

    Code (CSharp):
    1. NullReferenceException: Before using the library you should call Init() and do not forget to call Shutdown() afterwards
    2. UnityEngine.Networking.NetworkTransport.AddHost (UnityEngine.Networking.HostTopology topology, Int32 port, System.String ip) (at C:/buildslave/unity/build/artifacts/generated/common/modules/UNET/UNETworkingBindings.gen.cs:487)
    3. UnityEngine.Networking.NetworkTransport.AddHost (UnityEngine.Networking.HostTopology topology, Int32 port) (at C:/buildslave/unity/build/artifacts/generated/common/modules/UNET/UNETworkingBindings.gen.cs:472)
    4. NATTraversal.NetworkManager.directConnect (System.String externalIP, System.String internalIP) (at E:/_Noble Whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NetworkManager.cs:465)
    5. NATTraversal.NetworkManager.StartClientAll (System.String hostExternalIP, System.String hostInternalIP, UInt64 hostGUID, NetworkID matchID, UnityEngine.Networking.Match.ResponseDelegate`1 joinMatchCallback, System.String matchPassword, Int32 eloScore, Int32 requestDomain, Boolean matchAlreadyJoined) (at E:/_Noble Whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NetworkManager.cs:418)
    6. NATTraversal.NetworkManager.StartClientAll (UnityEngine.Networking.Match.MatchDesc match, UnityEngine.Networking.Match.ResponseDelegate`1 callback, System.String matchPassword, Int32 eloScore, Int32 requestDomain, Boolean matchAlreadyJoined) (at E:/_Noble Whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NetworkManager.cs:362)
    7. ScarcityNetworkManager.OnMatchList (UnityEngine.Networking.Match.ListMatchResponse matchList) (at Assets/Scarcity/Scripts/Networking/ScarcityNetworkManager.cs:107)
    8. UnityEngine.Networking.Match.NetworkMatch+<ProcessMatchResponse>c__Iterator0`1[UnityEngine.Networking.Match.ListMatchResponse].MoveNext () (at C:/buildslave/unity/build/Runtime/Networking/Managed/MatchMakingClient.cs:302)
     
  11. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    It seems that if i add a callback to the StartHostsAll() method, it doesn't post the match properly? Here is an example:

    Code (CSharp):
    1. //StartHostAll("Hello World", 6, true, "", 0, 0, OnCreateMatchCallback);
    2. StartHostAll("Hello World", 6);
    The first is the same as the second, with the same default values, only with a callback added. If i use the commented out version, i can no longer find the match (returns a list of size 0). But it works fine with the second.

    Any suggestions?
     
  12. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    When you don't provide the callback the OnMatchCreate method in the NetworkManager is used. My guess is maybe the method your passing in doesn't have the correct method signature to be a callback? I would expect Unity to throw a pretty obvious error in the case though so maybe not..

    In 5.4 and greater the method signature for your callback method should be
    void OnMatchCreate(bool success, string extendedInfo, MatchInfo matchInfo)

    if 5.3 and below it should be
    void OnMatchCreate(CreateMatchResponse matchInfo)

    Also if you provide your own callback like that make sure to call base.OnMatchCreate() in the callback method or all sorts of other things will fail.
     
  13. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    Ahh, i was not calling base.OnMatchCreate() in the callback - that was probably the issue!

    Thanks!
     
    thegreatzebadiah likes this.
  14. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Thanks for the stack trace. It will be fixed in the next update.
     
  15. Reilaos

    Reilaos

    Joined:
    Jul 2, 2016
    Posts:
    10
    Hi there! Been trying to get two clients connected with relays disabled (using Steam to matchmake), but haven't been having much luck figuring out what I've been doing wrong. Is there a significance to the following line showing up?

    NATHelper: NAT Device not found
    The client seems to think it's successfully created a direct connection, despite nothing happening after loading into the Online Scene (no players or objects are spawned):
    NATTraveral: Attempting to connect directly: xxx.xxx.xxx.xxx xxx.xxx.x.x

    NATTraveral: Client connected directly
    Whereas the only time the Host seems to acknowledge that there was a connection was to say that it timed out:
    Log: connection {1} has been disconnected by timeout; address {::xxxx:xx.xxx.xxx.xxx:xxxxx}
    Empty player list given to NetworkServer.Destroy(), nothing to do.
    They both appear to be connecting to the facilitator, though I don't think it should particularly matter for a direct connection (?):
    NATHelper: Connected to Facilitator: xxxxxxxxxxxxxxxxxx​

    The log statements that I use in OnServerAddPlayer to show that a connection has been made only ever show up when the Host joins its own match--they are never called for when the client tries to connect. The client never sees the spawns, etc, but it loads the static parts of the level as if it were connected.

    I'd gotten direct connections (without Steam) working before. I'd also gotten it to work UNet Relays (without the punchthrough stuff). Is there something glaringly obvious that I might have/have definitely missed?

    Thanks!
     
    deliinteractive and KyleOlsen like this.
  16. deliinteractive

    deliinteractive

    Joined:
    Oct 8, 2014
    Posts:
    25
    Hi, I'd like to chime in and state that our team is doing exactly the same thing as @Reilaos and finding almost the the exact same results.

    In our case, I have disabled all types of connections to be initiated by StartClientAll() except punchthrough hoping this would alleviate the errors from failing after ten attempts with a direct connection. I tend to see the message "NATHelper: Connected to Facilitator" an additional time during this long connection attempt. Another interesting thing is a series of RakNet messages which come in, in exactly the same order when trying to connect as a client: one which declares the punchthrough succeeded, one which says the connection request was accepted, and one which says there was a disconnection. One final thing I tend to notice is that on the host's end: after the scene changes to the "online scene", there is a warning in the debug log for the client being set as ready without a player. The same warning appears if another player manages to connect.

    Below is a (slightly edited) debug log output from a quick session where I attempted to connect as a client to another team member, who was hosting. Notice that UNet perceives the connection to have SUCCEEDED, and starts registering prefabs and message handlers, then quickly disconnects:

    We've got a pretty big, complex project, so we've spent a good amount of time trying to find areas in our code where we're going wrong, but we keep running into dead-ends. As it stands right now, players fail to fully connect to me when I host about 40% of the time. With another member of our team, that number is closer to 95%. Any leads on this problem?

    Edit: A couple of additional potentially useful pieces of information here. That debug log comes from setting the Log Level on the network manager to "Debug" rather than "Info". Also, I don't get this in the Unity debug log, but I have found in several of my text logs from standalone sessions (run from Steam) a series of errors which read as: Warning: wrong connectionId in received user packet. There are generally 4 to 7 of them in a row, and they pop in seemingly randomly multiple times while a client attempts to connect to a host.

    Another quick update on this: I haven't received the wrong connectionId error in quite a while. Not sure where that one came from.
     
    Last edited: Aug 9, 2016
    Reilaos and KyleOlsen like this.
  17. SharkiMeow

    SharkiMeow

    Joined:
    Oct 17, 2015
    Posts:
    1
    Hello. At the moment i have a project that is using UNET with direсt connection to server IP: PORT where person can be host if he has opened port and external ip address. Two days ago i have bought your asset and im interested - what i need to do to change my project's system from direct connect to the system in your asset.
     
  18. winglessraven

    winglessraven

    Joined:
    Dec 15, 2013
    Posts:
    3
    Hi, I'm trying to run Facilitator on my Debian Jessie server, but keep getting permission denied (tried as users and root), I've also try chmod +x but then I get a segmentation fault. Am I missing something obvious?
     
  19. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    hey sharki, these docs helped me figure it out - http://grabblesgame.com/nat-traversal/docs/

    in a nutshell, you need to get the Facilitator thing running on a remote server. then configure the plugin to point to the IP address of your server and then it just sort of magically works. pay close attention to the Example scene that comes with the plugin


    sanity check - you uploaded the linux version and not the windows version to your server yeah?
     
  20. winglessraven

    winglessraven

    Joined:
    Dec 15, 2013
    Posts:
    3
    Yes I did :) I even tried the windows one with mono to see if that would work xD
     
  21. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    hmm. well i can't say much about your server, but i was able to get this working on a free AWS server without much trouble though.

    last sanity check....
    you're running it with the command:
    ./Facilitator
    ??
     
  22. voltage

    voltage

    Joined:
    Nov 11, 2011
    Posts:
    515
    I've been using your facilitator at grabblesgame.com:61111 for testing purposes and I keep getting timeout errors. ("Failed to connect, are you sure that the port and address are correct?")

    Do you have a cutoff limit for users trying out your facilitator? It was working great the other day. I'm in the middle of testing out matchmaking without the relays.

    Also, I was curious whether or not utilizing matchmaking without the Relay's would cost CCU on the Host? I would assume not, but I swear I read something of that nature on your website.
     
    Last edited: Aug 5, 2016
  23. winglessraven

    winglessraven

    Joined:
    Dec 15, 2013
    Posts:
    3
    I am yes. I'm wondering if it's something to do with UFW blocking the application. Any idea what ports need to be open for it to work? The grabblesgame Facilitator is on 61111 so I'll try that.

    Edit: Tried opening port 61111 and still didn't work, so disabled UFW temporarily and still no good.
     
  24. voltage

    voltage

    Joined:
    Nov 11, 2011
    Posts:
    515
    What Type, Protocol and Port Range would you recommend me creating a new Security Group? AWS says I need 3389 open, but I want an uncommon port used for the game without leaving a ton of ports open as well. Would 3389 - 3390 do?

    For instance, 3389 - 61111 would leave all the ports in-between open and that seems like a bad idea.
     
  25. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    heh, thanks for asking. it looks like my inbound rules are very, very wide open right now. i think the facilitator just needs one inbound port open though...presumably on UDP. I'll try fiddling with my settings later. If you beat me to it, let me know what works :)
     
  26. KyleOlsen

    KyleOlsen

    Joined:
    Apr 3, 2012
    Posts:
    237
    We're seeing the same thing here as @Reilaos and @deliinteractive. Sometimes connecting succeeds and player objects are created while other times the client receives an instant disconnect.

    On a completely separate note - any word on supporting host migration?

    Edit: My apologies, I see the same question was asked just above here about host migration.
     
    deliinteractive and Reilaos like this.
  27. voltage

    voltage

    Joined:
    Nov 11, 2011
    Posts:
    515
    This confirms my suspicion of CCU use. I have a limit of 20, so basically I have to 'Go Live' within the Unity Services tab and get approved before I launch, even though I'm not using the Relays?

    EDIT:
    I tested your Nat Facilitator @Grabblesgame.com. I created and joined a match utilizing the correct functions, (StartHostAll() & StartClientAll()) between two builds under the same Router, different PC's. The result was an average of 100 ping/latency, while the Relay Servers average 80. It eventually disconnected my client automatically. This is with UPNP, NAT Punch, Match Making and the Relays on. (This error doesn't occur at all with Relays off. Avg ping 2-4.)

    Code (CSharp):
    1. Failed to send internal buffer channel: 1 bytesToSend: 41
    2. Send Error: 4 channel: 1 bytesToSend: 41
    It also renames my match's room with my internal and external IP for host. Odd behavior. It doesn't do that when I take NatHelper off and use the Relay.
     
    Last edited: Aug 8, 2016
  28. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    I think if you use a different matchmaking service (steam, for example), you can avoid the CCU cost.

    I've been using this plugin to allow players to directly connect to each other, and it's been working great. i used to get disconnects on the relay server (at the time, i was going over the 4kb/s bandwidth restriction on the relay servers). now that i'm no longer dealing with the relay server, I can play a game for a really long time without disruption. longest so far is maybe 45 minutes. still using unity's matchmaking server to help clients find each other though.
     
  29. voltage

    voltage

    Joined:
    Nov 11, 2011
    Posts:
    515
    Thanks for replying. Yeah, that's what I'm doing now too. I tested a build with my friend 30 minutes from where I live. He found my Server just fine from the matchmaker and joined directly. (Relays are turned off.) His average ping was 45-50. I'm very happy with it. Additionally I tried the Relay's without Nat Traversal and he averaged 80 ping.

    I was able to remove the IP's from my Match's name with a String.Split and he joined just fine, although the other day this prevented me from joining matches on my local machine. Very odd. I just tested again on my local machine for verification and it works. I suppose I am occasionally hitting that 10% marginal error in the Nat Punch, (even though I'm the local machine?) 10% error is 10% error I guess. Anyone know how to call a function when you fail to connect to a match? I'll just update the string on a UI Text..

    I've yet to decide on a port btw Robochase. I shelved my own facilitator as long as grabble's works for testing.
     
    thegreatzebadiah likes this.
  30. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Sorry I've been absent for a while guys. I've been in major crunch mode leading up to a conference on Saturday. The second I get back though I will be dedicating some solid time to fixing outstanding issues and hopefully getting host migration up and running.
     
    JimboNumbers, voltage and KyleOlsen like this.
  31. KyleOlsen

    KyleOlsen

    Joined:
    Apr 3, 2012
    Posts:
    237
  32. Fragmancer

    Fragmancer

    Joined:
    Aug 14, 2016
    Posts:
    1
    Thank you for creating such a great tool!!

    I really want to purchase your product for use in my game, but I don't think I can until host migration is working. I feel that is necessary for any commercial product!
     
    voltage and JimboNumbers like this.
  33. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Another quick update:

    Host migration is in. Lots of bugs have been fixed. An update is coming. I'm working through the last of the issues now and packaging everything up.
     
    voltage, moco2k and KyleOlsen like this.
  34. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @Reilaos @deliinteractive @KyleOlsen
    I'm hearing you guys. I'm really not sure what's going wrong though. I have not (yet!) been able to replicate the issues on my end but I'll see if I can rope some more friends in and keep trying between different routers. Many bugs are fixed in the next release though so the best I can say at the moment is to test again as soon as the update is out.

    Also when in doubt, always fall back to testing in the example scene. At least if it fails there it should be straight forward for me to replicate (though this particular bug seems very thorny since it doesn't happen every time).

    Also also if you override almost any method in NetworkManager do not forget to call the base method. That tends to cause all sort of problems.

    If the problems persist after the update please don't hesitate to email me at support@noblewhale.com.
     
  35. KnightPista

    KnightPista

    Joined:
    May 18, 2015
    Posts:
    40
    Hi, after updating to Unity 5.4.0p1, following error appears:

    The problem is that package on Asset Store is compiled against Unity 5.3 UNET API. However, that API has been updated a little bit for 5.4 and is not yet compatible with 5.3. See here.

    Can you please update the plugin to support Unity 5.4 UNET API ?
     
  36. WaaghMan

    WaaghMan

    Joined:
    Jan 27, 2014
    Posts:
    245
    Hello, I think we're having an issue with client disconnection.

    We're still getting the game together and bug-free, and we're able to play networked games without major issues. To be honest, I'm not sure if the NAT punchthrough has been used yet, as most of our attempts have been done on a LAN, but there have been a few attempts from our home and they worked properly without having to open ports or anything.

    Anyway, we're having an issue with manual disconnection. When a client exits the game (by calling NetworkManager.singleton.StopClient() ), the server receives the OnServerDisconnect() callback, however the NAT plugin seems to reestablish some kind of connection: The log message "NATTraveral: relay connection replaced with direct connection" is shown, and the connectionToClient property of this player's NetworkBehaviours seems to be replaced with a different NetworkConnection instance.

    Note that this doesn't happens always. I'm not sure yet but it may be related to the number of players already connected, we're seeing this issue consistently when a third player connects to the session and leaves, but not when only two players are connected.

    Just in case, here's the code we're using on the OnServerDisconnect() method of our class inheriting the NAT traversal NetworkManager:

    Code (csharp):
    1.  
    2. // slots is defined as an array of NetworkBehaviours, one for each player in the game.
    3.  
    4. public override void OnServerDisconnect(NetworkConnection conn)
    5.     {
    6.         Debug.Log("OnServerDisconnect - IP:" + conn.address + " - Id:" + conn.connectionId);
    7.         base.OnServerDisconnect(conn);
    8.  
    9.         // if lobbyplayer for this connection has not been destroyed by now, then destroy it here
    10.         for (int i = 0; i < slots.Length; i++)
    11.         {
    12.             var player = slots[i];
    13.             if (player == null)
    14.                 continue;
    15.  
    16.             if (player.connectionToClient == conn)
    17.             {
    18.                 slots[i] = null;
    19.                 NetworkServer.Destroy(player.gameObject);
    20.             }
    21.         }
    22.     }
     
    Last edited: Aug 22, 2016
  37. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @KnightPista You just need to re-download the plugin from within the 5.4 editor. There are multiple versions of the plugin, Unity decides which one to download based on which editor you're in.

    @WaaghMan I think I might have an idea what's happening from your description. For some reason it seems like you've got a relay connection and a direct connection at the same time, which should never be possible. Normally the direct connection would immediately replace the relay connection, or if the direct connection happened first the relay connection would be dropped as soon as it is made. For some reason it seems like this isn't happening correctly with more more than two players. I'll poke around a bit. If it happens again and you can get me the log from both client and host it may help. Thanks for reporting it.
     
  38. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @WaaghMan Are you by any chance connecting two builds on one computer to a build on another computer or something similar? Or are all three builds running on separate computers?
     
  39. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Version 1.42 released

    It was a huge pain, but UNet's built in host migration is now working with direct and punch through connections! Keep in mind that this is a cutting edge feature (for both UNet and the plugin) so if you experience any funky behaviour let me know.

    Host migration will not work with relay connections because UNet just doesn't support it yet. Frankly though, it's not a huge loss, with the combination of port-forwarding, punch through, and host migration the relays are increasingly irrelevant. You can still keep relay connections on when using host migration, but players will only be able to connect via relay the first time. If the host is dropped and a migration happens all the reconnecting players will do so either directly or via punch-through, no relays.

    Also keep in mind host migration is not effortless. You can't just turn it on and expect everything to work. Clients will not be able to know about anything that is stored only on the host, so when the host is lost that data is gone forever unless each client stores their own copy. I recommend lots of syncvars.

    See the "Constraints" section at the bottom of the page here: https://docs.unity3d.com/Manual/UNetHostMigration.html

    Changes include:
    • Host migration support.
    • Fixed NetworkTransport not being initialized in all cases.
    • Fixed matchmaker going away.
    • Fixed some issues with clients reconnecting.
    • Removed large message test because of a bug in UNet involving fragmented channels.
    • Updated documentation.
    As always if you run into any issues or have any trouble updating just let me know and I'll work with you to get the issues resolved as fast as possible.

    If you bought the asset and have not yet rated / reviewed it on the asset store, please take a moment to do so.

    Cheers!
     
    Last edited: Aug 23, 2016
  40. WaaghMan

    WaaghMan

    Joined:
    Jan 27, 2014
    Posts:
    245
    We're testing the game on separate computers. We use Steam matchmaking, so testing the builds on a single computer would not work. They are all on a wired LAN so they should have direct connection.

    Here is the log file of the issue in the server:

    Haven't tried the latest update yet, will try to do so later today
     
  41. Robosaru

    Robosaru

    Joined:
    Mar 31, 2013
    Posts:
    9
    Just purchased and (my fault - it is clearly written on the asset description) found after I purchased that mobile is not supported. Is there any plan to add iOS or Android support?
     
  42. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi, we have the same problem. When there are two players only everything is working, but when the third player joins, then if some client will disconnect, server will be ignoring this and that client will remain in the game. So server thinks he has 3 players (including himself) even though one of them is no longer connected. If the remaining client, who is still in the game, try to disconnect, everything will go ok this time. The client, who was not properly disconnected will stay. So in the end you will end up with 2 players on server, where no one is connected.

    There is also sometime problem with not properly disconnected players if the game running on client will crash or if you are running the game in window mode and you will close it using close button.

    We tried to fix this problem by manualy checking if that client is responding after some time and if not then server will disconnect him using connection.Disconnect() and connection.Dispose(); This solution only fixed disconnecting after the game crashed on client, but again it works only for two people

    I was testing those issues on following configurations: 3 players on one machine connected via WIFI. 2 clients on one pc with WIFI and the 3rd one on different pc on LAN. 3 different computers and two of them on WIFI and the 3rd on LAN. All of those test ended up with the same result
     
  43. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    "For some reason it seems like you've got a relay connection and a direct connection at the same time, which should never be possible..."

    Based on this I just realised that yesterday when I was working on interpolation on client I was looking in to my internal logs from what was going during the gameplay and I noticed that all messages are coming on the client around 70-150ms later then they were send from server even though I was running it on the same computer with direct connection. My RTT on client was 0ms but there was noticeable latency even without looking in to the logs.

    Another strange think that I discovered was when I was tracking net traffic with wireshark. After I have been succesfully connected to the host directly or using punch (connect relay was set false) wireshark was not receiving/sending messages from/to pc where I was connected, but instead it was all the time communicating with the grabblesgame.com. There were some messages with the correct source and destination ip, but it was really small number compared to the grabblesgame.com. I hope that it will somehow help
     
  44. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    I believe this may be misleading due to the way punch through works. The Facilitator's job is basically to trick the server into thinking it is accepting a connection from the facilitator that it is already connected to when in fact the connection is coming from a client punching through. I think this trickery may be confusing wireshark. I could be totally wrong though. One thing I can say for sure is that network traffic is not being routed through the Facilitator, it simply does not have that capability. It is likely though that some keep-alive messages are being sent so that the Facilitator knows that the host is still accepting connections. Also if you were connecting to a build on the same computer maybe wireshark wasn't seeing any of the networking data over the loopback and all you were seeing were the keep-alive messages to the Facilitator.

    Disturbing indeed. Fixing this issue is my highest priority at the moment. I've already got an idea where it's going wrong just not quite sure why yet.
     
  45. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Can you do a comparison between with the plugin and without. I don't believe the plugin should be adding any latency anywhere. Most of what goes on is during the connection phase. Once a connection is made it's all pretty much vanilla UNet. I know it seems like sending data between two builds on the same pc should be instant but there are lots of reasons it may not be. Hopefully none of them are due to the plugin though...
     
  46. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    I have done more testing and digging. It looks that it is editor, who is causing the delay. Difference between sending and receiving on two builds are only units of ms, but when running one build and the other one in editor, then the delay is ~100ms. In both cases I'm hitting solid 60fps. It's probably some bottleneck in editor, which delays sending that message.
     
    thegreatzebadiah likes this.
  47. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    This has been a constant thorn in my side! I want to add mobile support, I really do, but I'm a busy man and I don't own a Mac or an iPhone so it's particularly difficult. With this latest release I have actually made some moves towards allowing the plugin to be extended to support more platforms so it actually may be possible now, but 'possible' is a broad term. I'm working (loosely) with another dev who thinks they can get it working now that I exposed some files in a separate dll that can be replaced. I can't make any promises or give any kind of timeline though. If it was left to just me it probably wouldn't get done until after my game is released sometime (hopefully) around the end of the year.

    Also every time mobile is brought up I feel obligated to mention that NAT punch-through does not work anywhere near as well on mobile networks. You'll have the same results on wifi as you would from a pc, but I don't think data connections are really going to benefit from the plugin much if at all.
     
  48. Reilaos

    Reilaos

    Joined:
    Jul 2, 2016
    Posts:
    10
    Heya! Thanks for responding and such. I've gone and updated, changed one of my functions to call the base function at the start of it. Now clients are crashing upon their attempt to join. Stack trace:

    ========== OUTPUTING STACK TRACE ==================

    0x00000001800C8DA9 (RakNet) CSharp_RakPeerInterface_DetachPlugin
    0x00000000053293BE (Mono JIT Code) (wrapper managed-to-native) RakNet.RakNetPINVOKE:RakPeerInterface_DetachPlugin (System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef)
    0x0000000005329321 (Mono JIT Code) RakNet.RakPeerInterface:DetachPlugin (RakNet.PluginInterface2)
    0x0000000005329267 (Mono JIT Code) NATTraversal.NATHelper:StopPunchingThrough ()
    0x0000000005329142 (Mono JIT Code) NATTraversal.NetworkManager:OnMultiClientDisconnect (UnityEngine.Networking.NetworkConnection)
    0x0000000005328D96 (Mono JIT Code) NATTraversal.NetworkManager:OnMultiClientDisconnectMsg (UnityEngine.Networking.NetworkMessage)
    0x000000000531CF6E (Mono JIT Code) UnityEngine.Networking.NetworkConnection:InvokeHandler (int16,UnityEngine.Networking.NetworkReader,int)
    0x000000000531CE0C (Mono JIT Code) UnityEngine.Networking.NetworkConnection:InvokeHandlerNoData (int16)
    0x000000000531B495 (Mono JIT Code) UnityEngine.Networking.NetworkClient:Update ()
    0x000000000531A8A5 (Mono JIT Code) UnityEngine.Networking.NetworkClient:UpdateClients ()
    0x000000000531A4FA (Mono JIT Code) UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate ()
    0x0000000005260553 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    0x00007FFFB0394E7F (mono) mono_set_defaults
    0x00007FFFB02E84B5 (mono) mono_runtime_invoke
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF63D9F99A5)
    0x00007FF63D9F99A5 (Build_Latest)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF63DDDE938)
    0x00007FF63DDDE938 (Build_Latest)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF63D9B4131)
    0x00007FF63D9B4131 (Build_Latest)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF63DA7EB85)
    0x00007FF63DA7EB85 (Build_Latest)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF63DA818D1)
    0x00007FF63DA818D1 (Build_Latest)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF63DEDCC08)
    0x00007FF63DEDCC08 (Build_Latest)
    0x00007FFFE32B8102 (KERNEL32) BaseThreadInitThunk

    ========== END OF STACKTRACE ===========​



    Meanwhile, on the host side:
    NATHelper: Unexpected raknet message received: ID_NAT_PUNCHTHROUGH_FAILED

    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    Log: connection {1} has been disconnected by timeout; address {::ffff:23.127.77.52:54243}
    Empty player list given to NetworkServer.Destroy(), nothing to do.

    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)​
     
  49. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @WaaghMan @Vasica
    I do believe I just fixed the three player disconnect issue. The fix will be in the next release which I should be able to get out pretty soon.

    @Reilaos
    I'm not sure what's going wrong here. Which method did you add the base call to that caused the crash to start happening? Can you get me more output from before the crash, or better yet send me a copy of your project so I can poke around in it? I made some changes in the code that I think might at least stop it from crashing but it kind of seems like something else is going wrong that leads to the crash.
     
    PerunCreative and KyleOlsen like this.
  50. Reilaos

    Reilaos

    Joined:
    Jul 2, 2016
    Posts:
    10
    @thegreatzebadiah

    Do you have a Vive? The game won't be very easy to test without one.

    I've removed the call to the base function altogether, and it doesn't seem to have stopped the crashing. I think it's from updating, rather than the addition of that line.

    Here's a bit more around the trace on the client:



    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    NATTraveral: Attempting to connect directly: xx.xxx.xx.xx 192.168.1.83

    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
    UnloadTime: 49.090614 ms

    Unloading 17 unused Assets to reduce memory usage. Loaded Objects now: 976.
    Total: 0.599356 ms (FindLiveObjects: 0.045439 ms CreateObjectMapping: 0.031679 ms MarkObjects: 0.494397 ms DeleteObjects: 0.026559 ms)

    NATHelper: NAT Device not found

    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    Log: connection {1} has been disconnected by timeout; address {::ffff:23.127.77.52:63929}
    Crash!!!
    SymInit: Symbol-SearchPath: '.;D:\Sync\Projects\Unity Projects\Telefrag\Builds;D:\Sync\Projects\Unity Projects\Telefrag\Builds;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Francis'
    OS-Version: 10.0.14393 () 0x300-0x1
    Unloading 3 Unused Serialized files (Serialized files now loaded: 0)
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest.exe:Build_Latest.exe (00007FF613250000), size: 21504000 (result: 0), SymType: 'PDB', PDB: '.\player_win_x64.pdb', fileVersion: 5.3.4.47953
    C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (00007FFE88450000), size: 1904640 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 10.0.14393.82
    C:\WINDOWS\System32\KERNEL32.DLL:KERNEL32.DLL (00007FFE879F0000), size: 700416 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNEL32.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\KERNELBASE.dll:KERNELBASE.dll (00007FFE85230000), size: 2215936 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNELBASE.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\GDI32.dll:GDI32.dll (00007FFE88340000), size: 212992 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\GDI32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\gdi32full.dll:gdi32full.dll (00007FFE85830000), size: 1581056 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\gdi32full.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\USER32.dll:USER32.dll (00007FFE88090000), size: 1462272 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\USER32.dll', fileVersion: 10.0.14393.5
    C:\WINDOWS\System32\win32u.dll:win32u.dll (00007FFE859C0000), size: 122880 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\win32u.dll', fileVersion: 10.0.14393.51
    C:\WINDOWS\SYSTEM32\HID.DLL:HID.DLL (00007FFE83840000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\HID.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\ADVAPI32.dll:ADVAPI32.dll (00007FFE87910000), size: 663552 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ADVAPI32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\msvcrt.dll:msvcrt.dll (00007FFE87280000), size: 647168 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\msvcrt.dll', fileVersion: 7.0.14393.0
    C:\WINDOWS\System32\sechost.dll:sechost.dll (00007FFE883F0000), size: 364544 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\sechost.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\RPCRT4.dll:RPCRT4.dll (00007FFE85A70000), size: 1183744 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\RPCRT4.dll', fileVersion: 10.0.14393.82
    C:\WINDOWS\System32\WS2_32.dll:WS2_32.dll (00007FFE88380000), size: 434176 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\WS2_32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\ole32.dll:eek:le32.dll (00007FFE88200000), size: 1273856 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ole32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\combase.dll:combase.dll (00007FFE87CB0000), size: 2912256 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\combase.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\ucrtbase.dll:ucrtbase.dll (00007FFE849E0000), size: 1003520 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ucrtbase.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (00007FFE851C0000), size: 434176 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\bcryptPrimitives.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\VERSION.dll:VERSION.dll (00007FFE80390000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\VERSION.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\SHLWAPI.dll:SHLWAPI.dll (00007FFE85C40000), size: 335872 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SHLWAPI.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\SHELL32.dll:SHELL32.dll (00007FFE85CB0000), size: 22052864 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SHELL32.dll', fileVersion: 10.0.14393.82
    C:\WINDOWS\System32\cfgmgr32.dll:cfgmgr32.dll (00007FFE85450000), size: 270336 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\cfgmgr32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\windows.storage.dll:windows.storage.dll (00007FFE84AE0000), size: 7184384 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\windows.storage.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\powrprof.dll:powrprof.dll (00007FFE84980000), size: 311296 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\powrprof.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\kernel.appcore.dll:kernel.appcore.dll (00007FFE84970000), size: 61440 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\kernel.appcore.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\shcore.dll:shcore.dll (00007FFE856D0000), size: 692224 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\shcore.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\profapi.dll:profapi.dll (00007FFE84950000), size: 81920 (result: 0), SymType: '-nosymbols-', PDB: 'C:\WINDOWS\System32\profapi.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\OLEAUT32.dll:OLEAUT32.dll (00007FFE871C0000), size: 770048 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\OLEAUT32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\OPENGL32.dll:OPENGL32.dll (00007FFE54FA0000), size: 1191936 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\OPENGL32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\IMM32.dll:IMM32.dll (00007FFE879C0000), size: 188416 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\IMM32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\WINMM.dll:WINMM.dll (00007FFE82E10000), size: 143360 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINMM.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\MSACM32.dll:MSACM32.dll (00007FFE6B590000), size: 114688 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSACM32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\GLU32.dll:GLU32.dll (00007FFE7BFF0000), size: 184320 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\GLU32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\DNSAPI.dll:DNSAPI.dll (00007FFE83FF0000), size: 655360 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\DNSAPI.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\DDRAW.dll:DDRAW.dll (00007FFE54A30000), size: 1011712 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\DDRAW.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL:IPHLPAPI.DLL (00007FFE83FB0000), size: 229376 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\WINHTTP.dll:WINHTTP.dll (00007FFE81A60000), size: 835584 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINHTTP.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\NSI.dll:NSI.dll (00007FFE87C40000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\NSI.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\WINMMBASE.dll:WINMMBASE.dll (00007FFE82DB0000), size: 176128 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINMMBASE.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\DCIMAN32.dll:DCIMAN32.dll (00007FFE70820000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\DCIMAN32.dll', fileVersion: 10.0.14393.0
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Mono\mono.dll:mono.dll (00007FFE4EF90000), size: 2994176 (result: 0), SymType: '-exported-', PDB: 'D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Mono\mono.dll', fileVersion: 1.0.0.1
    C:\WINDOWS\System32\PSAPI.DLL:pSAPI.DLL (00007FFE88080000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\PSAPI.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\MSWSOCK.dll:MSWSOCK.dll (00007FFE84220000), size: 376832 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSWSOCK.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\system32\uxtheme.dll:uxtheme.dll (00007FFE830E0000), size: 610304 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\uxtheme.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\MSCTF.dll:MSCTF.dll (00007FFE87320000), size: 1421312 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\MSCTF.dll', fileVersion: 10.0.14393.5
    C:\WINDOWS\system32\dwmapi.dll:dwmapi.dll (00007FFE825D0000), size: 155648 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\dwmapi.dll', fileVersion: 10.0.14393.0
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\OVRPlugin.dll:OVRPlugin.dll (00007FFE806A0000), size: 376832 (result: 0), SymType: '-exported-', PDB: 'D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\OVRPlugin.dll'
    C:\WINDOWS\SYSTEM32\d3d11.dll:d3d11.dll (00007FFE81380000), size: 2842624 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\d3d11.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\dxgi.dll:dxgi.dll (00007FFE838E0000), size: 651264 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dxgi.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\nvwgf2umx.dll:nvwgf2umx.dll (00007FFE7ED90000), size: 20029440 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\nvwgf2umx.dll', fileVersion: 10.18.13.6519
    C:\WINDOWS\SYSTEM32\bcrypt.dll:bcrypt.dll (00007FFE84890000), size: 176128 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\bcrypt.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\system32\nvspcap64.dll:nvspcap64.dll (00007FFE71020000), size: 1798144 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\nvspcap64.dll', fileVersion: 2.11.3.5
    C:\WINDOWS\System32\SETUPAPI.dll:SETUPAPI.dll (00007FFE874E0000), size: 4362240 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SETUPAPI.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\system32\nvapi64.dll:nvapi64.dll (00007FFE7D770000), size: 3887104 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\nvapi64.dll', fileVersion: 10.18.13.6519
    C:\WINDOWS\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FFE845C0000), size: 180224 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\SspiCli.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\MMDevAPI.DLL:MMDevAPI.DLL (00007FFE7CE20000), size: 462848 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MMDevAPI.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\PROPSYS.dll:pROPSYS.dll (00007FFE82400000), size: 1593344 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\PROPSYS.dll', fileVersion: 7.0.14393.0
    C:\WINDOWS\SYSTEM32\DEVOBJ.dll:DEVOBJ.dll (00007FFE83570000), size: 163840 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\DEVOBJ.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\wdmaud.drv:wdmaud.drv (00007FFE5F170000), size: 258048 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\wdmaud.drv', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\AVRT.dll:AVRT.dll (00007FFE800B0000), size: 45056 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\AVRT.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\ksuser.dll:ksuser.dll (00007FFE7CC20000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ksuser.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\AUDIOSES.DLL:AUDIOSES.DLL (00007FFE75760000), size: 606208 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\AUDIOSES.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\wintypes.dll:wintypes.dll (00007FFE81640000), size: 1269760 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\wintypes.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\msacm32.drv:msacm32.drv (00007FFE803A0000), size: 53248 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\msacm32.drv', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\midimap.dll:midimap.dll (00007FFE7CB80000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\midimap.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\dsound.dll:dsound.dll (00007FFE5E010000), size: 634880 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dsound.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\clbcatq.dll:clbcatq.dll (00007FFE85BA0000), size: 651264 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\clbcatq.dll', fileVersion: 2001.12.10941.16384
    C:\WINDOWS\SYSTEM32\xinput1_3.dll:xinput1_3.dll (0000000000400000), size: 122880 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\xinput1_3.dll', fileVersion: 9.18.944.0
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\openvr_api.dll:eek:penvr_api.dll (00007FFE80470000), size: 335872 (result: 0), SymType: '-exported-', PDB: 'D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\openvr_api.dll'
    C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\vrclient_x64.dll:vrclient_x64.dll (00007FFE4DFD0000), size: 2777088 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\vrclient_x64.dll'
    C:\WINDOWS\SYSTEM32\MSVCR120.dll:MSVCR120.dll (00007FFE77F70000), size: 978944 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSVCR120.dll', fileVersion: 12.0.21005.1
    C:\WINDOWS\SYSTEM32\MSVCP120.dll:MSVCP120.dll (00007FFE77EC0000), size: 679936 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSVCP120.dll', fileVersion: 12.0.21005.1
    C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\driver_lighthouse.dll:driver_lighthouse.dll (00007FFE5D290000), size: 1675264 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\driver_lighthouse.dll'
    C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\aitcamlib.dll:aitcamlib.dll (00007FFE7E660000), size: 57344 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\aitcamlib.dll'
    C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\AitUVCExtApi.dll:AitUVCExtApi.dll (00007FFE7E090000), size: 114688 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\AitUVCExtApi.dll', fileVersion: 1.0.0.2
    C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\AitH264Capture.dll:AitH264Capture.dll (00007FFE527D0000), size: 2662400 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers\lighthouse\bin\win64\AitH264Capture.dll', fileVersion: 1.0.0.2
    C:\WINDOWS\SYSTEM32\MSIMG32.dll:MSIMG32.dll (00007FFE7EA90000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSIMG32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\WINSPOOL.DRV:WINSPOOL.DRV (00007FFE80930000), size: 544768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINSPOOL.DRV', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\OLEACC.dll:OLEACC.dll (00007FFE7DBA0000), size: 413696 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\OLEACC.dll', fileVersion: 7.2.14393.0
    C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.51_none_7bd61ed3ff8affee\gdiplus.dll:gdiplus.dll (00007FFE7E4C0000), size: 1675264 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.51_none_7bd61ed3ff8affee\gdiplus.dll', fileVersion: 10.0.14393.51
    C:\WINDOWS\System32\WINTRUST.dll:WINTRUST.dll (00007FFE85670000), size: 348160 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\WINTRUST.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\MSASN1.dll:MSASN1.dll (00007FFE849D0000), size: 65536 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\MSASN1.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\CRYPT32.dll:CRYPT32.dll (00007FFE854A0000), size: 1867776 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\CRYPT32.dll', fileVersion: 10.0.14393.0
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\RakNet.dll:RakNet.dll (0000000180000000), size: 2383872 (result: 0), SymType: '-exported-', PDB: 'D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\RakNet.dll'
    C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_08e394a1a83e212f\MSVCR90.dll:MSVCR90.dll (0000000073670000), size: 667648 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_08e394a1a83e212f\MSVCR90.dll', fileVersion: 9.0.30729.9247
    C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_08e394a1a83e212f\MSVCP90.dll:MSVCP90.dll (00000000733F0000), size: 864256 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_08e394a1a83e212f\MSVCP90.dll', fileVersion: 9.0.30729.9247
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\CSteamworks.dll:CSteamworks.dll (00007FFE80F00000), size: 151552 (result: 0), SymType: '-exported-', PDB: 'D:\Sync\Projects\Unity Projects\Telefrag\Builds\Build_Latest_Data\Plugins\CSteamworks.dll', fileVersion: 1.27.0.0
    D:\Sync\Projects\Unity Projects\Telefrag\Builds\steam_api64.dll:steam_api64.dll (00000000733B0000), size: 253952 (result: 0), SymType: '-exported-', PDB: 'D:\Sync\Projects\Unity Projects\Telefrag\Builds\steam_api64.dll', fileVersion: 3.42.61.66
    C:\Program Files (x86)\Steam\steamclient64.dll:steamclient64.dll (0000000073980000), size: 12947456 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamclient64.dll', fileVersion: 3.58.42.68
    C:\WINDOWS\System32\imagehlp.dll:imagehlp.dll (00007FFE85A50000), size: 114688 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\imagehlp.dll', fileVersion: 10.0.14393.0
    C:\Program Files (x86)\Steam\tier0_s64.dll:tier0_s64.dll (0000000073720000), size: 1982464 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\tier0_s64.dll', fileVersion: 3.58.42.68
    C:\Program Files (x86)\Steam\vstdlib_s64.dll:vstdlib_s64.dll (0000000073910000), size: 442368 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\vstdlib_s64.dll', fileVersion: 3.58.42.68
    C:\WINDOWS\SYSTEM32\Secur32.dll:Secur32.dll (00007FFE81A50000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\Secur32.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL:CRYPTBASE.DLL (00007FFE843E0000), size: 45056 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL', fileVersion: 10.0.14393.0
    C:\Program Files (x86)\Steam\gameoverlayrenderer64.dll:gameoverlayrenderer64.dll (00007FFE4FD30000), size: 1511424 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\gameoverlayrenderer64.dll', fileVersion: 3.58.42.68
    C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL:dhcpcsvc6.DLL (00007FFE80910000), size: 90112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL:dhcpcsvc.DLL (00007FFE808F0000), size: 106496 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL', fileVersion: 10.0.14393.0
    C:\WINDOWS\system32\napinsp.dll:napinsp.dll (00007FFE76620000), size: 90112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\napinsp.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\system32\pnrpnsp.dll:pnrpnsp.dll (00007FFE76600000), size: 106496 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\pnrpnsp.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\system32\NLAapi.dll:NLAapi.dll (00007FFE7EA00000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\NLAapi.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\winrnr.dll:winrnr.dll (00007FFE75CE0000), size: 57344 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\winrnr.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\wshbth.dll:wshbth.dll (00007FFE75C40000), size: 86016 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\wshbth.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\System32\fwpuclnt.dll:fwpuclnt.dll (00007FFE7DB30000), size: 434176 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\fwpuclnt.dll', fileVersion: 10.0.14393.0
    C:\Windows\System32\rasadhlp.dll:rasadhlp.dll (00007FFE7E4B0000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\rasadhlp.dll', fileVersion: 10.0.14393.0
    C:\WINDOWS\SYSTEM32\dbghelp.dll:dbghelp.dll (00007FFE7CEA0000), size: 1646592 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dbghelp.dll', fileVersion: 10.0.14321.1024

    ========== OUTPUTING STACK TRACE ==================

    0x00000001800C8DA9 (RakNet) CSharp_RakPeerInterface_DetachPlugin
    0x00000000047A590E (Mono JIT Code) (wrapper managed-to-native) RakNet.RakNetPINVOKE:RakPeerInterface_DetachPlugin (System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef)
    0x00000000047A5871 (Mono JIT Code) RakNet.RakPeerInterface:DetachPlugin (RakNet.PluginInterface2)
    0x00000000047B8907 (Mono JIT Code) NATTraversal.NATHelper:StopPunchingThrough ()
    0x00000000047B87A2 (Mono JIT Code) NATTraversal.NetworkManager:OnMultiClientDisconnect (UnityEngine.Networking.NetworkConnection)
    0x00000000047B83F6 (Mono JIT Code) NATTraversal.NetworkManager:OnMultiClientDisconnectMsg (UnityEngine.Networking.NetworkMessage)
    0x00000000047A5F6E (Mono JIT Code) UnityEngine.Networking.NetworkConnection:InvokeHandler (int16,UnityEngine.Networking.NetworkReader,int)
    0x00000000047A5E0C (Mono JIT Code) UnityEngine.Networking.NetworkConnection:InvokeHandlerNoData (int16)
    0x00000000047A0B05 (Mono JIT Code) UnityEngine.Networking.NetworkClient:Update ()
    0x00000000047A0535 (Mono JIT Code) UnityEngine.Networking.NetworkClient:UpdateClients ()
    0x00000000047A038A (Mono JIT Code) UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate ()
    0x00000000046F0553 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    0x00007FFE4F0B4E7F (mono) mono_set_defaults
    0x00007FFE4F0084B5 (mono) mono_runtime_invoke
    0x00007FF6134D99A5 (Build_Latest) [c:\buildslave\unity\build\runtime\scripting\backend\scriptinginvocation.cpp:191] ScriptingInvocation::Invoke
    0x00007FF6138BE938 (Build_Latest) [c:\buildslave\unity\build\runtime\networking\unetutility.cpp:32] `UNET::ScriptingUpdater::Init'::`2'::UNetUpdate::Forward
    0x00007FF613494131 (Build_Latest) [c:\buildslave\unity\build\runtime\misc\player.cpp:1756] PlayerLoop
    0x00007FF61355EB85 (Build_Latest) [c:\buildslave\unity\build\platformdependent\winplayer\winmain.cpp:546] MainMessageLoop
    0x00007FF6135618D1 (Build_Latest) [c:\buildslave\unity\build\platformdependent\winplayer\winmain.cpp:969] PlayerWinMain
    0x00007FF6139BCC08 (Build_Latest) [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c:275] __tmainCRTStartup
    0x00007FFE879F8364 (KERNEL32) BaseThreadInitThunk

    ========== END OF STACKTRACE ===========

    **** Crash! ****​


    I've also pastebinned my connection:
    http://pastebin.com/6Mut5nwy

    Code that starts the host:
    http://pastebin.com/JCqTDm2H

    Code that tries to join the match:
    http://pastebin.com/QGAVxGRZ