Network Issue since update, any clue why?

Hello guys,

Since the 4.2.1 update I believe most of my network code simply stopped working. I did not see any reference to network changes in the patch notes. Does anyone know what could cause this issue?

Here is the network code on my players for example:

//Var that sync with server
function OnSerializeNetworkView(stream : BitStream, info : NetworkMessageInfo) {
	
	if (stream.isWriting) {
	
		var pos : Vector3 = transform.position;		
		stream.Serialize(pos);
				
		var healthC : float = playerHealth;
        stream.Serialize(healthC);
    } 
    
    else {
	
		var posReceive : Vector3 = Vector3.zero;
		stream.Serialize(posReceive); //"Decode" it and receive it
		transform.position = posReceive;
		
    	var healthZ: float = 0; 
    	stream.Serialize(healthZ);
        playerHealth = healthZ;
    }    
 }

A network view is attached to it, the code is observed and the network view is set to reliable data.

Everything once worked fine and I did not touch that part of the code since. Right now, no player position and health is sync, and for the all players other then the first one (server), other players to do instantiate (only the first player get the instantiation).

I am really confuse at this point, if anyone can help It would be really appreciated!

Thanks :slight_smile:

Nothing has changed in the networking API since 2.6 I believe.
Have you done any debugging ?

Yes Ive tried some different alternatives and nothing seemed to work. I just gave up and decided it was time to move to uLink! It now works :slight_smile:

I haven’t been able to connect to the master server since updating. I’ve tried to test my twice in the last week, days apart, and both times I got an error saying that the master server was down. I have never not been able to connect to it in previous tests (probably a dozen times), so that fact that I was getting this error for hours and hours on 2 separate occasions after updating to 4.2.1 is a little worrying.

In fact I am still getting this error right now. Are the master servers currently down? If they are simply down on Unity’s end, that would be pretty comforting because I don’t even think I changed my server connecting script and I’m freaking out that I somehow broke my multiplayer code and can’t figure out where.

I greatly appreciate Unity having a test master server, but it would be nice if there was a page on the Unity site with a:

“Test Server is [online][offline]”

graphic so devs know whether they need to be checking for coding errors on their end or not.

I submitted a bug report, hopefully will get the answers but something must have happened with unity 4.2.1, most likely with the server/back-end if there was no change in the editor.

I too can’t connect to the master server since the latest update.

failed to connect to master server at 67.225.180.24:23466

It’s as if the master server is down, or maybe the IP or port changed for some reason.
It’s been days now. I hope it’s fixed soon.

Has anyone tried connecting to their own master server? Assuming it’s not a code problem, I’d spin up my own but don’t want to waste time if that too wont work.

Thanks.

There are now at least 3 threads related to this. I, too, can confirm that it’s been impossible to connect to Unity’s master server for at least (for me anyway) 3 days. I know after testing that it’s not on my end, so the most likely cause is the server actually being down.

@acehwk: yeah, I also wish there was even just a rudimentary page that would report the current status of the server. I know it’s just for testing purposes and isn’t necessarily meant to be all that realiable (they say as much), but it’s still important to know what’s going on so people on our end don’t waste our time trying to find buggy scripting when it’s actually just the server.

@Alex-: I haven’t seen anything about any network changes in the last update. I may have missed it though and would be very grateful if you could post the specifics as to what those changes are if there actually are any. It may very well be that there is nothing wrong with your code and what you are attributing to a problem with the update is just coincidental with the server coming down at about the same time the update what released. I’d wait for someone to report that working again before worrying too much about it.

Also, have you tried testing by starting a local server and playing over lan rather than using the master server over the net? I guess I’m just assuming your problem is related to the master server problem. If you’re having the problem with strictly a lan game and a server you created locally, then it’s something else. I only ask because I’ve tested my game locally with the 4.2 update and I don’t seem to be having any problems.

For what it’s worth, I installed the MasterServer on my own host over the weekend, along with the Facilitator, and all is working great. Confirmation nothing has changed with the networking code, and the Unity test server is just down. Who knows, maybe too many people were using the test server for production or something so they shut it down, maybe it’s just technical difficulties. Either way, now that I have my own running, I’ll continue to use it and be in charge of my own destiny.