It’s my first time at packaging for HTML5 and I’ve read a lot of guides and answers around the web before posting here, like [Html5, Building on Windows][1], [guide1][2], etc…
When I package the project my Logs gives me no errors or warnings but as you can see [here ( project website link)][3] I get this error:
HTML5 uncaught typeError: cannot read property ‘toLowerCase’ of null
on my Web Host i loaded these files
and I avoided to load these ones
I’ve create a Blank Blueprints project with these settings :
Mobile / Tablet
Scalable 2D or 3D
No Starter Content
PROJECT SETTINGS
-Packaging
Build Configuration: Shipping Client
[checked] :Full Rebuil, For Distribution, Use Pak File, Share Material Shader Code, Shared Material Native Libraries, Cook only map, Create compressed cooked packages, Include prerequisites installer
This error seems to be coming from the main html file from this line:
// After enabling Content-Encoding: gzip, make sure that the appropriate MIME type is being used for the asset, i.e. the MIME
// type should be that of the uncompressed asset, and not the MIME type of the compression method that was used.
if (xhr.getResponseHeader('Content-Type').toLowerCase().indexOf('zip') != -1) {
There “xhr.getResponseHeader(‘Content-Type’)” is returning null. Try changing the if statement to
if (xhr.getResponseHeader('Content-Type') && xhr.getResponseHeader('Content-Type').toLowerCase().indexOf('zip') != -1) {
Does that avoid the issue?
Another way to fix this is to adjust http://fbusetto.com/ web server to serve content with the “Content-Type” header set - it looks like the bug is that the web server is serving the files without a Content-Type, and the .html file doesn’t expect that this could be happening at all, but expects that web servers tell the Content-Type.