Uncaught TypeError: Cannot read property 'toLowerCase' of null - HTML5

I had the same trouble some time ago. Ended giving up on the project :confused:

I’m trying to use HTML5 to show some UE4 scenes, but if I try to use a real server I’m getting the following error:

Server is running Apache 2.x (Linux Ubuntu 18.04).

On the other hand, if I run the test server (HTML5LaunchHelper.exe) if works fine.

I’ve also tried 64-bit versions of browsers and enabling browser options as said in docs.

What is wrong?

I am having the same issue, any luck resolving it.

This error seems to be coming from the main Js file from this line, also after the change package the file using gzip( This worked for me, This helped me (HTML5 uncaught typeError: cannot read property 'toLowerCase' of null - Platform & Builds - Epic Developer Community Forums):

                 // 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) {