x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

HTML5 uncaught typeError: cannot read property 'toLowerCase' of null

Hi everyone

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, guide1, etc..

When I package the project my Logs gives me no errors or warnings but as you can see here ( project website link) I get this error:

HTML5 uncaught typeError: cannot read property 'toLowerCase' of null

on my Web Host i loaded these files

alt text

and I avoided to load these ones

alt text

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

PLATFORMS -HTML5 [checked]: Compress file during shipping packaging

please help me to fix this problem. Thank you

Product Version: UE 4.18
Tags:
more ▼

asked Nov 17 '17 at 04:31 PM in Packaging & Deployment

avatar image

Istigo
1 1 1 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jan 18 '18 at 04:46 PM

avatar image

juj
1.2k 15 4 17

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question