1

I am working on some WebGL project and then I pushed my project on some webserver. When I open the website ( otom.playback.com.tr ) I took some errors like here below,

http://otom.playback.com.tr/Release/deneme.js Failed to load resource: the server responded with a status of 404 (Not Found)

http://otom.playback.com.tr/Release/deneme.jsgz Failed to load resource: the server responded with a status of 404 (Not Found)

UnityLoader.js:1 Uncaught incorrect header check

The first error says me deneme.js does not found in the webserver. But unity does not give me a js file. I added all files as mime type but still doesn't work.

What I must to do for this errors. Regards.

4 Answers 4

3

I have same problem, i put this web.config in project folder or you can add manually the mime in IIS.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".memgz" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".data" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".datagz" mimeType="application/octet-stream" />
            <mimeMap fileExtension=".jsgz" mimeType="application/x-javascript; charset=UTF-8" />
        </staticContent>
    </system.webServer>
</configuration>
Sign up to request clarification or add additional context in comments.

1 Comment

Had to add one for .unityweb but your solution worked great for me, thanks.
1

According to Unity's official documentation

The Development or Release folder contains the following files (the MyProject file name represents the name of your project). (Note that if you make a release build, files in this folder are compressed and have a .gz suffix. See the comments on Distribution size below.)

  • A MyProject.js JavaScript file containing the code for your player.
  • A MyProject.mem file containing a binary image to initialize the heap memory for your player.
  • A MyProject.data file containing the asset data and scenes.
  • A UnityLoader.js file containing the code needed to load up the Unity content in the web page.le containing the code needed to load up the Unity content in the web page.
  • If your JS files are missing you should rebuild the Project and make sure it builds without any error.
  • Make sure your host allows access to JS files
  • Set up a local web server to test your Project easier/faster before deploying to the web

More information can be found here: http://docs.unity3d.com/Manual/webgl-building.html

Comments

1

Also got this - on 5.3.4f1 with Edge.

My solution - using 7Zip, I extracted the jsgz files (and the other gz files) to the folder and then the player worked.

I think the default compression handling doesn't work if you're using something lame like Dropbox - like I am :-)

Comments

0

If you have direct access to your web server probably you should setup MIMEs. In my case IIS simply did not know what to do with *.mem, *.data, and other all that garbage.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.