Webgl broken on 2019.x

It looks like Unity 2019.x webgl has a pretty bad regression:

This regression was reported in June: Unity Issue Tracker - [WebGL] Building fails with Emscripten's Python failure

Because of this, playfab does not work in webgl anymore as you can see here:
https://community.playfab.com/questions/33353/playfab-unity-2019-webgl-with-development-build.html

Can you guys please help?

A proper fix is being worked on. Meanwhile, there is a potential workaround that one can add an Editor script to the build that executes

PlayerSettings.WebGL.emscriptenArgs = “-s ERROR_ON_UNDEFINED_SYMBOLS=0”;

before running the build.

Where do you add this “PlayerSettings.WebGL.emscriptenArgs” line?

It should be added to an Editor script (Editor Scripting - Unity Learn). Try the attached file for example. Place the file in directory UnityProject/Assets/Editor/buildWebGL.cs, then edit the script to configure the “levelsToPack” variable. Then use one of the newly appeared HTML5 Export menu items to build.

Note the line 69 in that script that adds the -s ERROR_ON_UNDEFINED_SYMBOLS=0 directive.

5037692–494033–buildWebGL.cs (6.96 KB)