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

**URL:** <https://forums.unrealengine.com/t/uncaught-typeerror-cannot-read-property-tolowercase-of-null-html5/453642>\
**Category:** Platform & Builds\
**Tags:** dedicated-server, HTML5, development-server, unreal-engine, bug-report, question, CPP\
**Created:** [August 9, 2019, 9:00pm UTC](https://forums.unrealengine.com/t/uncaught-typeerror-cannot-read-property-tolowercase-of-null-html5/453642 "2019-08-09T21:00:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Capeta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Capeta](https://forums.unrealengine.com/u/Capeta)\
**Post date:** [August 9, 2019, 9:00pm UTC](https://forums.unrealengine.com/t/uncaught-typeerror-cannot-read-property-tolowercase-of-null-html5/453642/1 "2019-08-09T21:00:49Z")

</div>

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:

 ![284682-ue4error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/6/926740ed25e067163dd3a114807bbc391d1540d4.png)

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?

---

<div class="post-metadata">

**Author:** ![Tabacudo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tabacudo](https://forums.unrealengine.com/u/Tabacudo)\
**Post date:** [August 9, 2019, 9:07pm UTC](https://forums.unrealengine.com/t/uncaught-typeerror-cannot-read-property-tolowercase-of-null-html5/453642/2 "2019-08-09T21:07:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AmitDang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmitDang](https://forums.unrealengine.com/u/AmitDang)\
**Post date:** [September 8, 2021, 10:28am UTC](https://forums.unrealengine.com/t/uncaught-typeerror-cannot-read-property-tolowercase-of-null-html5/453642/3 "2021-09-08T10:28:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AmitDang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmitDang](https://forums.unrealengine.com/u/AmitDang)\
**Post date:** [September 9, 2021, 8:37am UTC](https://forums.unrealengine.com/t/uncaught-typeerror-cannot-read-property-tolowercase-of-null-html5/453642/4 "2021-09-09T08:37:59Z")

</div>

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](https://answers.unrealengine.com/questions/726762/html5-uncaught-typeerror-cannot-read-property-tolo.html?sort=oldest)):

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

```
