I can't get webgl build running on Firefox Unity version 2021

WebGL runs fine on Chrome, but in Firefox I get errors. In Unity version 2020 I had no problems with Firefox.
Is there something with the new URP verison?

I use brotli compression without decompression fallback

I have the same error. I don’t think it’s related to URP I think it’s a bug in the webserver that Unity sets up to run your build. If you check the console in Firefox you see:

“Unable to parse Build/Builds.framework.js.br!
If using custom web server, verify that web server is sending .br files with HTTP Response Header “Content-Encoding: br”. Brotli compression may not be supported in Firefox over HTTP connections. See https://bugzilla.mozilla.org/show_bug.cgi?id=1670675 for more information.”

But the linked bug has already been solved and brotli is supported by Firefox. If you further look into the console the next message is a “Uncaught SyntaxError: illegal character” error.

From that I conclude that Unity’s webserver doesn’t send the “Content-Encoding: br” HTTP head thus leading Firefox to not realising that the content is compressed and trying to read it like a plain document which leads us to the “Illegal Character” error (because the compressed bits don’t make sense to Firefox)