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
  3. Dismiss Notice

How do I configure GitHub pages for decompression?

Discussion in 'WebGL' started by ebaender, Mar 3, 2021.

  1. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97
    I'm trying to host on GitHub pages and am having the exact same issue as in this thread. The last post explains that the problem is caused by incorrectly configured servers and points to the corresponding manual page.

    That only includes configurations for Apache and IIS though, can somebody explain to me how you would configure the GitHub pages server? I'd like to avoid using fallback decompression if at all possible. It's a pretty popular hosting option and there's tons of tutorials showing how simple it should be to set up, but none of them even mention this issue.

    UPDATE:

    Apparently that's not the only issue. I just fired it up on Apache with the proper configuration, but it still gets stuck the same way.

    Code (JavaScript):
    1. Release.framework.js.gz:1 Uncaught SyntaxError: Invalid or unexpected token
    2. Release.loader.js:1 Uncaught ReferenceError: unityFramework is not defined
    3.     at HTMLScriptElement.r.onload (Release.loader.js:1)
    4. Release.loader.js:1 [UnityCache] 'http://127.0.0.1/Build/Release.data.gz' successfully revalidated and served from the indexedDB cache
    5.  
    UPDATE 2:

    Fixed the Apache Problem. I didn't know you had to manually enable the .htaccess file override in the Apache configuration, might want to consider adding that to this page: https://docs.unity3d.com/Manual/webgl-deploying.html

    Also make sure to clear your browser cache after setting the override and restarting Apache, otherwise you will still be stuck.
     
    Last edited: Mar 3, 2021
  2. rostimosha

    rostimosha

    Joined:
    Jan 5, 2018
    Posts:
    5
    Hello, can you tell me how you did this?
    I can't find any info on how to set up .htaccess on Github Pages