WebSockets module not loaded properly in packaged builds only. Other modules OK

Just before creating the socket object. That is the point where the socket object is instantiating.
consider the function " CreateWebSocket(ServerURL, ServerProtocol); "
Just place your code into the If block statement of my code.