microsoft / HoloJS

Provides a framework for creating holographic apps using JavaScript and WebGL.
MIT License
1.19k stars 114 forks source link

WebSocket is undefined if i run the samples in HoloJSWebViewer. #134

Closed swomack closed 6 years ago

swomack commented 6 years ago

Here is my scenario -

I have a websocket server running in my computer. I wanted to create a websocket client in one of the sample's code this way -

var socket = new WebSocket("ws://192.168.1.59:7682", "ui-text-protocol");

Now, if i run the sample in browser, it works well. It can establish the connection. But if the sample runs in HoloJSWebViewer, it gives the following error -

ReferenceError: 'WebSocket' is undefined

I expected it to work like it works in browser. Any other approach i should take to create a websocket client?

Almost-Done commented 6 years ago

WebSockets are not implemented yet in HoloJS. I'll try to get them in.

Almost-Done commented 6 years ago

I pushed a WebSockets implementation to the develop/websockets branch. Give it a try and let me know if you encounter any issues with it. I'll merge the code into master over the next couple of days.

swomack commented 6 years ago

Thanks, that was fast. I will try this tomorrow at office (its weekend here) and let you know if i face any issue.

swomack commented 6 years ago

I tried this and got an exception. I modified the app.js file of the ThreeJSApp project. Here is my code -

var socketUt = new WebSocket("ws://192.168.1.59:7682", "ui-text-protocol");

socketUt.onopen = function (evt) {
    console.log("Websocket Connected!");
};
socketUt.onclose = function (evt) {
    console.log("Websocket Closed!");
};
socketUt.onmessage = function (evt) {
    var message = evt.data;
    console.log(message);
}; 

After running this i got following exception -

exception

Here is the call stack -

call stack

Please let me know if i am doing something wrong and if you need more information.

Almost-Done commented 6 years ago

Is 192.168.1.59 the same PC where the app is running? Can you please share the log from the Output window?

swomack commented 6 years ago

Yeah, its the same PC. Here is the full debug log -

'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'D:\Works\HoloJS\HoloJS\Debug\ThreeJSApp-Vs2017\AppX\ThreeJSApp-Vs2017.exe'. Symbols loaded.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\kernel32.dll'
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.25017.0_x86__8wekyb3d8bbwe\vccorlib140d_app.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.25017.0_x86__8wekyb3d8bbwe\vcruntime140d_app.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'D:\Works\HoloJS\HoloJS\Debug\ThreeJSApp-Vs2017\AppX\ucrtbased.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.25017.0_x86__8wekyb3d8bbwe\msvcp140d_app.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
The thread 0x2154 has exited with code 0 (0x0).
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'D:\Works\HoloJS\HoloJS\Debug\ThreeJSApp-Vs2017\AppX\HoloJsHost-Vs2017.dll'. Symbols loaded.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'D:\Works\HoloJS\HoloJS\Debug\ThreeJSApp-Vs2017\AppX\libEGL.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'D:\Works\HoloJS\HoloJS\Debug\ThreeJSApp-Vs2017\AppX\libGLESv2.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Chakra.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mfplat.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mfreadwrite.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.25017.0_x86__8wekyb3d8bbwe\concrt140d_app.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgi.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\D3DCompiler_47.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\iertutil.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptsp.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\RTWorkQ.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\twinapi.appcore.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcrypt.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.UI.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreMessaging.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\actxprxy.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreUIComponents.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\MrmCoreR.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.UI.Core.TextInput.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\TextInputFramework.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rometadata.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinMetadata\Windows.Foundation.winmd'. Module was built without symbols.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Perception.Stub.dll'. Cannot find or open the PDB file.
err: egl::GetPlatformDisplayEXT(283): EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is deprecated, please useEGL_EXPERIMENTAL_PRESENT_PATH_ANGLE.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgidebug.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ResourcePolicyClient.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ResourcePolicyClient.dll'
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\igd10iumd32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ncrypt.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntasn1.dll'. Cannot find or open the PDB file.
D3D11CreateDevice: Flags (0x2) were specified which require the D3D11 SDK Layers for Windows 10, but they are not present on the system.
These flags must be removed, or the Windows 10 SDK must be installed.
Flags include: D3D11_CREATE_DEVICE_DEBUG
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: _com_error at memory location 0x0478D564.
'ThreeJSApp-Vs2017.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ntasn1.dll'
'ThreeJSApp-Vs2017.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ncrypt.dll'
'ThreeJSApp-Vs2017.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\igd10iumd32.dll'
err: rx::Renderer11::initializeD3DDevice(827): Failed creating Debug D3D11 device - falling back to release runtime.

'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\igd10iumd32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ncrypt.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntasn1.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\igdusc32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Graphics.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dcomp.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Media.Speech.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\RemoteNaturalLanguage.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110_win.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\propsys.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\urlmon.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winhttp.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Globalization.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\BCP47Langs.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Speech_OneCore\Common\sapi_onecore.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rsaenh.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.ApplicationModel.dll'. Cannot find or open the PDB file.
onecoreuap\enduser\nui\onecore\sapi\sapi\sharedlib\tokenfilemanager.cpp(160)\sapi_onecore.dll!09D746EC: (caller: 09D75611) ReturnHr(1) tid(16a4) 8004502D 'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Speech_OneCore\Common\SpeechServiceWinRTApi.ProxyStub.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Speech_OneCore\Engines\SR\spsrx_onecore.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\threadpoolwinrt.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\VS7Debug\pdm.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.14393.0_none_88fef4c26039fb25\comctl32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Web.dll'. Cannot find or open the PDB file.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478C1BC.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478C1BC.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478C1BC.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478C1BC.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478C1BC.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x04788EDC.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x04788A5C.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x047885E4.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478301C.
log: THREE.WebGLRenderer 87
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0478B64C.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x047898E4.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x04789A2C.
Exception thrown at 0x746096C2 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x04789E5C.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Networking.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Networking.Connectivity.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Networking.HostName.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\biwinrt.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\FirewallAPI.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\fwbase.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'ThreeJSApp-Vs2017.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mswsock.dll'. Cannot find or open the PDB file.
Exception thrown at 0x746096C2 (KernelBase.dll) in ThreeJSApp-Vs2017.exe: 0x40080201: WinRT originate error (parameters: 0x80004002, 0x0000001D, 0x047885E4).
Almost-Done commented 6 years ago

I've pushed some fixes. The protocol string was not set properly. If you still encounter the exception, can you try the following code that uses a public websocket server:

var socketUt = new WebSocket("ws://echo.websocket.org", "ui-text-protocol");

socketUt.onopen = function (evt) { console.log("Websocket Connected!"); socketUt.send("Test message"); }; socketUt.onclose = function (evt) { console.log("Websocket Closed!"); }; socketUt.onmessage = function (evt) { var message = evt.data; console.log("Message received: " + message); };

swomack commented 6 years ago

I have tried this. Still facing the same exception. I will continue analyzing and let you know the update.

Almost-Done commented 6 years ago

I believe I found the issue.:

m_webSocket->Control->ReceiveMode = MessageWebSocketReceiveMode::FullMessage;

The above line requires SDK 16299 but the HoloLens runs 14393. I commented it out for now and tested on the HoloLens to make sure it works.

swomack commented 6 years ago

Yeah, its working now. Can you please merge this code in master?

Closing this issue. I will be using WebSocket in my project. I will report if i face any issue.

And Thank you very much for providing this so quickly.