heroiclabs / nakama-unity

Unity client for Nakama server.
https://heroiclabs.com/docs/unity-client-guide
Other
413 stars 75 forks source link

WebGL+Android+Docker? #63

Closed j2l closed 5 years ago

j2l commented 6 years ago

Hello, Thank you very much for this gem!

I installed Nakama as a docker server on the LAN (Mac because recent cassandra image is not working on Windows) and I try to access it from Android and WebGL (Chrome) client.

I tried UserChat example scene (and had to change it a little bit: player 1 registration and login was not working) but the WebGL client (using only Player2, Player1 is Android) ends with:

Uncaught TypeError: Cannot read property 'send' of undefined at _SendData (blob:http://localhost:63670/3b28ccc2-6816-417a-8188-adaa531e2bd6:9501:9) at _NTransportJavascript_SendData_m3909476563 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1893830:2) at _NTransportJavascript_SendAsync_m1688919634 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1595268:2) at ZN23InterfaceActionInvoker3IP22ByteU5BU5D_t4116647657bP19Action_1_t269755560E6InvokeEjP11Il2CppClassP12Il2CppObjectS1bS3 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1555785:47) at _NClient_Send_TisRuntimeObject_m2023337619_gshared (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:816809:2) at ZN30GenericInterfaceActionInvoker3IP12Il2CppObjectP20Action_1_t1316537604P20Action_1_t3924635697E6InvokeEPK10MethodInfoS1_S1_S3S5 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1493484:47) at _UserChat_Player1JoinTopic_m3795084677 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1435962:2) at _UnityAction_Invoke_m893829196 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1324099:32) at _InvokableCall_Invoke_m1437964737 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1946641:80) at _UnityEvent_Invoke_m3065672636 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1435345:10) at _Button_Press_m3424674057 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1731030:4) at _Button_OnPointerClick_m1993983012 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1994884:36) at ZN23InterfaceActionInvoker1IP28PointerEventDatat3807901092E6InvokeEjP11Il2CppClassP12Il2CppObjectS1 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1591932:45) at _ExecuteEvents_Execute_m3613826831 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1683822:2) at _EventFunction_1_Invoke_m2429482587_gshared (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:956713:34) at dynCall_viiii (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1992488:33) at invoke_viiii (blob:http://localhost:63670/3b28ccc2-6816-417a-8188-adaa531e2bd6:16527:26) at _ExecuteEvents_Execute_TisRuntimeObject_m1952955951_gshared (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:592735:6) at _StandaloneInputModule_ProcessMousePress_m1928058611 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:510966:4) at _StandaloneInputModule_ProcessMouseEvent_m1568640827 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:990266:2) at _StandaloneInputModule_Process_m309156323 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1560295:93) at _EventSystem_Update_m1662072334 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:943079:53) at __Z31RuntimeInvoker_Voidt1185182177PFvvEPK10MethodInfoPvPS4 (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1983288:31) at dynCall_iiiii (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1985198:40) at invoke_iiiii (blob:http://localhost:63670/3b28ccc2-6816-417a-8188-adaa531e2bd6:16319:33) at ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1631082:8) at _il2cpp_runtime_invoke (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1884245:9) at Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1738067:8) at ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1219894:7) at ZN13MonoBehaviour16CallUpdateMethodEi (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1053069:4) at ZN13MonoBehaviour6UpdateEv (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:2039040:2) at ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:847642:71) at ZN16BehaviourManager6UpdateEv (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1727076:2) at ZZ23InitPlayerLoopCallbacksvEN41UpdateScriptRunBehaviourUpdateRegistrator7ForwardEv (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1651759:67) at Z17ExecutePlayerLoopP22NativePlayerLoopSystem (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1114598:41) at Z17ExecutePlayerLoopP22NativePlayerLoopSystem (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1114569:7) at Z10PlayerLoopv (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1224403:2) at __ZL8MainLoopv (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:1028929:3) at dynCall_v (blob:http://localhost:63670/cd190a70-6b66-4420-bb17-9b1163e2e090:2054363:29) at browserIterationFunc (blob:http://localhost:63670/3b28ccc2-6816-417a-8188-adaa531e2bd6:2783:23) at Object.runIter (blob:http://localhost:63670/3b28ccc2-6816-417a-8188-adaa531e2bd6:2885:5) at Browser_mainLoop_runner (blob:http://localhost:63670/3b28ccc2-6816-417a-8188-adaa531e2bd6:2821:20)

novabyte commented 5 years ago

The current client did not support WebGL build targets. This has been updated and will be part of the next client SDK release.

andrisole92 commented 4 years ago

Can't run on WebGL. Gives me an error:

exception thrown: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking")

novabyte commented 4 years ago

@andrisole92 You'll need to provide real information for us to be able to help: