- Home /
Unity WebGL Unable to parse Build
Hello everyone, I'm getting this error when I try to run my game on browser. How can I fix it? It works fine on localhost but not on the server.
Here's the link: https://gokdenizcetin.com/assets/files/pongremix-star-wars/v0.1.1/game/play.html
Answer by Bunny83 · Aug 18, 2021 at 07:18 AM
Well, just like the error said, you have enabled brotli compression in your build settings but your server does not include a Content-Encoding header in the response. We can clearly see that the file name ends with "br" (so it's a brotli compressed content) however when you inspect the response headers in the network tab, your server does not include a Content-Encoding header for that file. Please see the server configuration documentation manual. There's also a link to a config example page for IIS and Apache servers.
If you can not change the server config, you probably should disable brotli compression in the build settings since your server can not serve the files correctly.
Thank you for the detailed answer! Since I don't have .htaccess in my website, I used "Decompression Fallback" instead. And it works good so far, tested on Chrome/Opera/Edge/Firefox and all works fine.