HTML5>Chrome: SyntaxError.Unexpected Token ILLEGAL

#Possible Solution

Someone having this error in a different context found solution was a stray whitespace character:

http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6367082376

"Finally, using Chrome Web Development tools I saw that error that was being generated was “Uncaught Syntax Error: Unexpected Token ILLEGAL”.

A search of this error description pointed me to StackOverflow.com - somehow in process of copying JS from Dev to Test caused what appears to be a 0-length space to be appended to end of file. Upon editing file (JQuery.js for my case) within Notepad++ you can see a line that appears to be empty. Removal of that final line causes everything to work correctly.

I don’t know how / when that character got appended to end of file: I had copied folder structure using copy and paste within Windows / Remote Desktop. I believe I also attempted w/ Change Management w/ same results. original script does not have this additional line.

Hopefully this will save someone else grief caused me."

I can confirm same error message, Unexpected Token Illegal with Chrome.

I also can confirm everything working great if I use uncompressed version (uncompress all .gz files and remove all trace of .gz from .html file.

For anyone whose uncertain, I’ve attached .html file after all .gz has been removed. (change .txt to .html)[link text][1]

Below is error I see (inverted colors for happy eyes)

I did try using htaccess solution mentioned in original post of this thread and elsewhere.

UE-20600 has came back as invalid. If you’d like to learn more about UE-20600, there is an [AnswerHub][1] post where it’s been explained further.

Thank you!

Problem with testing/opening HTML5 packed project - Platform & Builds - Epic Developer Community Forums

Hi Sam,

If UE-20600 came back as invalid, can you tell us what was problem? thread you linked to above seems to indicate there is still a problem with servers not sending proper gzip response headers even though they have static compression enabled.

I have a project that runs fine on my web server as long as I uncompress all files from packaged project and remove gz referenced from HTML file. I use Abyss Web Server (supports compression, tested that it’s enabled at HTTP Compression Test / WhatsMyIP.org) and have added Access-Control-Allow-Origin: * (no errors in chrome console).

Is outcome of this, for now, that we still need to use uncompressed?

UE-20600 was a feature request to implement servers such as . However, report came back as invalid because our Developer provided reasons as to why issues shown were occurring.

Based on information that you’ve just explained, it would see that using an uncompressed version of your project works best on web server you’re using.

Please let us know if this changes, or if you notice this isn’t working on web browsers your project used to run perfectly fine with.