I’m on the unreal engine 4.9 and I create a fresh new blueprint blank project and packaged it in html5.
The build run successfully but I can’t make it work in my web browser .
We have a report entered for this issue, referenced as: UE-20600.
Even if static compression is enabled for some reason, the response headers aren’t being set with gzip encoding, we’re working on figureing this out.
You can try to host all of the files uncompressed. To do this, unzip any .gz files (e.g. .js.gz or .jz.mem.gz) and then change the .html file to not reference any .gz files. Hopefully, that will fix your issue as the cost of increased download times.
You can also try running gzip -d on each of the .gz files, and serving them without the .gz extension may work for you.
Another option that you have is to read up additional information on .htaccess files. What that directive is supposed to say is that “when a file name ends in .gz, tell the server and browser that it is gzip encoded/compressed.” There are a few ways to achieve this.
If the directory is called “MyUnrealGame” and your server home directory is “/home/myuser/www.example.com” then the directive could look like this:
So ! I have the same problem when I click on the “Launch” button in the Main Tool Bar, when I click on the down-arrow next to the “launch” option and then click on a HTML5 device and when I run the HTML5LaunchHelper.exe.
BUT when I click on the down-arrow next to the “Launch” option and choose “Project Launcher…” and, in the popup screen, I click on the “Launch” option in front of my HTML5 device it works.In facts it launches the UE4Editor.exe and then the browser with this URL “127.0.0.1:41898/myprojectname.html?cookonthefly=true”.
So I don’t solve the problem but i hope it’s a step to understand what we missed.
Before, I’m just using external file to launch html5 instead of use the launch menu from editor. And you’re right, I need to go with : "Launch → project launcher → firefox instead of “Launch → firefox”. It’ really strange…
Also, I don’t know why I have this rectangle in the middle of screen and black texture :(.
It’s really disappointing to have to guess the good way to make it “work”… And all that with the sample default project !
Thank you again Taomar for your help ! You allowed me to go further !
Yes, Taomar give me the trick to launch my html project, but only with the editor. I can’t launch it directly from the output files of the html5 packaged project… Why ?
And, has you can see in our comments, there a difference between launch application from “Launch → project launcher → firefox” and “Launch → firefox” (= b83 error like with html5 packaged files). Why ?
I requested for a Developer to look over your project information further and he said it doesn’t look like a gzip compression issue. However, a way to check that is to see if the project works when using the HTML5LaunchHelper.exe server. If it works with that but not on a public server/service then it’s very likely to be a gzip compression issue. Although it looks like you’re currently having trouble with actually running the HTML5LaunchHelper.exe.
After reading through your comments in the last few days, it looks as though you’ve resolved this issue. Has Taomar resolved your issue with the information provided?
A new step to go further (maybe) :
in the project settings, I clicked on Engine->Cooker and there checked the box “Enable cooking via network in the background…” , closed the screen, saved and file->exit. Then I launched again the engine and clicked on Launch and it worked (no UE4editor).
BUT the URL was still “127.0.0.1:41898/myprojectname.html?cookonthefly=true” and didn’t manage to launch it with the “HTML5LaunchHelper”.
So next step : try on an other webserver and try to know what I missed with the “cook”.
Have you tried packaging through Unreal Front End by going to Window > ProjectLauncher and setting up a custom packaging process for your HTML5 project? If so, were you able to include the extra command line parameters?
Are you able to open your project using the HTML5LaunchHelper.exe since you’ve gotten this far into the progress, and you simply cannot open your project without the error once it’s uploaded onto a server?
With the project launcher, it work by this way : “Launch → project launcher → firefox” (without any customization).
And now, when I enable Cooker in the project settings (as suggest me Taomar) : “Project Settings… → Engine → Cooker” it also work by this way : “Launch → firefox”.
Now, about the external pakaged files, and with the use of the HTML5LaunchHelper.exe, it make make same error than before (“b83 error…”).
But, if I add this : “?cookonthefly=true” in my adress bar, I haven’t this b83 error but just this “SyntaxError: malformed Unicode character escape sequence” (cf. screenshot above).
For now I haven’t do anyhting else and I’m curious if Taomar have similar issue with this packaged files.
I hope that help you to understand/reproduce this problem,
Thanks.
So I tried with an session (on windows) and it worked. No need to clik on “enable cooking via internet …”, just Launch->firefox. And it also worked with the HTML5LaunchHelper.exe.
I also tried with my session and a right click on epic games launcher to execute as an . It worked also in the editor but not with HTML5LaunchHelper and I don’t want to modify too much my session. So now I will work in an session.