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"

Why when I build Html5 can Firefox not find the file "MyProject.html"?

on windows 8 I build from sources UE4 on D drive then I launch it, I created a new project and when I try to launch as html5 device Firefox Nightly can't find the file "MyProject.html", also MyProject.html do not exist on c or d drive.

Product Version: Not Selected
Tags:
more ▼

asked Mar 25 '14 at 06:20 PM in Everything Else

avatar image

b25
38 4 5 7

avatar image Ineni.Realtime Apr 01 '14 at 01:40 AM

I'm also getting this issue, anyone have any ideas?

avatar image varomix Apr 01 '14 at 01:58 AM

How did you get it to compile to HTML5 please details, help :)

avatar image Ineni.Realtime Apr 01 '14 at 02:04 AM

@varomix, I grabbed the master branch from github, as well as the two required and one optional zip files, put them all in the necessary folders, then generated the project files and compiled the project targeting development editor.

avatar image varomix Apr 01 '14 at 04:46 AM

I did that, now twice I get the HTML5 option on the menu but is gray out can't select it alt text

package.png (12.2 kB)
avatar image Ineni.Realtime Apr 01 '14 at 04:50 AM

Yup, that's the stage I'm at as well.

avatar image Pipeliner Apr 03 '14 at 09:03 PM

I can't even get the HTML5 option to show up. Did you install enscripten, or anything else in addition to the standard installs?

avatar image Krako Apr 03 '14 at 09:26 PM

I think the only way to generate a javascript file is using visual studio. Whether someone was able to run the HTML app using the LAUNCH button?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

Building HTML5 projects is supported but only under the latest version of the engine. Release 4.1 does not work well with the latest version of the Emscripten SDK (version 1.16) so you will need to use the master branch of our UnrealEngine GitHub repository: https://github.com/EpicGames/UnrealEngine

Once you've got that repo up and running, read our Getting Started documentation for HTML5: https://docs.unrealengine.com/latest/INT/Platforms/HTML5/GettingStarted/index.html

Finally, some gotchas not currently mentioned in the documentation:

  • the HTML5 option under File -> Package Project does not currently work

  • you need to use UnrealFrontend to build/cook/package/deploy HTML5 projects

  • you will need to build UnrealFrontend manually via the UE4.sln file

  • you may need to rebuild the UnrealHeaderTool if you encounter an error related to ScriptGenerationPlugin when compiling the HTML5 build

  • your project will need to define a GameDefaultMap in its DefaultEngine.ini file

Once UnrealFrontend finishes building your game project, you'll find all the HTML5 files in Engine/Binaries/HTML5 under your repo folder. Launch the html file under a 64-bit browser and enjoy!

more ▼

answered May 06 '14 at 10:21 PM

avatar image Ineni.Realtime May 07 '14 at 02:47 AM

Hmmm, I followed all those steps, and it created UE4Game.bc, UE4Game.js, and UE4Game.js.mem files in Engine/Binaries/HTML5, but still no html file. I might've done something wrong in the UnrealFrontend, since I've never used it before. Is there a particular way I should do it?

avatar image Ben Donatelli May 07 '14 at 02:24 PM

You're almost there :)

The final html file is generated as part of the 'Package' process. You'll need to run this process from UnrealFrontend.

The general flow is going to be:

  1. Launch UnrealFrontend

  2. Switch to 'Game Launcher' tab

  3. Choose 'Advanced...' at the left

  4. Create a new profile (if one does not already exist) by clicking the '+' button in the upper-right

  5. Build: Do you wish to build? (tick this checkbox)

  6. Cook: By the book (selected any maps you want to cook under the Cooked Maps group)

  7. Package: Package & store locally (fields can be blank)

  8. Deploy: Copy to device (add a new group and tick item with HTML5 icon)

  9. You can now 'Launch' the build process

Provided that the build compiles successfully and the cook process doesn't throw any errors, you should find a .html (and some other data files) in the same directory as UE4Game.bc.

avatar image Ineni.Realtime May 07 '14 at 10:54 PM

Thanks for all your help Ben :)

I've got a html file now, but when I run it, it throws these errors in the console (Using the Firefox nightly build):

 ReferenceError: tstart is not defined TESTHTML5.html:212
 Successfully compiled asm.js code (total compilation time 40148ms; not stored in cache; 44 functions compiled slowly: (A bunch of random functions)
 uncaught exception: out of memory

Also, in the UnrealFrontend, I did get this warning:

 Platform.Deploy: WARNING: HTML5 does not implement Deploy...

Any ideas?

avatar image Ben Donatelli May 08 '14 at 11:17 AM

The warning from UnrealFrontend is harmless and expected -- safe to ignore.

The "out of memory" exception is usually caused by running the HTML file under a 32-bit browser. You'll want to be certain you're running under a 64-bit browser like a Firefox nightly (make sure to grab the x86_64 version) or Chromium 64-bit.

avatar image Ineni.Realtime May 08 '14 at 10:47 PM

Man, it's just one error after another :p

 Runtime/CoreUObject/Public/UObject\Class.h(2354): Assertion failed: Class
 ConstructObject called with a NULL class object
 C:\UE-Master\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp(176): Fatal error:
 Assertion failed: Class [File:Runtime/CoreUObject/Public/UObject\Class.h] [Line: 2354]
 ConstructObject called with a NULL class object
 Stack:
 [Callstack] 0x00000000
 
 69

This is what popped up in the scrollbox at the bottom of the html page.

There was a bit more in the browser console.

avatar image Ehamloptiran May 08 '14 at 10:57 PM

See comments below about running a local server stack. I was getting the exact same error. Also make sure that the .data.js file was created and .data.

avatar image Ineni.Realtime May 08 '14 at 11:23 PM

Hmmm, I'm just installing XAMPP now, I haven't seen any .data.js or .data files before, any idea how I get it to create them?

avatar image Ehamloptiran May 08 '14 at 11:28 PM

the .data and .data.js should be created via the unreal frontend. This probably explains why your getting the error. Make sure your Emscripten environment is set up correctly. (Another issue I had was .py files were not associated with python, so a particular command during packaging was failing silently as it was trying to run the .py file by itself)

avatar image Ineni.Realtime May 09 '14 at 12:59 AM

Hmmm, I thought I'd set up Emscripten properly. Do I need to build it from the source rather than installing the NSIS version?

I've set up the environment variables, .emscripten paths, and set .py's to always open with the python.exe in the emscripten directory... am I missing something else?

avatar image Ehamloptiran May 09 '14 at 01:21 AM

I'm using the NSIS version, so no you dont have to build emscripten from source. Can you upload a copy of the log from frontend? See if I can identify any issues.

avatar image Ineni.Realtime May 09 '14 at 01:53 AM

Sure, here it is.

Thanks for helping out Ehamloptiran! It's kinda dumb since it's not even a fully developed feature, but I'd really like to get it working :)

avatar image Ehamloptiran May 09 '14 at 02:14 AM

Yeah dont worry I know the feeling.

Okay looks like your having the exact same problem I was having. Even though .py files are set to open automatically with python it does not seem to be passing the args over correctly.

I fixed this by opening HTML5Platform.Automation.cs (Under Programs/Automation in VS). and going to Line 36 and changing the string to:

 /c python {0} {1} --preload . --pre-run --js-output={1}.js

Then doing a rebuild in Frontend, hopefully the SwingNinja.data and SwingNinja.data.js appear correctly.

avatar image Ineni.Realtime May 09 '14 at 05:16 AM

It worked! Nice work, thanks man!

Appalling framerate, but that's probably mostly my machine. Thanks for all the help!

avatar image Ehamloptiran May 09 '14 at 05:48 AM

Glad to hear its working

avatar image Erasio May 15 '14 at 07:03 PM

So far this was a huge help. However when I try to build I get this Error:

Program.Main: ERROR: Failed to load script DLL: E:\UnrealEngine4\UnrealEngine-4.2.0-preview\UnrealEngine-4.2.0-preview\Engine\Binaries\DotNET\AutomationScripts\Win.Automation.dll: Could not load file or assembly 'Win.Automation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

The dll is where it belongs, I tried to build the AutomationTool, the AutomationToolLauncher and the HTML5.Auotmation again. Is this something with the current master branch or was there something I missed?

Thanks!

avatar image Goerge Carlin Dec 15 '14 at 04:10 PM

First, I can't find the HTML file. If it's supposed to be here "\UnrealEngine-46S\Engine\Binaries\Win64\HTML5" then there is no html file in that folder. Second, in step 8 you've said: Deploy: Copy to device (add a new group and tick item with HTML5 icon) I'm using ue 4.6 and I don't know how to add a new group in deploy area. It's like this:alt text

ss.png (65.9 kB)
avatar image Ehamloptiran May 07 '14 at 05:08 PM

I've tried following the above instructions using the latest preview build and emscripten 1.16. Everything compiles fine and I get the necessary html file at the end. But no matter what project I try I am always confronted with the following error when running the HTML:

 Runtime/CoreUObject/Public/UObject\Class.h(2354): Assertion failed: Class
 ConstructObject called with a NULL class object
 D:\Development\Toolkits\UnrealEngine\Src\Preview\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp(176): Fatal error:
 Assertion failed: Class [File:Runtime/CoreUObject/Public/UObject\Class.h] [Line: 2354]
 ConstructObject called with a NULL class object
 Stack:
 [Callstack] 0x00000000
 
 69
 
avatar image Ben Donatelli May 07 '14 at 05:59 PM
  1. Are you seeing this error in the output textarea when running the HTML page in a browser?

  2. Are you running in a 64-bit browser such as a Firefox nightly build or Chromium 64-bit?

  3. Are you running the HTML file directly from disk (file:// in the URL) or are you hosting it via a local server stack (localhost/path/to/html/file)?

If you haven't tried hosting via a local server stack, try using XAMPP. I found that running directly from disk caused some issues that cleared up when running through a proper web-server process.

avatar image Ehamloptiran May 08 '14 at 01:42 AM
  1. Yes

  2. Yes - Firefox Nightly build

  3. Running directly from disk

I will try out XAMPP and post my results. Thanks for responding.

avatar image Ehamloptiran May 08 '14 at 04:49 AM

And success, I started with a clean engine build, fixed up an issue I had with my path pointing to python and after using frontend to compile SwingNinja project everything worked:

SwingNinja in HTML5

avatar image Ben Donatelli May 08 '14 at 11:18 AM

Glad to hear you got it up and running!

avatar image Moss May 09 '14 at 12:36 PM

Using the master branch and the content from the lastest preview I get quite some compile errors when compiling the engine in Development for HTML5.

Here is the list of errors:

  • WheeledVehicleMovementComponent.cpp(6,10): error : 'PhysicsAssetUtils.h' file not found

  • ForwardTranslucentRendering.cpp:311:19: error: too few arguments to function call, single argument 'View' was not specified in CopySceneAlpha();

It seams that the required zip files do not match the one the engine expects for the phys asset error, but CopySceneAlpha in HTML is called without arguments while its declared with one (a scene view in this case).

Cheers, Moss

avatar image Ben Donatelli May 09 '14 at 12:39 PM

This is expected. When developing from master (which mirrors our main development branch) the required binary zip files will quickly become out of date. You may find that you need to build tools such as CrashReporterClient, ShaderCompileWorker, UnrealHeaderTool, and UnrealBuildTool before you can properly compile the build.

The main branch also provides no guarantee of stability. You may find that you pull latest and that it won't compile -- this may well be the case for us internally for that given head position. You can try fixing the compile errors yourself or wait a while and pull again and hopefully the issue has been fixed internally and replicated its way to GitHub master.

avatar image Moss May 09 '14 at 01:39 PM

Thank for the response Ben, I was just curios if I picked the wrong zip files :D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I have similar problem. has anyone found a solution?

more ▼

answered Mar 31 '14 at 11:15 PM

avatar image

Krako
1 1

avatar image Ehamloptiran May 08 '14 at 04:52 AM

Just follow the instructions above carefully, I had success doing this as per my above comments.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi guys, I get as far as having a html file, but when opened in a 64bit (chromium or nightly) browser I get a blank page, that says "downloading" but nothing happens. Also, there is ONLY a html file an nothing else in the folder.

https://dl.dropboxusercontent.com/u/8833758/Blueprint/html5.jpg

I had the python problem as described by Ehamloptiran (.py files not associated with python, although the .emscripten file pointed to the correct folder). I tried to type in the exact string but VS gives me some weird errors when compiling (I am not a programmer). Maybe someone can give me the exact string?

https://dl.dropboxusercontent.com/u/8833758/Blueprint/vs.jpg

more ▼

answered Jun 09 '14 at 08:24 PM

avatar image

4ndy
5 4 7 9

avatar image polsds Jun 10 '14 at 08:53 PM

You have an extra " on your line

avatar image 4ndy Jun 11 '14 at 08:14 AM

Thanks, which one is it, the middle one? (I am not a programmer) I guess after that I have to build everything again, right?

avatar image 4ndy Jun 12 '14 at 05:41 PM

I rebuild the html5.automation, the unreal frontend and ue4 with no changes... any ideas?

avatar image Ehamloptiran Jun 13 '14 at 01:31 AM

As per Ben Donatelli's comment above:

Are you running the HTML file directly from disk (file:// in the URL) or are you hosting it via a local server stack (localhost/path/to/html/file)?

If you haven't tried hosting via a local server stack, try using XAMPP. I found that running directly from disk caused some issues that cleared up when running through a proper web-server process.

avatar image 4ndy Jun 13 '14 at 06:38 PM

I have tried it with XAMPP with not luck. Worth mentioning, that in the html5 folder there is just a single html file with only 7KB... that can't be right.

avatar image 4ndy Jun 18 '14 at 09:16 AM

Ideas anyone?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello guys, Here I'll describe what I have encountered with the release 4.2.

So far I have been able to build pure blueprint projects flawlessly to HTML5 with the Unreal frontend. Only C++-based projects seem to fail in the packaging phase with error: "Unknown parameter: Projects\test\Binaries\HTML5\test.data".

I tried Ehamloptiran's trick (that was changing line 36 of HTML5Platform.Automation.cs to /c python {0} {1} --preload . --pre-run --js-output={1}.js), with no success. That tweak of course helps only those who have not set the python file association properly. I have also tried to create a patch for this problem from the current master branch, but it is hard to find the actual solution for this problem because there are so many changes already.

In my opinion,the most probable reason for the packagins error is that there is a bug in the HTMLPlatform.Automation tool that feeds wrong parameters into Emscripten. You could find a solution from the master branch. For me, that ordeal was taking too much time, so if you don't want to waste so much time on solving this, it would be best to just wait for the 4.3 release.

Update: The HTML5 build works reasonably well with 4.3 release as I suspected.

Just make sure you have FireFox Nightly 64-bit web browser installed (if not, get it from here: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/). Also, confirm that you have setup Emscripten and other required tools and their PATHS correctly.

Then, go through the following HTML5 build procedure:

  1. Open the Unreal Frontend tool and select 'Game Launcher'-tab and choose 'Advanced...'

  2. Project settings: Select your project file and choose build configuration. Shipping will create the most compressed JS file.

  3. Build settings: Check 'Do you wish to build'

  4. Cook settings: Select 'Cook by the Book' in the drop down menu. Check 'HTML5' in the 'Cooked Platforms', and select your maps (if the tool finds them).

  5. Package settings: Select 'Package and Store locally' in 'How would you like to package the build?'. This step will move the needed files in the correct location and generates the required html-file. Do not change the other settings in this section.

  6. Deploy settings: Select 'File Server' in 'How would you like to deploy the build?'. Create a new Device Group if not exists. Select a device with a 'HTML' platform in the created group.

  7. Launch settings: Select 'Using Default Role' in 'How would you like to launch?'

  8. Press Launch.

If all works like a charm your project will be built, cooked and packaged and finally, a file server script and FireFox nightly should be launched.

more ▼

answered Jul 03 '14 at 05:10 PM

avatar image

KillerFox
21 1 2

avatar image KillerFox Jul 19 '14 at 07:55 PM

I have now evaluated the 4.3 release and can confirm that HTML5 build process is working like it should..

avatar image Goerge Carlin Dec 15 '14 at 04:17 PM

I'm working with 4.6 version and in my version there is no HTML check box in Cooked Platforms section in Frontend. What you think I can do to make it appear? alt text

ss2.png (70.8 kB)
avatar image DaveGMac Jul 31 '14 at 07:13 PM

I have gone through the process and set everything up accordingly as far as I can tell. When I launch it in the nightly browser it downloads the data and just gives me a black screen.

Here is the log file: link text

avatar image KillerFox Aug 05 '14 at 08:26 PM

I updated my answer and added additional information about the building process that works for me. Hope that helps.

avatar image fdslk Aug 14 '14 at 01:57 AM

Well, I'm having problems for some reason, when packaging is about to start, for some reason the frontend finds an error and can't find a turnaround for it.

https://answers.unrealengine.com/questions/83299/html5-packaging-issue-in-frontend-version-431.html

Any ideas?

avatar image Ehamloptiran Aug 14 '14 at 02:44 AM

Hi fdslk, I have responded to your answerhub post you linked.

avatar image fdslk Aug 14 '14 at 03:02 AM

Thxs man, gonna check that out :D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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