There is an [issue](https://github.com/emscripten-core/emscripten/commit/12b814ac5f79bf8bf0703fd94586bc49350a049a) when running the JS code generated from emscripten builds in a Firefox browser that should be fixed by `emsdk/3.1.51`. That code modifies `Error.stack` which is read-only as per spec, but only Firefox follows this spec.