When I call client.Disconnect() on WebGL I get error: UNETWebSocketsInstances.hostsContainingMessages is null. On iOS and Android all works fine. Can anybody help me?
I found similar problem: UNet WebGL Uncaught TypeError: Cannot read property 'id' of null - Unity Engine - Unity Discussions
@AlekseyKhomenko Hi Aleksey
Could you please open bug for this, submit them (with project and reproducing steps) and ping me with private message? If you will be able to do it before monday i will take a look on the next week
i’m sorry for this
So, for “fix” it:
- Go to your compiled progect, Release or Development folder.
- Find file named as your_project_name.js in any text editor. If you have Release build, unpack file your_project_name.jsgz
- Find fragment
if (UNETWebSocketsInstances.hostsContainingMessages[i].id == hostId) UNETWebSocketsInstances.hostsContainingMessages[i] = null;
- Replace this fragment on
if(UNETWebSocketsInstances.hostsContainingMessages[i] != null) {
if (UNETWebSocketsInstances.hostsContainingMessages[i].id == hostId) UNETWebSocketsInstances.hostsContainingMessages[i] = null;
}
- Save. If you have Release, replace this file in source archive.
- “Enjoy” your raw UNET.
- PROFIT???
regardless of whether this is the proper fix, I just want to point out that you can make that change to the source /PlaybackEngines/WebGLSupport/BuildTools/lib/UnetWebSocket.js
so that you don’t need to decompress, modify, compress everytime after you build.
Thank!
hi,
@Marco-Trivellato
what do you mean by
?
Also, do you have an aproximate date for the next patch ?
and by the way, will it patch this too ?:
I personally haven’t investigated the problem, I don’t know if the recommended fix has any side effect.
That bug was fixed a while ago. I suspect you are experiencing a different bug with same symptoms. A bug report would be appreciated.
Did anyone ever create a ticket for this like @aabramychev requested? We just upgraded to 5.6 and are having to apply @infuzo 's workaround to address it.
@DimensionU_1 could you open it? it is not problem if we will have duplicate, in the description of the bug (with repro steps) could you add ref to this topic?
thanks a lot
Alex
Hi Check this out : in networkmanager component “Use WebSockets” is Ticked ?
am getting this issue on executing webgl html page "Uncaught TypeError: Cannot read property ‘id’ of null "
plz help me to solve this