WebGL Runtime Error with UAP

I am building my app for WebGL in Unity 2020.2.6f1. I am in the process of adding UAP Accessibility and encountering errors in Firefox on load of my additive scene. If I remove the UAP stuff I don’t see the error and everything runs fine. I also don’t get errors with a similar popup scene which contains the same UAP scripts.

Of course everything runs perfectly in the editor (I hate these bugs).

I read some posts about a stripping problem which I tried removing but got the same error.

Here is the development version dump from the console. This error repeats forever.

WebGL.framework.js:3358:11
_JS_Log_Dump file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:3358
__Z19WebGLPrintfConsolev7LogTypePKcPi file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:3000314
__ZL20InternalErrorConsolePKcz file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:2999929
__Z40DebugStringToFilePostprocessedStacktraceRK21DebugStringToFileData file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:2998802
__Z17DebugStringToFileRK21DebugStringToFileData file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:2991414
__ZN9Scripting23LogExceptionFromManagedE21ScriptingExceptionPtriPKcb file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:3091016
__ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:3088932
__ZN13MonoBehaviour16CallUpdateMethodEi file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:5764707
__ZN13MonoBehaviour6UpdateEv file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:5758894
__ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:7139358
__ZN16BehaviourManager6UpdateEv file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:7141342
__ZZ23InitPlayerLoopCallbacksvEN41UpdateScriptRunBehaviourUpdateRegistrator7ForwardEv file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:6063644
__Z17ExecutePlayerLoopP22NativePlayerLoopSystem file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:5810419
__Z17ExecutePlayerLoopP22NativePlayerLoopSystem file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:5810440
__Z10PlayerLoopv file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:5806206
__ZL8MainLoopv file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:5798298
dynCall_v file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.wasm:25101146
dynCall_v file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:26819
browserIterationFunc file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:9222
runIter file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:9324
Browser_mainLoop_runner file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:9260
(Async: FrameRequestCallback)
requestAnimationFrame file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:9621
Browser_mainLoop_scheduler_rAF file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:9178
Browser_mainLoop_runner file:///C:/Projects/BreakAway/NIHCC/Dev/NIHCC_UAP/WebGL/Build/WebGL.framework.js:9264
(Async: FrameRequestCallback)

7620547–947611–WebGL Error.txt (10.6 KB)

I uploaded a build to run on Chrome and had an interesting result. The overlay game worked fine once and then failed with the above error every time after that. Even after I refreshed the browser I couldn’t get it to run again. Confused but makes me think that this isn’t a stripping error otherwise if never would have run.

Ok, I finally got this working. My guess is that I was running out of memory. When I was loading the overlay game scene I wasn’t waiting for the unload of the calling scene. This of course worked perfectly until I added all the UAP components which probably increased the memory footprint. The solution was to wait until the calling scene was unloaded (using the completed callback) and then load the overlay scene.

It would still be nice to know what this weird error msg meant. Still no word from Unity. Ugg.