Just updated from latest 2020 LTS to latest 2021 LTS. Had to remove WebGL 1 graphic API manually, but still getting the following error when trying to do a clean build. Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output: emcc2: error: Invalid command line option -s BINARYEN_TRAP_MODE=clamp: The wasm backend does not support a trap mode (it always clamps, in effect) UnityEditor.GenericMenu:CatchMenu (object,string[],int) Does anyone know what this means? Let me know if I need to provide more details.
I found the answer myself. I went into my project and just searched for "BINARYEN_TRAP_MODE" in all files. Turns out the they were arguments provided by projectSettings.asset Deleting it did the trick.
This did not work for me. ProjectSettings.asset does not contain a "BINARYEN_TRAP_MODE" string. Any help would be appreciated since im stuck with this issue.
We're hitting this too. Since upgrading from 2021.2.7f1 to 2021.3.5f1 our builds fail with this error. The Project settings file did indeed contain that argument. It's not visible in the Project Settings window, so it seems it's something that isn't correctly changed on upgrading projects.
Background: Emscripten 1.39.0 deprecated this flag, but it was necessary before, see also imgui release notes So you should be save by just removing it