WebGL Throwing "Memory Out of Bounds"

I’ll preface this by saying that this project works flawlessly both in-editor and as a standalone. However, once I run a WebGL build (linear color space, so WebGL 2.0), I get a series of errors that prevent the game from even loading.

After hours of rebuilding the WebGL build and watching console output like a hawk, I’ve finally discovered the specific lines of code that are throwing the error (this is the very first function that runs after the splash screens) - see below for details.

private IEnumerator LoadLevelWithAwaitAsync(string levelName)
    {
        sceneLoaded = false;
        loadBar.value = 0;
        cardAnimator.StopPlayback();
        animator.SetTrigger("FadeOut");
        // Error throws at this yield, if I comment it out...
        yield return new WaitForSeconds(1.0f);
        AsyncOperation op = SceneManager.LoadSceneAsync(levelName);
        while (!op.isDone)
        {
            loadBar.value = Mathf.Clamp01(op.progress / 0.9f);
            // Then the error throws at THIS yield ... sensing a pattern?
            yield return null;
        }
        while(!sceneLoaded)
        {
            yield return null;
        }
        ResetParameters();
        animator.SetTrigger("FadeIn");
        yield return new WaitForSeconds(1.0f);
        cardAnimator.StartPlayback();
        nonSettingsRemover.SetSceneName(levelName);
    }

The actual error that’s being thrown is as follows:

The alert text that pops up is as follows

I’m not sure this part is relevant, since I just assume this is saying the unity script is unable to progress, but immediately after closing the alert box, I get

This does suggest like some bug. Any chance you’d be able to reduce the issue to a minimal test case, and report it?

I was throwing my hands up in frustration over this, it seemed like everything I did caused a new set of errors to happen.

Well, as it turns out, the problem was the Unity Localization package. After trying a thousand different configurations with a super stripped-down version of the game… I took a full copy of the feature-complete version of the game, removed the Localization package and fixed the compilation errors that came with that, and it just works now.

That sounds curious. Is that one of Unity developed packages, or authored by someone else? Maybe you can throw a line to the developer of the package to let them know?