My WebGL build shows this popup whenever I run it
Here’s the console log of Firefox: Successfully compiled asm.js code (loaded from cache in 559ms) ffa_webgl.js"ru - Pastebin.com
I went in an enabled the Exception logging, set it to full

Then no errors appear in the console, and the build actually works fine.
The Firefox console reads this.
Successfully compiled asm.js code (loaded from cache in 879ms) ffa_webgl.js
"run() called, but dependencies remain, so not running" ffa_webgl:34:7
"loading ffa_webgl.data from remote" fileloader.js:277:17
"pre-main prep time: 2810 ms" ffa_webgl:34:7
"PlayerConnection initialized from (debug = 0)" ffa_webgl:30:9
"PlayerConnection disabled - listening mode not supported" ffa_webgl:30:9
"Initialize engine version: 5.1.1p4 (c439df19cd24)" ffa_webgl:30:9
"Creating WebGL 1.0 context." ffa_webgl:30:9
"Renderer: Mozilla" ffa_webgl:30:9
"Vendor: Mozilla" ffa_webgl:30:9
"Version: WebGL 1.0" ffa_webgl:30:9
"GLES: 0" ffa_webgl:30:9
"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_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_texture_s3tc GL_MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_dep" ffa_webgl:30:9
"th_texture GL_MOZ_WEBGL_depth_texture" ffa_webgl:30:9
"OPENGL LOG: Creating OpenGL ES 2.0 graphics device" ffa_webgl:30:9
"Unloading 4 Unused Serialized files (Serialized files now loaded: 0)" ffa_webgl:30:9
What could be the cause of that, and would you advise using Enable Exceptions = Full in a released game?
1 Like
The cause of that will be that the exception is thrown and caught as expected, and everything works.
But, no, we don’t recommend using Enable Exceptions = Full in a released game. You can try using “Explicitly Thrown Exception only” mode, which will likely also work, and is much faster. Or turn inspections off again, and see the browser console for a stack trace of your exception and see if you can fix it.
you mean just set enable exceptions to none? Cause that throws an error.
I will try out Explicitly thrown errors only.
Enable Exceptions = excplicitly thrown errors only also works, but I am still unsure how I could get a readable stacktrace.
The only time I saw a stracktrace is when I built with Enable Exceptions = none, and it looked like this
csharp** **"Exception at: jsStackTrace@http://localhost/ffa_webgl/Development/ffa_webgl.js:1003:12 stackTrace@http://localhost/ffa_webgl/Development/ffa_webgl.js:1017:21 ___cxa_throw@http://localhost/ffa_webgl/Development/ffa_webgl.js:20:36 __ZN6il2cpp2vm9Exception5RaiseEP15Il2CppException [il2cpp::vm::Exception::Raise(Il2CppException?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1603801:2 _il2cpp_raise_exception@http://localhost/ffa_webgl/Development/ffa_webgl.js:2027469:2 __ZN9Scripting24RaiseDotNetExceptionImplEPKcS1_S1_Pi [Scripting::RaiseDotNetExceptionImpl?S(char*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1858921:2 __ZN9Scripting24RaiseSystemExceptionImplEPKcS1_Pi [Scripting::RaiseSystemExceptionImpl?S(char*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1909498:2 __ZN9Scripting18RaiseNullExceptionEPKcz [Scripting::RaiseNullException(char*, ...)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1927324:2 __Z37AsyncOperation_CUSTOM_InternalDestroyP15ScriptingObject [AsyncOperation_CUSTOM_InternalDestroy(ScriptingObject?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1887188:2 _AsyncOperation_InternalDestroy_m5617@http://localhost/ffa_webgl/Development/ffa_webgl.js:1940426:2 _AsyncOperation_Finalize_m5618@http://localhost/ffa_webgl/Development/ffa_webgl.js:1957520:2 __Z25RuntimeInvoker_Void_t2314PK10MethodInfoPvPS2_ [RuntimeInvoker_Void_t2314?2(void**, undefined?S?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1972773:2 __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP12Il2CppObject [il2cpp::vm::Runtime::Invoke?5(void**, undefined?S?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1906395:9 __Z22il2cpp_gc_run_finalizePvS_ [il2cpp_gc_run_finalize?S(void*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1887200:2 _GC_gcj_malloc@http://localhost/ffa_webgl/Development/ffa_webgl.js:1010980:6 __ZN6il2cpp2vm6Object16NewAllocSpecificEP8TypeInfo [il2cpp::vm::Object::NewAllocSpecific(TypeInfo?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1340830:9 __ZN6il2cpp2vm6Object3NewEP8TypeInfo [il2cpp::vm::Object::New(TypeInfo?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:2004577:9 _il2cpp_object_new@http://localhost/ffa_webgl/Development/ffa_webgl.js:2031168:9 __Z20scripting_object_newP14ScriptingClass [scripting_object_new(ScriptingClass?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:2028395:9 __ZN13MonoBehaviour19RebuildMonoInstanceEP14ScriptingClassP15ScriptingObjectP10MonoScript [MonoBehaviour::RebuildMonoInstance(MonoScript?***)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:687269:7 __ZN17PersistentManager21ProduceObjectInternalER14SerializedFile26SerializedObjectIdentifierii [PersistentManager::ProduceObjectInternal?6(SerializedFile?2?&)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:772219:2 __ZN17PersistentManager32CreateThreadActivationQueueEntryER14SerializedFile26SerializedObjectIdentifierib [PersistentManager::CreateThreadActivationQueueEntry?6(SerializedFile?2?&)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1138408:8 __ZN17PersistentManager25PreallocateObjectThreadedEi [PersistentManager::PreallocateObjectThreaded(int)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:859740:10 __Z38PreallocateObjectFromPersistentManagerib [PreallocateObjectFromPersistentManager(int, bool)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1827309:8 __ZN12ImmediatePtrIN5Unity9ComponentEE8TransferI18StreamedBinaryReadILb0EEEEvRT_ [undefined Transfer<void, undefined?T?&, undefined StreamedBinaryRead<0>?_?>? ImmediatePtr<Unity::Component?>()]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1209925:22 __ZN18StreamedBinaryReadILb0EE21TransferSTLStyleArrayI13dynamic_arrayINSt3__14pairIi12ImmediatePtrIN5Unity9ComponentEEEELj4EEEEvRT_17TransferMetaFlags [T?r? StreamedBinaryRead<0, undefined?2?>?n(signed char)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1099653:4 __ZN5Unity10GameObject8TransferI18StreamedBinaryReadILb0EEEEvRT_ [undefined Unity::GameObject::Transfer<void, undefined?T?&, undefined StreamedBinaryRead<0>?_?>()]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1463799:34 __ZN5Unity10GameObject23VirtualRedirectTransferER18StreamedBinaryReadILb0EE [Unity::GameObject::VirtualRedirectTransfer(undefined StreamedBinaryRead<0>?&)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1916288:2 __ZN14SerializedFile10ReadObjectEx18ObjectCreationModebPPK8TypeTreePbR6Object [SerializedFile::ReadObject?1(long long)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:534661:3 __ZN17PersistentManager26LoadFileCompletelyThreadedERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPxPiibR12LoadProgress [PersistentManager::LoadFileCompletelyThreaded?S(undefined?N?&)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:491697:7 __ZN18LoadSceneOperation7PerformEv [LoadSceneOperation::Perform()]@http://localhost/ffa_webgl/Development/ffa_webgl.js:313109:2 __ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsE [PreloadManager::UpdatePreloadingSingleStep?N()]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1231909:3 __ZN14PreloadManager16UpdatePreloadingEv [PreloadManager::UpdatePreloading()]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1486052:3 __Z10PlayerLoopbbP10IHookEvent [PlayerLoop(bool, bool, IHookEvent?*)]@http://localhost/ffa_webgl/Development/ffa_webgl.js:239537:3 __ZL8mainloopv [mainloop()]@http://localhost/ffa_webgl/Development/ffa_webgl.js:1832964:2 dynCall_v@http://localhost/ffa_webgl/Development/ffa_webgl.js:2041242:2 Runtime.dynCall@http://localhost/ffa_webgl/Development/ffa_webgl.js:224:11 Browser_mainLoop_runner/<@http://localhost/ffa_webgl/Development/ffa_webgl.js:9135:5 Browser.mainLoop.runIter@http://localhost/ffa_webgl/Development/ffa_webgl.js:10414:5 Browser_mainLoop_runner@http://localhost/ffa_webgl/Development/ffa_webgl.js:9131:3 " ffa_webgl.js:20:1 "Invoking error handler due to uncaught exception: undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch." UnityConfig.js:76:9 uncaught exception: undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch. <unknown>** **
Yes, that is the stack trace I was referring to. However, the error does not look like something in your code or something you could possibly fix. That does look like it could be a bug in Unity or IL2CPP. Could you file a bug report with a repro case? (And post the bug number here)
I was having the same problem and I narrowed it down to Color.TryParseHexValue
Apparently for some reason an exception is thrown if the Value isn’t a valid Hex Value.
Building with no-exception handling caused my app to crash as soon as Color.TryParseHexValue tried to parse a non-hex color string. Enabling exception handling didn’t cause any errors at all.
After adding a guard statement in front of the Color.TryParseHexValue call, checking for first character being a “#” this problem does not occur anymore.
Yes, I am handling everything properly if the value cannot be parsed as color… because in that case its a Texture name that I load from the resources folder.