Reputation: 155
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.
Upvotes: 1
Views: 8930
Reputation: 2187
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.
More information can be found here: http://docs.unity3d.com/Manual/webgl-building.html
Upvotes: 1
Reputation: 1370
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>
Upvotes: 3
Reputation: 2320
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 :-)
Upvotes: 1
Reputation: 695
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.
Upvotes: 0