Uploading webgl version of the game error

Hi,

So I’ve been trying to upload a playable in browser version of our game and I keep coming across this particular error.
The game loads up fine, the title screen and level select screen work, however as soon as I try entering the main gameplay level, this error pops up:

I have been trying to find the solution, and I looked up Emscripten and it seems really complex to my understanding.
(It is a unity 2D game and works fine on desktop (macos or windows) builds)

A bit late, but I have found that this can happen from a null reference occuring in the build. When building for web, you really want to try and get rid of every single error thats occuring, even the seemingly okay ones.