Search Unity

Bug WebGL unable to parse compressed build

Discussion in 'Web' started by arifia, Jan 30, 2024.

  1. arifia

    arifia

    Joined:
    Dec 22, 2021
    Posts:
    2
    I am trying to launch a unity 3d game on a web page on my .NET web app. I have added the WebGL build of the game into my .NET project directory, and the game is being found and displayed on the web page, but when the loading bar is almost full, I get this error within the Unity game window:

    Unable to parse Build/WebGLTestBuild1.framework.js.gz! This can happen if build compression was enabled but 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.

    I have tried several things to get around this error (including changing my .config file in my web app), and succeeded once, but it seemed random and I was unable to avoid the error again. Please let me know if you have seen this error and know how to fix it, I have also attached an image of the problem. Thanks!
     

    Attached Files:

  2. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,790
    follow the instructions on how to setup the webserver to send the encoding - much as unity say its how it should be, its kinda not normal or so many of us wouldnt have these issues..
     
  3. arifia

    arifia

    Joined:
    Dec 22, 2021
    Posts:
    2
    Do you know where I can find these instructions?
     
  4. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,790
    No it will be as quick for you to google it as it would be me, its also on this forum somewhere a few times too