WebGL exception problem

Hi,

I’m running into a problem with a WebGL build. When I set Enable Exceptions to Explicitly Thrown Exceptions Only the build runs without any problems. When I set it to None however (and build a development build) the following stacktrace is logged to the console:

Exception at:
Error
    at jsStackTrace (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:966:12)
    at stackTrace (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:980:11)
    at blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:346:36
    at __ZN6il2cpp2vm9Exception5RaiseEP15Il2CppExceptionP19Il2CppSequencePointP10MethodInfo [il2cpp::vm::Exception::Raise(Il2CppException*, Il2CppSequencePoint*, MethodInfo*)] (wasm-function[64614]:32)
    at __Z30il2cpp_codegen_raise_exceptionP11Exception_tP19Il2CppSequencePointP10MethodInfo [il2cpp_codegen_raise_exception(Exception_t*, Il2CppSequencePoint*, MethodInfo*)] (wasm-function[23972]:7)
    at _FileStream__ctor_m3151488352 (wasm-function[48168]:1184)
    at _FileStream__ctor_m2889718780 (wasm-function[48181]:20)
    at _File_OpenRead_m2936789020 (wasm-function[48182]:60)
    at _TimeZoneInfo_FindSystemTimeZoneByFileName_m2720246141 (wasm-function[46402]:44)
    at _TimeZoneInfo_CreateLocal_m701291163 (wasm-function[46399]:566)
    at _TimeZoneInfo_get_Local_m2495540097 (wasm-function[46398]:57)
    at _TimeZoneInfo_GetDateTimeNowUtcOffsetFromUtc_m3893949862 (wasm-function[46449]:51)
    at _DateTime_get_Now_m1277138875 (wasm-function[53536]:194)
    at _GUI__cctor_m3051457990 (wasm-function[59067]:379)
    at __Z31RuntimeInvoker_Void_t1185182177PFvvEPK10MethodInfoPvPS4_ [RuntimeInvoker_Void_t1185182177(void (*)(), MethodInfo const*, void*, void**)] (wasm-function[22399]:17)
    at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)] (wasm-function[64007]:94)
    at __ZN6il2cpp2vm7Runtime9ClassInitEP11Il2CppClass [il2cpp::vm::Runtime::ClassInit(Il2CppClass*)] (wasm-function[64009]:260)
    at _GUIUtility_ResetGlobalState_m2426294461 (wasm-function[59469]:66)
    at _GUIUtility_BeginGUI_m1428629348 (wasm-function[59468]:72)
    at __Z85RuntimeInvoker_Void_t1185182177_Int32_t2950945753_Int32_t2950945753_Int32_t2950945753PFvvEPK10MethodInfoPvPS4_ [RuntimeInvoker_Void_t1185182177_Int32_t2950945753_Int32_t2950945753_Int32_t2950945753(void (*)(), MethodInfo const*, void*, void**)] (wasm-function[22433]:40)
    at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)] (wasm-function[64007]:94)
    at _il2cpp_runtime_invoke (wasm-function[64392]:36)
    at __Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb [scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)] (wasm-function[3682]:64)
    at __ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb [ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)] (wasm-function[3680]:258)
    at __ZN19ScriptingInvocation6InvokeIvEET_P21ScriptingExceptionPtrb [void ScriptingInvocation::Invoke<void>(ScriptingExceptionPtr*, bool)] (wasm-function[4231]:7)
    at __ZN21IMGUIScriptingClasses8BeginGUIEiiiP21ScriptingExceptionPtr [IMGUIScriptingClasses::BeginGUI(int, int, int, ScriptingExceptionPtr*)] (wasm-function[12695]:163)
    at __Z18MonoBehaviourDoGUIiR14ObjectGUIStateN13MonoBehaviour13GUILayoutTypeEi18ScriptingMethodPtr4PPtrIS1_E [MonoBehaviourDoGUI(int, ObjectGUIState&, MonoBehaviour::GUILayoutType, int, ScriptingMethodPtr, PPtr<MonoBehaviour>)] (wasm-function[12811]:427)
    at __ZN11IMGUIModule18MonoBehaviourDoGUIEiR14ObjectGUIStateN13MonoBehaviour13GUILayoutTypeEi18ScriptingMethodPtr4PPtrIS2_E [IMGUIModule::MonoBehaviourDoGUI(int, ObjectGUIState&, MonoBehaviour::GUILayoutType, int, ScriptingMethodPtr, PPtr<MonoBehaviour>)] (wasm-function[12822]:93)
    at __ZN13MonoBehaviour5DoGUIENS_13GUILayoutTypeEii [MonoBehaviour::smile:oGUI(MonoBehaviour::GUILayoutType, int, int)] (wasm-function[8593]:509)
    at __ZL18MonoBehaviourDoGUIPvN13MonoBehaviour13GUILayoutTypeEii [MonoBehaviourDoGUI(void*, MonoBehaviour::GUILayoutType, int, int)] (wasm-function[12768]:27)
    at __ZNK10GUIManager16GUIObjectWrapper5DoGUIEN13MonoBehaviour13GUILayoutTypeEii [GUIManager::GUIObjectWrapper::smile:oGUI(MonoBehaviour::GUILayoutType, int, int) const] (wasm-function[12772]:328)
    at __ZN10GUIManager10DoGUIEventER10InputEventb [GUIManager::smile:oGUIEvent(InputEvent&, bool)] (wasm-function[12766]:1594)
    at __ZZN10GUIManager14InitGUIManagerEvEN38UIEventsIMGUIRenderOverlaysRegistrator7ForwardEi [GUIManager::InitGUIManager()::UIEventsIMGUIRenderOverlaysRegistrator::Forward(int)] (wasm-function[12759]:121)
    at __Z12PlayerRenderb [PlayerRender(bool)] (wasm-function[9554]:732)
    at __ZZ23InitPlayerLoopCallbacksvEN45PostLateUpdateFinishFrameRenderingRegistrator7ForwardEv [InitPlayerLoopCallbacks()::PostLateUpdateFinishFrameRenderingRegistrator::Forward()] (wasm-function[9478]:53)
    at __Z17ExecutePlayerLoopP22NativePlayerLoopSystem [ExecutePlayerLoop(NativePlayerLoopSystem*)] (wasm-function[8738]:163)
    at __Z17ExecutePlayerLoopP22NativePlayerLoopSystem [ExecutePlayerLoop(NativePlayerLoopSystem*)] (wasm-function[8738]:184)
    at __Z10PlayerLoopv [PlayerLoop()] (wasm-function[8734]:462)
    at __ZL8MainLoopv [MainLoop()] (wasm-function[8721]:142)
    at dynCall_v (wasm-function[66861]:12)
    at Object.dynCall_v (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:26682:36)
    at browserIterationFunc (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:7024:23)
    at Object.runIter (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:7126:5)
    at Browser_mainLoop_runner (blob:http://localhost:3000/60d9240e-e515-4135-9142-d70da2c484c5:7062:20)
UnityLoader.js:417 Invoking error handler due to
Uncaught undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.

Nowhere in this stacktrace can I find a call that is made from my own code. Can anyone point me in the right direction? Also, I’ve read in the docs that enabling full exceptions has an impact on performance. Is there any benefit in using No exceptions vs. Only explicit?

(Unity 2018.2.16f1)

Maybe same as for me…
Try to remove any image effects from the camera if you have.

Tried it but unfortunately it didn’t fix it for me…

Problem still exists after updating to 2018.3

What were you doing in your game when the error happens?

Ok, so I finally figured out what caused the problem. It’s this bug:

Doesn’t happen on Chrome anymore. But Edge and Safari still have it.
When I had my exception level on Explicity Thrown, the game kept running but froze for something like 10 seconds.

So to anyone out there having this issue, look in your code if you’re accessing System.DateTime.Now anywhere!

I’ve been googling since last night and this seems like the closest to my problem as well. I’m having an issue with 2019 Unity, and MFPS exporting to Webgl. First part of my issue was an addon from them i’ve been able to tweak into place but now i’m getting Exception error tossed at me as well. I turned the exception error “thingy” (lol) to None, but that didnt work. I’m gonna attempt the Explicity Thrown here next. But myself its called a JS I have no idea where it is. I’m gonna check the image effects, cuz i never thought of checking that (i do know mobile and webgl get weird issues when trying to do certain things like video for example) so thanks for suggesting it.