Unable to parse Build/HTML5.framework.js.gz! Error solution in Unity Webgl

Unity WebGL Error:

Unable to parse Build/HTML5.framework.js.gz! This can happen if build compression was enabled but the web server hosting the content was misconfigured to not serve the file with HTTP Response Header "Content-Encoding: gzip" present. Check browser Console and Devtools Network tab to debug.


Are you working with Unity WebGL and getting the above errors when running WebGL in the browser.?

Solution:

This happens due to some missing configuration in your web server. For Example, if you are working with an Apache server like WAMP then you have to copy an htaccess file in your build data folder:

 "<Application Folder>/Build/.htaccess"


You can find IIS and Apache config files here on unity's official docs.

Alternate Solution

The quickest workaround is to disable WebGL compression. But this will increase the WebGL build size.



Post a Comment

2 Comments

  1. Hii im Fauzan from Indonesia, Im intrested talking with u about unity webgl. How can i contact u?

    ReplyDelete
  2. Assalamu alykum i am available on twitter as well @voiceoffaizan

    ReplyDelete