Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by samuel-levine · Mar 05, 2016 at 11:27 PM · errorcanvaswebglhostingheaders

WebGL: Fix incorrect header check error when loading Content-Encoding: gzip files

Hi all,

I've struggled with this for a while now and have just about given up, but I thought I'd see if the community has found a workaround just in case.

When trying to host a Unity WebGL canvas build, I've found that the Unity-generated Release/.datagz file can quickly get so big that it needs to be loaded from its own special source, due to hosting company requirements. This causes me to have to edit the Unity index.html such that the "Module" object includes the following:

 dataUrl: "https://remote.server.com/<projname>.data",
 codeUrl: "Release/<projname>.js",
 memUrl: "Release/<projname>.mem"

This works great... until I try to speed things up by setting the Content-Encoding on that remote object to "gzip", as instructed by the javascript warnings. That causes Unity to immediately crash on load, spitting out the "Incorrect header check" error in the title.

I've now tried this with the .datagz file on two different cloud providers, and I get the same behavior.

Unity Answers - how can I get my files hosted with gzip Content-Encoding without receiving this error?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Bryan-Legend · Nov 18, 2016 at 12:24 AM

If you're hosting on IIS use this web.config:

 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <system.webServer>
         <staticContent>
           <mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
           <mimeMap fileExtension=".data" mimeType="application/octet-stream" />
           <mimeMap fileExtension=".memgz" mimeType="application/octet-stream" />
           <mimeMap fileExtension=".datagz" mimeType="application/octet-stream" />
           <mimeMap fileExtension=".unity3dgz" mimeType="application/octet-stream" />
           <mimeMap fileExtension=".jsgz" mimeType="application/x-javascript; charset=UTF-8" />
         </staticContent>
     </system.webServer>
 </configuration>


Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Caliche2000 · Jan 15, 2017 at 12:39 AM 0
Share

This was exactly what I needed for $$anonymous$$e to work. Thank you very much.

avatar image
1

Answer by HuEdOut · Jan 09, 2017 at 10:56 AM

It sounds like a simple issue, but have you checked the file/folder name? I got the same error message on my localhost just previewing my build. It turns out that JavaScript does not like spaces in the name.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mitax8 · Jan 15, 2017 at 02:42 PM 0
Share

Got the same issue and after removing the spaces in my folder name it worked. Thank you!

avatar image
0

Answer by ivank · Jun 20, 2016 at 11:52 AM

@samuel.levine I am not sure, but maybe this answer could help a little: http://forum.unity3d.com/threads/webgl-incorrect-header-check-bug-again-in-latest-beta.411725/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

63 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Didn't loading facebook instant game 0 Answers

WebGL Build don't work 0 Answers

the latest version of unity physics? 0 Answers

WebGL build failing Unity v5.2 0 Answers

Cannot Export to WebGL because of il2CPP stops working. 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges