Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Why do i get this Socket Exception in my WebGL build with Netcode for Game Objects?

Discussion in 'Netcode for GameObjects' started by erikScantamburlo, Aug 31, 2023.

  1. erikScantamburlo

    erikScantamburlo

    Joined:
    Jan 11, 2023
    Posts:
    1
    Hello everyone,
    i'm trying to test a simple multiplayer scene made with Netcode For GameObjects v. 1.5.2 and WebSocket Transport 2.0.0 imported form this git url: https://github.com/Unity-Technologi...rts/com.community.netcode.transport.websocket

    If I test it in editor all works as intended and I can start as a host, scene works as expected.
    But when I build it I get this error in browser console:
    "SocketException: Success
    at System.Net.Sockets.Socket..ctor (System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) [0x00000] in <00000000000000000000000000000000>:0 "


    why does this happen?
    I tryed to disable windows defender firewall too but nothing changes.
    I'm testing also on other built projects with the same netcode version and same transport version and i get the same error.
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Hmmm ... a SuccessException. o_O

    Have you tried building a development / debug mode build with full stacktrace (see Player Settings)? You may get more detailed info on this. Hopefully it will be more informative than "successfully failed". ;)

    I have not seen that "Path" setting in the WebSocket transport. You entered "/netcode" which may or may not be correct. Just a stomach feeling, maybe check the documents on that again. I sense this is supposed to indicate the app is deployed to "https://the.webserver.domain/netcode" - is that so?