WebGL Builds only partially working

I have posted here a few times about the state of the WebGL builds now and wanted to share my latest issues with it.

I loaded my build up in IIS (Internet Information Services) in Windows 10, and got it to run locally on every browser. YES!!!

This unfortunately is where the good news stopped.

After uploading it to a windows-based host run by 1and1, absolutely nothing.

In Chrome, I managed to pick out these errors:

Failed to load resource: http://briggsmotors.co.uk/Release/UnityConfig.js
the server responded with a status of 404 (Not Found)

Failed to load resource: http://briggsmotors.co.uk/Release/fileloader.js
the server responded with a status of 404 (Not Found)

Failed to load resource: http://briggsmotors.co.uk/Release/1ShinyTiles.js
the server responded with a status of 404 (Not Found)

1 Like

I have the exact same problem, also with 1and1

This seems to be a server-side issue - there is a lot of details on the error, if you click on http://briggsmotors.co.uk/Release/UnityConfig.js

If you cannot make sense of those errors, I suggest talking to your hosting provider.

I ended up hosting it at itch.io :confused:

Had the same problem, also with 1&1 but found a solution from reading your posts.

They must be blocking folders called “Release” for some reason, I copied everything into a folder “Bulid/” and changed every reference to “Release/” in index.html to “Build/” the three .js files are being found now and the player works.

I had to downgrade to 5.2 to get past a different problem concerning “unknown file compression.” The same fix might work for that too seeing as everything was in a “Release/” folder…

Hope that helps.

Great! gonna try that! Thanks!!

After uploading the game file, you got 404 error means, the file does not exist or not accessible. The solution for that, after your build, completed open build folder check what is the file extension. For me, some files have *.unityweb these files cause the problem. If you are using IIS server(Windows) you need to add web.config file at the index.html location and content is

<?xml version="1.0" encoding="UTF-8"?>

Apache server(Linux) means go to your build folder create .htaccess file.
If you are using gzip-compression means .htaccess content is

AddEncoding gzip .unityweb

If you are using brotli-compression means .htaccess content is

AddEncoding br .unityweb

I think this information will help you guys. I am using Unity 2017.2. If you are using old version *.unityweb maybe differs.

Thanks

5 Likes

I am still having the same issue you would think unity would include this file

we actually used to generate a .htaccess file. Then stopped because you might use a different server than Apache so we created this page in the docs instead.