Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Brotli compression may not be supported over HTTP connections

Discussion in 'Web' started by Darkgaze, Dec 15, 2021.

  1. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
    I get this error when executing my webgl build in Chrome.

    Unable to parse Build/SampleScene.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 over HTTP connections. Migrate your server to use HTTPS.

    I'm using a custom server (well, paid server) using http. Should I actually move to Https?... how to disable this?
     
  2. deus0

    deus0

    Joined:
    May 12, 2015
    Posts:
    256
    Hey, did you get WebGL builds to work at all? :O
     
  3. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    392
    If you intend to continue using Brotli you should move to HTTPS as it's required on many hosts of not all.

    If not, you can switch to GZip. But again, highly recommend using HTTPS from the getgo - or if you're stuck on HTTP & just want to quick test, use uncompressed for DEV.
     
    Darkgaze and deus0 like this.
  4. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
    Yep, I just generated the build with Unity 2020. It just doesn't work in 2021, for whatever reason.
     
  5. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,902
    Is there a valid reason for choosing HTTP over HTTPS in your situation? Just trying to figure out why anyone would choose that for anything unity related - it sounds like you should be moving to HTTPS
     
  6. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    392
    Can't speak for OP but some local servers require more configs than just 'plug & play' to be https. Notably local self-signed certificates.

    In short, it's just faster to setup HTTP vs HTTPS for dev...
     
  7. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
    The reason is the certificate. You have to pay for the certificate an extra amount per year that I don't want to pay for. It's just my personal website.
     
  8. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    392
    Try https://letsencrypt.org.
     
  9. wasifalmeem789

    wasifalmeem789

    Joined:
    Apr 24, 2020
    Posts:
    3
    I was facing the same Error code while running my Webgl build over local server using Xampp.
    To fix this issue go to files>build settings>player settings>Publishing settings and from there just turn on "Decompression Fallback" option and create a webGL build again and it should work properly over local server or any server you will upload your project , thanks
     
  10. LovePurple

    LovePurple

    Joined:
    Jan 3, 2013
    Posts:
    11
    Thanks
     
  11. AdityaTechM836026

    AdityaTechM836026

    Joined:
    May 26, 2022
    Posts:
    1

    hey it worked you can either turn on "Decompression" or chnge brotli to Gzip
     
  12. vriog

    vriog

    Joined:
    Dec 6, 2014
    Posts:
    29
    You can use https://certbot.eff.org to install a certificate and enable https on your website, but:

    The Brotli/GZIP compression is broken to me no matter what I try
     
  13. kenorbik

    kenorbik

    Joined:
    Jan 9, 2023
    Posts:
    7
    I've tried to run via:
    Code (Shell):
    1.  
    2. % http-server --brotli --gzip .
    3. Serve GZIP Files: true
    4. Serve Brotli Files: true
    5.  
    Despite npm http-server supports both compressions, it failed to load.

    > Unable to parse Build/WebGL.framework.js.br!
     
    tokar_dev likes this.
  14. ShepsDevelops

    ShepsDevelops

    Joined:
    Mar 24, 2023
    Posts:
    1
    Thanks it worked