How to run a WebGL build of the TrueSync package?

This is the process I used to attempt to create a WebGL build.

Initially I had two errors as follows:
AddComponent with MonoBehaviour is not allowed. Create a class that derives from MonoBehaviour and add it instead.
UnityEngine.GameObject:AddComponent()
ExitGames.Client.Photon.SocketWebTcp:Connect() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/SocketWebTcp.cs:79)
ExitGames.Client.Photon.TPeer:Connect(String, String)
ExitGames.Client.Photon.PhotonPeer:Connect(String, String)
NetworkingPeer:ConnectToNameServer() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:619)
PhotonNetwork:ConnectToBestCloudServer(String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1470)
PhotonNetwork:ConnectUsingSettings(String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1281)
Menu:MainPanel_MultilayerBtn() (at Assets/Demo/Menu.cs:119)
Menu:MainPanel_SetLobby(String) (at Assets/Demo/Menu.cs:112)
UnityEngine.EventSystems.EventSystem:Update()

NullReferenceException: Object reference not set to an instance of an object
ExitGames.Client.Photon.SocketWebTcp.Connect () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/SocketWebTcp.cs:85)
ExitGames.Client.Photon.TPeer.Connect (System.String serverAddress, System.String appID)
ExitGames.Client.Photon.PhotonPeer.Connect (System.String serverAddress, System.String applicationName)
NetworkingPeer.ConnectToNameServer () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:619)
PhotonNetwork.ConnectToBestCloudServer (System.String gameVersion) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1470)
PhotonNetwork.ConnectUsingSettings (System.String gameVersion) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1281)
Menu.MainPanel_MultilayerBtn () (at Assets/Demo/Menu.cs:119)
Menu.MainPanel_SetLobby (System.String config) (at Assets/Demo/Menu.cs:112)
UnityEngine.Events.InvokableCall`1[System.String].Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:188)
UnityEngine.Events.CachedInvokableCall`1[System.String].Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:306)
UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:634)
UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:769)
UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:53)
UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44)
UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:52)
UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:269)
UnityEngine.EventSystems.EventSystem:Update()

I resolved these errors by changing line 79 in SocketWebTcp.cs from:
MonoBehaviour mb = websocketConnectionObject.AddComponent<MonoBehaviour>();
to:
MonoBehaviour mb = websocketConnectionObject.AddComponent<MonoBehaviourExt>();
and adding this line at the bottom of the file:
internal class MonoBehaviourExt : MonoBehaviour { }
Then I received more errors after trying to run the TrueSync boxes demo in the Unity Editor, which is set to build to WebGL. After entering a nickname I click on "Demo Boxes" to get these errors:
Operation failed: OperationResponse 230: ReturnCode: 32767 (Empty application id). Parameters: {} Server: NameServer
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1420)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)

The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account.
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1451)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)

I resolved these errors by setting the PhotonServerSettings configuration to:

Comments

  • ScriptGeek
    edited December 2016

    Hosting: Photon Cloud
    Region: Us
    AppId: 'Insert AppId from the Photon Dashboard'
    Protocol: Udp (Didn't need to change it)

    A message appears below this saying:
    WebGL always use Secure WebSockets as protocol. This setting gets ignores in current export.

    I suppose the message just means WebGL will override the Protocol setting and not the hosting and region settings.

    With those errors out of the way, I run the program again, enter nickname, click on "Demo Boxes", wait for it to connect, then click on "New Match", wait for it to create a new match.

    Console provides this info up to this point:

    OnLevelWasLoaded was found on PhotonHandler
    This message has been deprecated and will be removed in a later version of Unity.
    Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed

    WebGL only supports WebSocket protocol. Overriding PhotonServerSettings.
    UnityEngine.Debug:Log(Object)
    PhotonNetwork:.cctor() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1126)

    Using SocketWebTcp
    UnityEngine.Debug:Log(Object)
    NetworkingPeer:.ctor(String, ConnectionProtocol) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:456)
    PhotonNetwork:.cctor() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1131)

    WebGL only supports WebSocket protocol. Overriding PhotonServerSettings.
    UnityEngine.Debug:Log(Object)
    PhotonNetwork:SwitchToProtocol(ConnectionProtocol) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1172)
    PhotonNetwork:ConnectUsingSettings(String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1252)
    Menu:MainPanel_MultilayerBtn() (at Assets/Demo/Menu.cs:119)
    Menu:MainPanel_SetLobby(String) (at Assets/Demo/Menu.cs:112)
    UnityEngine.EventSystems.EventSystem:Update()

    Skipping EstablishEncryption. Protocol is secure.
    UnityEngine.Debug:Log(Object)
    NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1845)
    ExitGames.Client.Photon.PeerBase:InitCallback()
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)

    Skipping EstablishEncryption. Protocol is secure.
    UnityEngine.Debug:Log(Object)
    NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1845)
    ExitGames.Client.Photon.PeerBase:InitCallback()
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)

    Skipping EstablishEncryption. Protocol is secure.
    UnityEngine.Debug:Log(Object)
    NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1845)
    ExitGames.Client.Photon.PeerBase:InitCallback()
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)
  • Then I click on "Start Match" and it runs fine, at least in the Unity Editor. So I create an actual WebGL build to run in my browser, with the Development Build and try the same steps: Enter Nickname, Click "Demo Boxes", Click "New Match", Click "Start Match", and then I get an error. Here is the output from the JavaScript console in FireFox:
    Successfully compiled asm.js code (loaded from cache in 771ms) ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e
    run() called, but dependencies remain, so not running UnityLoader.js:3444:2
    pre-main prep time: 91 ms UnityLoader.js:3444:2
    PlayerConnection initialized from (debug = 0) UnityLoader.js:3440:3
    PlayerConnection disabled - listening mode not supported UnityLoader.js:3440:3
    Initialize engine version: 5.4.2f2 (b7e030c65c9b) UnityLoader.js:3440:3
    Creating WebGL 1.0 context. UnityLoader.js:3440:3
    Renderer: Mozilla UnityLoader.js:3440:3
    Vendor: Mozilla UnityLoader.js:3440:3
    Version: WebGL 1.0 UnityLoader.js:3440:3
    GLES: 0 UnityLoader.js:3440:3
    ANGLE_instanced_arrays GL_ANGLE_instanced_arrays EXT_blend_minmax GL_EXT_blend_minmax EXT_color_buffer_half_float GL_EXT_color_buffer_half_float EXT_frag_depth GL_EXT_frag_depth EXT_shader_texture_lod GL_EXT_shader_texture_lod EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic OES_element_index_uint GL_OES_element_index_uint OES_standard_derivatives GL_OES_standard_derivatives OES_texture_float GL_OES_texture_float OES_texture_float_linear GL_OES_texture_float_linear OES_texture_half_float GL_OES_texture_half_float OES_texture_half_float_linear GL_OES_texture_half_float_linear OES_vertex_array_object GL_OES_vertex_array_object WEBGL_color_buffer_float GL_WEBGL_color_buffer_float WEBGL_compressed_texture_etc1 GL_WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_depth_texture GL_WEBGL_depth_texture WEBGL_draw_buffers GL_WEBGL_draw_buffers WEBGL_lose_context GL_WEBGL_lose_context MOZ_WEBGL_lose_context GL_MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_ UnityLoader.js:3440:3
    texture_s3tc GL_MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture GL_MOZ_WEBGL_depth_texture UnityLoader.js:3440:3
    OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level ; Context handle 1 UnityLoader.js:3440:3
    OnLevelWasLoaded was found on PhotonHandler
    This message has been deprecated and will be removed in a later version of Unity.
    Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed

    ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:8849:3
    UnloadTime: 0.615000 ms UnityLoader.js:3440:3
    WebGL only supports WebSocket protocol. Overriding PhotonServerSettings.

    ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:8853:3
    Using SocketWebTcp

    ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:8853:3
    WebGL only supports WebSocket protocol. Overriding PhotonServerSettings.

    ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:8853:3
    Skipping EstablishEncryption. Protocol is secure.

    ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:8853:3
    Skipping EstablishEncryption. Protocol is secure.
    ...
  • ScriptGeek
    edited December 2016
    ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:8853:3
    UnloadTime: 3.170000 ms UnityLoader.js:3440:3
    missing function: pthread_create UnityLoader.js:3444:2
    -1 UnityLoader.js:3440:3
    -1 UnityLoader.js:3444:2
    warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling UnityLoader.js:3444:2
    Invoking error handler due to
    uncaught exception: abort(-1) at jsStackTrace@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:1056:12
    stackTrace@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:1070:21
    abort@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:2600444:43
    _pthread_create@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:14244:2
    __ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2_ [il2cpp::os::ThreadImpl::Run(undefined?F?*, void, void*)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2241649:1
    __ZN6il2cpp2os6Thread3RunEPFvPvES2_ [il2cpp::os::Thread::Run(undefined?F?*, void, void*)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2345687:1
    dynCall_iiii@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2528939:1
    invoke_iiii@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:16922:10
    __ZN6il2cpp6icalls8mscorlib6System9Threading6Thread15Thread_internalEP12Il2CppThreadP14Il2CppDelegate [il2cpp::icalls::mscorlib::System::Threading::Thread::Thread_internal(Il2CppDelegate?**)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1334786:1
    _Thread_Start_m1419497481@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1730610:1
    _ThreadManager_Initialize_m1081183426@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1542023:1
    _ThreadManager_get_Instance_m1424893153@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1966837:1
    _CollisionSystem__ctor_m1665965544@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2177752:1
    _CollisionSystemPersistentSAP__ctor_m1861131021@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1552845:1
    _PhysicsWorldManager_Init_m3339843778@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1088061:1
    __ZN23InterfaceActionInvoker06InvokeEjP11Il2CppClassPv [InterfaceActionInvoker0::Invoke(unsigned int, void**)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2342566:1
    _TrueSyncManager_Awake_m2468621823@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1788297:1
    __Z31RuntimeInvoker_Void_t1841601450PK10MethodInfoPvPS2_ [RuntimeInvoker_Void_t1841601450?2(void**, undefined?S?*)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2511214:1
    dynCall_iiii@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2528939:1
    invoke_iiii@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:16922:10
    __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke?5(void**, undefined?S?*)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2122132:1
    _il2cpp_runtime_invoke@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2439384:1
    __Z23scripting_method_invoke21ScriptingMethodIl2CppP15ScriptingObjectR18ScriptingArgumentsPP18ScriptingExceptionb [scripting_method_invoke?2()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2252038:1
    __ZN19ScriptingInvocation6InvokeEPP18ScriptingExceptionb [ScriptingInvocation::Invoke(bool**)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1683144:1
    __ZN19ScriptingInvocation6InvokeEPP18ScriptingException [ScriptingInvocation::Invoke(ScriptingException?**)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2512232:1
    __ZN25ScriptingInvocationNoArgs13InvokeCheckedEv [ScriptingInvocationNoArgs::InvokeChecked()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2331389:1
    __ZN13MonoBehaviour9CallAwakeEv [MonoBehaviour::CallAwake()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1679134:1
    __ZN13MonoBehaviour12AddToManagerEv [MonoBehaviour::AddToManager()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1563280:1
    __ZN9Behaviour13AwakeFromLoadE17AwakeFromLoadMode [Behaviour::AwakeFromLoad?1()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2200750:1
    __ZN13MonoBehaviour13AwakeFromLoadE17AwakeFromLoadMode [MonoBehaviour::AwakeFromLoad?1()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1155529:1
    __ZN18AwakeFromLoadQueue28InvokePersistentManagerAwakeEPNS_4ItemEj17AwakeFromLoadMode [AwakeFromLoadQueue::InvokePersistentManagerAwake?1(AwakeFromLoadQueue::Item*, unsigned int)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1550248:1
    __ZN18AwakeFromLoadQueue30PersistentManagerAwakeFromLoadEv [AwakeFromLoadQueue::PersistentManagerAwakeFromLoad()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2201502:1
    __ZN18LoadSceneOperation21CompleteAwakeSequenceEv [LoadSceneOperation::CompleteAwakeSequence()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1794865:1
    __ZN18LoadSceneOperation25PlayerLoadSceneFromThreadEv [LoadSceneOperation::PlayerLoadSceneFromThread()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:739066:1
    __ZN18LoadSceneOperation19IntegrateMainThreadEv [LoadSceneOperation::IntegrateMainThread()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1588592:1
    __ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsEi [PreloadManager::UpdatePreloadingSingleStep?N()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1684751:1
    __ZN14PreloadManager16UpdatePreloadingEv [PreloadManager::UpdatePreloading()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1529971:1
    __Z10PlayerLoopbbP10IHookEvent [PlayerLoop(bool, bool, IHookEvent?*)]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:472541:1
    __ZL8MainLoopv [MainLoop()]@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:1733545:1
    dynCall_v@blob:null/44480ccd-b290-4038-804e-bb362c2000e0:2594396:1
    Runtime.dynCall@blob:null/ae54e2fb-aeaf-4cd1-b61c-cd36ee30f73e:276:11
    Browser_mainLoop_runner/

    I am running Windows 10 Pro Build 14393, Unity 5.4.2f2 Personal, Photon TrueSync 1.0.6, and FireFox 50.1.0. I've been trying to figure out how to get this to run and I've tried a lot of things to get this far. Any help would be greatly appreciated.
  • I'm able to get the "Demo Boxes" example working in the PUN Demo Hub package via a WebGL build in the browser, but it's not running the lockstepping feature of TrueSync, so it's not a solution for me. Maybe this information helps with troubleshooting the issue, though.
  • These errors are related to PUN, and not TrueSync itself, which is used underneath as transport layer. I'm contacting PUN support to take a look at the error, but I'm not sure if they'll be able to answer before Jan 2nd.

    Anyway, thanks for the detailed question.
  • Thanks for your quick response and your awesome support for this amazing asset, it's very much sincerely appreciated.
  • @erickpassos Just checking up, is there an update on this yet?
  • @erickpassos is it possible to at least have an ETA on a fix please?
  • Hi,

    Yes, I could reproduce some issues, I can create a build but then the player seems to not be instantatiated.

    Is it what you experience too or are you stuck

    I'll investigate and get back to you early next or tomorrow if I found a fix for this.

    Bye,

    Jean
  • Hi,

    so basically, it seems TrueSync is not compatible with WebGL because it's multi threaded, and on WebGL, it's not possible yet to have multiple thread.

    Though, I have a very different experience, I don't get any errors other than the failure to create a thread.

    I think this needs a confirmation from the authors of Truesync but basically, Pun is not linked to the issue I am experiencing currently.

    Can you confirm that you are using the latest version of TrueSync as well?


    Bye,

    Jean
  • Hi @ScriptGeek and @Kradirhamik, we also saw some errors when building to WebGL, we are working on that issue and doing some tests with different versions of Unity to check it.
  • Hi @JeffersonHenrique ,

    Thanks for your kind replies, we really appreciate it.

    Please see the errors we're getting currently here:
    https://goo.gl/mlOVST
    https://goo.gl/mfTwKP

    Does this help?


    Best,
    Ivo
  • Hello @Kradirhamik, thanks, it helps to understand better the errors, we have tasks to build and check whats going on internally.
  • Hey @JeffersonHenrique any ETA on a fix for this issue? It's a blocker for us.
  • Hi @Kradirhamik, we are trying to solve it, we are getting an expection hard to debug as you may noticed in your logs. I think next week we can say something about it
  • Hi @Kradirhamik, I have some suspicions that I am still investigating. Can you please reply me with your environment? Like if you are using windows/linux/mac, Unity's version...
  • Hi @JeffersonHenrique my environment is Windows 10 and my Unity version is 5.5.1f1. Let me know if you need something more, we need this issue fixed urgently.
  • Thanks @Kradirhamik, we also have rush to figure out what is going on.
  • Hi @Kradirhamik, we could build/run well a code using Mac and same version of Unity as you used, we faced problems in Windows but we couldn't understand why.
  • @JeffersonHenrique so a fix is on the way? :smiley:
  • Sadly not yet @Kradirhamik, we have problems building with windows, but it is not helpful stacktrace, a suspicion is something related to a translation to javascript.
  • @JeffersonHenrique okay, please keep us updated. We'll keep waiting. Thanks!
  • @JeffersonHenrique
    @jeanfabre
    @erickpassos

    I found this link which explains the possible issue: https://docs.unity3d.com/Manual/webgl-networking.html

    You most likely already know about this info, but just in case this may help find a solution (I pulled this from that link above):

    Using Web Sockets or WebRTC from JavaScript

    As written above, direct access to IP Sockets is not possible in WebGL. However, if you need networking capabilities beyond the WWW class, it is possible to use Web Sockets or WebRTC, both networking protocols supported by browsers. Web Sockets has wider support, but WebRTC allows p2p connections between browsers and unreliable connections. Neither of these protocols are exposed through built-in APIs in Unity yet, but it is possible to use a JavaScript plugin to implement this. A sample of a plugin which implements WebSocket networking in Unity WebGL can be found on AssetStore.

  • Thanks @ScriptGeek, I will check it.
  • It finally works!

    I tested with the latest version of TrueSync on 5.6 and webgl builds and run fine :)

    Bye,

    Jean