Help with UNET useWebSockets error?! "Failed to Send Internal Buffer" "WrongConnection channel:0"

Greetings, hoping someone can

I’ve got a super dead simple networking example. I started with the free and helpful UNET Basic Dedicated Demo from the Asset Store, and then I simplified it and added a little bit of movement code.

Testing it using a plain windows build, it works fine every time.

  • Dedicated server starts with NetwrokManager.StartServer()
  • Players connect to the server via NetworkManager StartClient(),
  • Players send [Command]s when they move, which get propigated from the server via [ClientRpc] to the other clients. The positions all update and everything works as designed.

So, all good right? Then I do the following:

  • Turn on useWebSockets on network manager
  • Switch build to WebGL and export my new WebGL client
  • Switch back to Windows and export my new server with usewebsockets
  • Fire everything up and test again

Is still works, BUT I start seeing scary errors, check this log right after a player connects:

I attached the full log to this with the call stack on these.

The game still works, but these errors keep happening. In fact, I see more with every command, even though the commands are working on all clients (and in the server editor windows even).

It gets worse. If I then stop the server, and restart it to test again, all of Unity will hard crash when a player connects (crash dump says, unhelpfully, “The thread tried to read from or write to a virtual address for which it does not have the appropriate access.”). I can “fix” this by switch platforms a couple times and doing a new build (why? I don’t know), but that just gets my back to the failed to send internal buffer/wrongconnection errors.

Questions (Note: I am using Unity Beta 5.6b7):

  • Why is this only happening with useWebSockets?
  • Where should I be looking for the source of this problem? I’m not sure where to be looking to trial and error fixes here.

Thanks in advance for any advice!

2951042–218784–log.txt (6.46 KB)

Aaannnd… it all works fine in Unity 5.5.1. Today’s lesson: don’t use betas without good reason :frowning:

Could you please open the bug about this?

I did actually ( case 878726 ), but I accidentally submitted before finishing my write up so it’s kind of a mangle of sentence fragments in there. If it would help I can submit another.

submit another please with ref to this bug, so we will close them. add please your project and reproduce steps, and ping me after finishing I will try to take a look on them fast.

and thanks a lot fro report

New report with all the steps to recreate and full project file ( Case# 879184 )

Let me know if you need anything else.

ok will try to take a look on that