Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGL problem - ReferenceError: webSocketInstances is not defined #209

Open
mucco opened this issue Jun 26, 2018 · 0 comments
Open

WebGL problem - ReferenceError: webSocketInstances is not defined #209

mucco opened this issue Jun 26, 2018 · 0 comments

Comments

@mucco
Copy link

mucco commented Jun 26, 2018

Hello, newbie to this framework, just downloaded it today.

I've tried setting this up on the online game I'm currently developing. I've set up the server and client correctly, I think, because when I run them locally they can talk to each other no problem. They work if I run them within the editor, and they also work if I build the server and client separately, then launch the two Windows executables.

However, when I build and launch the WebGL build of the client, things don't work anymore as I get that error. I'm not really sure what I'm doing wrong here, or if this a framework bug.

Server is set up with a single object holding a MasterServerBehaviour. Client connects to it with the following line:

Msf.Client.Connection.Connect(_addr, _port);

No Msf object is actually created by the Client. I'm not even sure it's the right approach, but from what I could understand the Msf class handles that for me so it shouldn't (?) be necessary. The game actually works with executables, so I don't think it's the problem.

Stacktrace:

SocketCreate
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:84:6
_SocketCreate
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:2646:10
_WebSocket_SocketCreate_m3609328101
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1545602:7
_U3CConnectU3Ec__Iterator0_MoveNext_m1661120380
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:974431:27
mftCall_iii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1588253:65
__ZN21InterfaceFuncInvoker0IbE6InvokeEjP11Il2CppClassP12Il2CppObject
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:974805:9
_SetupCoroutine_InvokeMoveNext_m3199342729
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1232087:21
mftCall_viiii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1536569:3
_Z54RuntimeInvoker_Void_t1185182177_RuntimeObject_IntPtr_tPFvvEPK10MethodInfoPvPS4
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1558950:2
asm._Z54RuntimeInvoker_Void_t1185182177_RuntimeObject_IntPtr_tPFvvEPK10MethodInfoPvPS4
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1999762:10
ftCall_iiiii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:4874:10
invoke_iiiii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:4861:11
__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1217490:8
_il2cpp_runtime_invoke
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1526867:9
asm._il2cpp_runtime_invoke
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1971424:10
_il2cpp_runtime_invoke
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:11898:9
__Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2675679:8
__ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2006481:7
__ZN9Coroutine14InvokeMoveNextEP21ScriptingExceptionPtr
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2267700:2
__ZN9Coroutine3RunEPb
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2360159:7
__ZN13MonoBehaviour24TryCreateAndRunCoroutineE18ScriptingObjectPtr18ScriptingMethodPtrPP9Coroutine
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:1330623:3
__ZN13MonoBehaviour22StartCoroutineManaged2E18ScriptingObjectPtr
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2140579:3
_Z49MonoBehaviour_CUSTOM_StartCoroutine_Auto_InternalP12Il2CppObjectS0
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:1944492:9
UnityLoader["87d2996672a8b2209c42281223f2d7b4"]/asm._Z49MonoBehaviour_CUSTOM_StartCoroutine_Auto_InternalP12Il2CppObjectS0
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:158515:9
ftCall_iii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:5775:10
mftCall_iii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1588254:9
_MonoBehaviour_StartCoroutine_Auto_Internal_m2421197418
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1531768:9
_MonoBehaviour_StartCoroutine_m3411253000
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1644281:9
_ClientSocketWs_Connect_m4259240476
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:754656:2
_ClientSocketWs_Connect_m3790879019
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1639193:2
mftCall_iiiii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1534174:64
__ZN21InterfaceFuncInvoker2IP12Il2CppObjectP8String_tiE6InvokeEjP11Il2CppClassS1_S3_i
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:947706:9
_OnlineGameClient_Init_m1071683404
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:634803:3
_OnlineGameClient_Start_m1309906042
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1694236:2
mftCall_vii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1595665:3
_Z31RuntimeInvoker_Void_t1185182177PFvvEPK10MethodInfoPvPS4
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1639311:2
asm._Z31RuntimeInvoker_Void_t1185182177PFvvEPK10MethodInfoPvPS4
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1890526:10
ftCall_iiiii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:4874:10
invoke_iiiii
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:4861:11
__ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1217490:8
_il2cpp_runtime_invoke
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1526867:9
asm._il2cpp_runtime_invoke
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d%20line%20795%20>%20eval:1971424:10
_il2cpp_runtime_invoke
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:11898:9
__Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2675679:8
__ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2006481:7
__ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtrP21ScriptingExceptionPtr
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:634906:9
__ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtr
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:1971075:7
__ZN13MonoBehaviour16DelayedStartCallEP6ObjectPv
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2369114:2
mftCall_iii
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2833107:64
__ZN18DelayedCallManager6UpdateEi
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:1073785:33
mftCall_vii
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2835573:3
__ZZ23InitPlayerLoopCallbacksvEN52FixedUpdateScriptRunDelayedFixedFrameRateRegistrator7ForwardEv
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2676678:2
mftCall_v
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2873413:3
__Z10PlayerLoopv
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:797510:15
__ZL8MainLoopv
blob:null/4f2def79-1ffd-4095-ae77-1a4d1b43ecba:2096665:3
UnityLoader["87d2996672a8b2209c42281223f2d7b4"]/asm.__ZL8MainLoopv
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:212503:9
ftCall_v
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:30926:9
browserIterationFunc
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:11762:4
runIter
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:11160:5
Browser_mainLoop_runner
blob:null/57d89790-6718-40b1-8b18-b23989d59f3d:11800:3

I downloaded this library precisely because I need a framework that makes executable AND WebGL builds work seamlessly. Is there a solution to this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant