Download

HTML5 Build with 4.1

Thanks all for your replies. I am going to wait for a version that make it simple to generate html5. The sizes of the html files look very large. It is ironic but Unity 4.5 creates html files easily. About the only thing in Unity that works.

another test using the blank project doesnt work still, firefox nightly, the console says:


ReferenceError: tstart is not defined Blankproj.html:212
Successfully compiled asm.js code (total compilation time 26558ms; stored in cache; 9 functions compiled slowly: MTa:12371:1316028 (371ms), krd:12395:142780 (412ms), aOc:12403:884682 (498ms), Ggl:12419:1089670 (277ms), G$h:12511:672411 (262ms), H$h:12511:768155 (319ms), I$h:12511:867225 (319ms), F$h:12523:327687 (268ms), YNh:12519:926247 (896ms)) UE4Game-HTML5-Shipping.js
"run() called, but dependencies remain, so not running" Blankproj.html:177
"pre-main prep time: 1656 ms" Blankproj.html:177
112 Blankproj.html:177
uncaught exception: abort() at stackTrace@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:1043:15
abort@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:14637:25
GXx@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:12527:584507
ULa@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:12507:872559
Dl@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:12403:43321
Kl@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:12403:50684
callMain@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:14528:15
doRun@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:14585:7
run/<@file:///D:/GitHub/UnrealEngine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js:14597:19

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

I have noticed that I get a very similar error to that, when I try to package for HTML5 initially. But once I do the following as written by me in this answerhub post https://answers.unrealengine.com/questions/18136/html5-build-firefox-cant-find-the-file-myprojectht.html

It works fine, so I would suggest giving that a go. (If you haven’t already)

thanks
after doing that it has a green bar under downloading, didnt before, still doesnt work.
console says:


ReferenceError: tstart is not defined Blankproj.html:212
Successfully compiled asm.js code (total compilation time 29584ms; stored in cache; 13 functions compiled slowly: __ZN28FRCPassPostProcessTonemapES27ProcessER30FRenderingCompositePassContext$0:12343:1626508 (326ms), __ZN28FRCPassPostProcessTonemapES27ProcessER30FRenderingCompositePassContext$1:12343:1989774 (293ms), MTa:12375:9 (355ms), krd:12395:611927 (368ms), aOc:12407:9 (441ms), Ggl:12423:234553 (264ms), y7v:12511:148941 (267ms), s8v:12511:426539 (283ms), G$h:12515:9 (406ms), I$h:12515:194823 (542ms), H$h:12515:95753 (605ms), F$h:12523:796834 (478ms), YNh:12523:303213 (1013ms)) UE4Game-HTML5-Shipping.js
uncaught exception: out of memory

“tstart is not defined”
what is this?

edit:
after rebuilding everything again:


ReferenceError: tstart is not defined Blankproj.html:212
Successfully compiled asm.js code (loaded from cache in 2785ms) UE4Game-HTML5-Shipping.js
uncaught exception: out of memory

next edit:
reading that it might be because its on my hd, upping it to my server produces this error:


Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:63
ReferenceError: tstart is not defined Blankproj.html:212
Successfully compiled asm.js code (total compilation time 27286ms; stored in cache; 9 functions compiled slowly: __ZN28FRCPassPostProcessTonemapES27ProcessER30FRenderingCompositePassContext$1:12343:1989774 (256ms), MTa:12375:9 (290ms), krd:12395:611927 (292ms), aOc:12407:9 (413ms), G$h:12515:9 (382ms), I$h:12515:194823 (455ms), H$h:12515:95753 (490ms), F$h:12523:796834 (431ms), YNh:12523:303213 (836ms)) UE4Game-HTML5-Shipping.js
uncaught exception: out of memory

heres a link to the actual thing
http://www.tegleg.co.uk/ue4/Blankproj.html
anyone got a 3d thing working?

edit:
it works!
updating java fixed it
heres the car blueprint template in html5
http://tegleg.co.uk/ue4/cartegeditor.html
even works in 32bit firefox :slight_smile:

Good to see u got it working. tstart error can be safetly ignored. Ive noticed it will work under 32-bit browsers aswell, altho its more prone to out of memory errors, it also uses less memory (My game uses 400mb on 32-bit FireFox, and 2.1gb on 64-bit FireFox)

Your guys’ discussions have been a big help with all of this.
I’ve come very close to getting this to work and I’m hoping some insight can help me over this speedbump–

Situation: The game won’t launch after the loading bar finishes

Details:

  • I’ve been able to compile a project in html5 and I have all 6 files including the .html
  • I’m using 4.2 on GitHub
  • Tried running on localhost as well as straight disk
  • Attempted to run in both Nightly and Chromium
  • Java is up to date
  • HTML5Platform.Automation.cs has been edited+rebuilt with the following path on line 36, before Frontend compile:
    “/c python {0} {1} --preload . --pre-run --js-output={1}.js”

I’ve attempted two different Frontend builds, Development and Shipping. Here are their Nightly logs:

Shipping:


Successfully compiled asm.js code (total compilation time 15650ms; stored in cache; 4 functions compiled slowly: MTa:12371:1316009 (268ms), krd:12395:142768 (276ms), aOc:12403:884735 (429ms), YNh:12519:926210 (551ms)) UE4Game-HTML5-Shipping.js
"run() called, but dependencies remain, so not running" htmltest.html:177
"pre-main prep time: 1363 ms" htmltest.html:177
uncaught exception: abort() at stackTrace@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:1043:15
abort@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:14637:25
GXx@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:12527:584596
ULa@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:12507:872627
Dl@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:12403:43323
Kl@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:12403:50686
callMain@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:14528:15
doRun@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:14585:7
run/<@http://localhost/SC/engine/UE4Game-HTML5-Shipping.js:14597:19

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
112

Development:


ReferenceError: tstart is not defined htmltest.html:212
Successfully compiled asm.js code (loaded from cache in 7884ms) UE4Game.js
"run() called, but dependencies remain, so not running" htmltest.html:177
"pre-main prep time: 1726 ms" htmltest.html:177
"Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored." htmltest.html:177
"emscripten_demangle is not available in the current build. Please add the file $EMSCRIPTEN/system/lib/libcxxabi/src/cxa_demangle.cpp to your build to show demangled symbol names." htmltest.html:177
"Expression 'Class' failed in Runtime/CoreUObject/Public/UObject\Class.h:2377!
    at __ZN11FEngineLoop4InitEv (UE4Game.js:3342179:3:0)
    at __Z10HTML5_Initv (UE4Game.js:4494393:2:0)
    at _main (UE4Game.js:4378054:2:0)
    at callMain (UE4Game.js:5511870:15:0)
    at doRun (UE4Game.js:5511927:7:0)
    at run/< (UE4Game.js:5511939:19:0)" UE4Game.js:11054

"C
    at __ZN11FEngineLoop4InitEv (UE4Game.js:3342181:3:0)
    at __Z10HTML5_Initv (UE4Game.js:4494393:2:0)
    at _main (UE4Game.js:4378054:2:0)
    at callMain (UE4Game.js:5511870:15:0)
    at doRun (UE4Game.js:5511927:7:0)
    at run/< (UE4Game.js:5511939:19:0)" UE4Game.js:11054

"DebugBreak() called!
    at __ZN6FDebug12AssertFailedEPKcS1_iPKwz (UE4Game.js:3218621:2:0)
    at __ZN11FEngineLoop4InitEv (UE4Game.js:3342182:3:0)
    at __Z10HTML5_Initv (UE4Game.js:4494393:2:0)
    at _main (UE4Game.js:4378054:2:0)
    at callMain (UE4Game.js:5511870:15:0)
    at doRun (UE4Game.js:5511927:7:0)
    at run/< (UE4Game.js:5511939:19:0)" UE4Game.js:11054

"DebugBreak() called!
    at __ZN4FMsg4LogfEPKciRK5FNameN13ELogVerbosity4TypeEPKwz (UE4Game.js:3425129:4:0)
    at __ZN6FDebug12AssertFailedEPKcS1_iPKwz (UE4Game.js:3218668:3:0)
    at __ZN11FEngineLoop4InitEv (UE4Game.js:3342182:3:0)
    at __Z10HTML5_Initv (UE4Game.js:4494393:2:0)
    at _main (UE4Game.js:4378054:2:0)
    at callMain (UE4Game.js:5511870:15:0)
    at doRun (UE4Game.js:5511927:7:0)
    at run/< (UE4Game.js:5511939:19:0)" UE4Game.js:11054

70 htmltest.html:177
uncaught exception: abort() at stackTrace@http://localhost/SC/engine/UE4Game.js:1043:15
abort@http://localhost/SC/engine/UE4Game.js:5511979:25
b70@http://localhost/SC/engine/UE4Game.js:5499445:2
__ZN4FMsg4LogfEPKciRK5FNameN13ELogVerbosity4TypeEPKwz [FMsg::Logf?1(char*, int, FName?N?&)]@http://localhost/SC/engine/UE4Game.js:3425131:4
__ZN6FDebug12AssertFailedEPKcS1_iPKwz [FDebug::AssertFailed?S(char*)]@http://localhost/SC/engine/UE4Game.js:3218668:3
__ZN11FEngineLoop4InitEv [FEngineLoop::Init()]@http://localhost/SC/engine/UE4Game.js:3342182:3
__Z10HTML5_Initv [HTML5_Init()]@http://localhost/SC/engine/UE4Game.js:4494393:2
_main@http://localhost/SC/engine/UE4Game.js:4378054:2
callMain@http://localhost/SC/engine/UE4Game.js:5511870:15
doRun@http://localhost/SC/engine/UE4Game.js:5511927:7
run/<@http://localhost/SC/engine/UE4Game.js:5511939:19

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

Thanks in advance

i couldnt get it to work from my hd, only from a real server on the interwebs.
there was something people were using (running through or something) somewhere in answers but i cant find it now.

Build Game for HTML5

I’m getting stuck at the “Build game for HTML5” task in the Game Launcher.

I’ve followed the recommended steps (although I’m using 4.3 not release) and have installed the required and optional files. I’ve rebuilt UE4 and UE4FrontendLauncher. Currently using Emscripten 1.16.

here’s the launcher.log



UnrealBuildTool: [157/162] python.exe cxa_demangle.cpp
UnrealBuildTool: CRITICAL root: The JavaScript shell used for compiling (C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/node.exe) does not seem to work, check the paths in ~/.emscripten
UnrealBuildTool: CRITICAL root: The JavaScript shell used for compiling (C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/node.exe) does not seem to work, check the paths in ~/.emscripten
UnrealBuildTool: WARNING  root: cannot check node version: invalid literal for int() with base 10: 'Node Commands/r/n/r/nSyntax:/r/n    node {operator} [options] [arguments]/r/n/r/nParameters:/r/n        /? or /help   - Display this help message'
UnrealBuildTool: INFO     root: (Emscripten: Running sanity checks)
UnrealBuildTool: CRITICAL root: The JavaScript shell used for compiling (C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/node.exe) does not seem to work, check the paths in ~/.emscripten
UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: D:\GitHub\Unreal4\Engine\Binaries\HTML5\UE4Game.js
UnrealBuildTool: Cumulative action seconds (12 processors): 0.00 building projects, 99.18 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
UnrealBuildTool: UBT execution time: 16.26 seconds
CommandUtils.Run: Run: Took 16.4159389s to run UnrealBuildTool.exe
BuildCommand.Execute: ERROR: BUILD FAILED
Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:2): D:\GitHub\Unreal4\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game HTML5 Development   -noxge. See logfile for details: 'UnrealBuildTool.txt' 
Stacktrace:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\ProcessUtils.cs:line 775
   at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\UBTUtils.cs:line 29
   at AutomationTool.UE4Build.BuildWithUBT(String ProjectName, String TargetName, UnrealTargetPlatform TargetPlatform, String Config, String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\UE4Build.cs:line 321
   at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InForceNonUnity, Boolean InForceUnity) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\UE4Build.cs:line 1273
   at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Scripts\BuildProjectCommand.Automation.cs:line 111
   at BuildCookRun.DoBuildCookRun(ProjectParams Params) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 235
   at BuildCommand.Execute() in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\BuildCommand.cs:line 37
   at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Automation.cs:line 362
   at AutomationTool.Automation.Process(String] CommandLine) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Automation.cs:line 330
   at AutomationTool.Program.MainProc(Object Param) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Program.cs:line 99
   at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param) in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Utils.cs:line 610
   at AutomationTool.Program.Main() in d:\GitHub\Unreal4\Engine\Source\Programs\AutomationTool\Program.cs:line 50
Program.Main: ERROR: Command failed (Result:2): D:\GitHub\Unreal4\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game HTML5 Development   -noxge. See logfile for details: 'UnrealBuildTool.txt' 
ProcessManager.KillAll: Trying to kill 0 spawned processes.
Program.Main: AutomationTool exiting with ExitCode=1
Domain_ProcessExit
ProcessManager.KillAll: Trying to kill 0 spawned processes.
AutomationToolLauncher exiting with ExitCode=1
copying UAT log files...
RunUAT.bat ERROR: AutomationTool was unable to run successfully.


And the UnrealBuildTool.txt



[157/162] python.exe cxa_demangle.cpp
CRITICAL root: The JavaScript shell used for compiling (C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/node.exe) does not seem to work, check the paths in ~/.emscripten
CRITICAL root: The JavaScript shell used for compiling (C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/node.exe) does not seem to work, check the paths in ~/.emscripten
WARNING  root: cannot check node version: invalid literal for int() with base 10: 'Node Commands/r/n/r/nSyntax:/r/n    node {operator} [options] [arguments]/r/n/r/nParameters:/r/n        /? or /help   - Display this help message'
INFO     root: (Emscripten: Running sanity checks)
CRITICAL root: The JavaScript shell used for compiling (C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/node.exe) does not seem to work, check the paths in ~/.emscripten
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: D:\GitHub\Unreal4\Engine\Binaries\HTML5\UE4Game.js
Cumulative action seconds (12 processors): 0.00 building projects, 99.18 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
UBT execution time: 16.26 seconds



From the error logs, I’d guess it’s related to Emscipten. I’ve double and triple-checked my environment variables so I know everything is good there.

Any help in this matter would be greatly appreciated.

Managed to solve this by using the Emscripten command prompt.


emsdk activate latest

the .emscripton file in my home was not set correctly, even though my environment variable name / path all looked right.