4.9 HTML Export... filename unknown

I had a great experience with html export with 4.8. Solving out the emcc and python needs was a mess, yet the exports were fine and had no problems after solving what is needed and how to install it.

I see that 4.9 comes with it’s own emcc (1.30) and is not using the system version. But when it comes to python, on OSX, I see that the installed framework version (2.7) is called. Does UE 4.9 has its own python or is this ok?

I’m unable to build ANY of my projects in 4.9. Something always messes up and at the end I get an “No such file or directory” error. Is there anything in this log that I’m missing? What should I check for solving this problem?

Thanks…

Here is the log from the project launcher:

Project.Build: ********** BUILD COMMAND STARTED **********
UE4Build.Build: XGE was requested, but is unavailable, so we won't use it.
UE4Build.Build: ************************* UE4Build:
UE4Build.Build: ************************* ForceMonolithic: False
UE4Build.Build: ************************* ForceNonUnity:False
UE4Build.Build: ************************* ForceDebugInfo: False
UE4Build.Build: ************************* UseXGE: False
UE4Build.Build: ************************* UseParallelExecutor: False
CommandUtils.Run: Run: mono "/Users/Shared/UnrealEngine/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe" TheMap HTML5 Development  "/Users/emrahgunduz/Google Drive/Live/Web/TheKid/unreal-engine/TheMap/TheMap.uproject"  -noxge -generatemanifest -rocket -nocreatestub -NoHotReloadFromIDE
CommandUtils.Run: Run: Took 1.962854s to run mono, ExitCode=0
UE4Build.PrepareManifest: Copied UBT manifest to /Users/emrahgunduz/Library/Logs/Unreal Engine/LocalBuildLogs/UBTManifest.33.xml
CommandUtils.Run: Run: mono "/Users/Shared/UnrealEngine/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe" TheMap HTML5 Development  "/Users/emrahgunduz/Google Drive/Live/Web/TheKid/unreal-engine/TheMap/TheMap.uproject"  -noxge -rocket -nocreatestub -NoHotReloadFromIDE -ignorejunk
mono: Setting Emscripten SDK
mono: Performing 1 actions (5 in parallel)
mono: [1/1] python TheMap.js
mono: INFO     root: e[32m(Emscripten: Running sanity checks)e[0m
mono: Traceback (most recent call last):
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/emcc", line 1579, in <module>
mono:     flush_js_optimizer_queue()
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/emcc", line 1479, in flush_js_optimizer_queue
mono:     run_passes(chunks[i], 'js_opts_' + str(i), just_split='receiveJSON' in chunks[i], just_concat='emitJSON' in chunks[i])
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/emcc", line 1449, in run_passes
mono:     final = shared.Building.js_optimizer(final, passes, jcache, debug_level >= 4, js_optimizer_extra_info, just_split=just_split, just_concat=just_concat)
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/shared.py", line 1697, in js_optimizer
mono:     ret = js_optimizer.run(filename, passes, NODE_JS, jcache, debug, extra_info, just_split, just_concat)
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/js_optimizer.py", line 560, in run
mono:     return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info, just_split, just_concat))
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/tempfiles.py", line 39, in run_and_clean
mono:     return func()
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/js_optimizer.py", line 560, in <lambda>
mono:     return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info, just_split, just_concat))
mono:   File "/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/js_optimizer.py", line 461, in run_on_js
mono:     filenames = pool.map(run_on_chunk, commands, chunksize=1)
mono:   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 251, in map
mono:     return self.map_async(func, iterable, chunksize).get()
mono:   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
mono:     raise self._value
mono: OSError: [Errno 2] No such file or directory
mono: -------- End Detailed Actions Stats -----------------------------------------------------------
mono: Total build time: 159.57 seconds
CommandUtils.Run: Run: Took 159.669066s to run mono, ExitCode=5
BuildCommand.Execute: ERROR: BUILD FAILED
Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in AutomationUtils.Automation: Command failed (Result:5): /Users/Shared/UnrealEngine/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe TheMap HTML5 Development  "/Users/emrahgunduz/Google Drive/Live/Web/TheKid/unreal-engine/TheMap/TheMap.uproject"  -noxge -rocket -nocreatestub -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool-2015.09.08-22.55.24.txt'
Stacktrace:   at AutomationTool.CommandUtils.RunAndLog (System.String App, System.String CommandLine, System.String Logfile, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in <filename unknown>:0
  at AutomationTool.CommandUtils.RunAndLog (AutomationTool.CommandEnvironment Env, System.String App, System.String CommandLine, System.String LogName, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in <filename unknown>:0
  at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String CommandLine, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in <filename unknown>:0
  at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String Project, System.String Target, System.String Platform, System.String Config, System.String AdditionalArgs, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in <filename unknown>:0
  at AutomationTool.UE4Build.BuildWithUBT (System.String ProjectName, System.String TargetName, UnrealTargetPlatform TargetPlatform, System.String Config, System.String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, System.String InAddArgs, Boolean ForceUnity, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in <filename unknown>:0
  at AutomationTool.UE4Build.Build (AutomationTool.BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, System.Collections.Generic.Dictionary`2 PlatformEnvVars) [0x00000] in <filename unknown>:0
  at Project.Build (BuildCommand Command, AutomationTool.ProjectParams Params, Int32 WorkingCL) [0x00000] in <filename unknown>:0
  at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in <filename unknown>:0
  at BuildCookRun.ExecuteBuild () [0x00000] in <filename unknown>:0
  at BuildCommand.Execute () [0x00000] in <filename unknown>:0
Program.Main: AutomationTool exiting with ExitCode=5
Domain_ProcessExit
RunUAT ERROR: AutomationTool was unable to run successfully.

Here is how to generate this bug:

  1. Create a new project in 4.9 (I choosed a side scrolling template, does not matter which one).

  2. Export to HTML, everything is fine, compiles perfectly and the game is runnable

  3. Create a C++ class, choose Blueprint function library for type

  4. 4.8 was recommending a restart for the editor at this point, 4.9 does not.

  5. Let’s continue… Close the editor, open project in xcode.

  6. Run the project, the editor opens without any build errors.

  7. Now export to HTML from Launch button, or package, or from project launcher, does not matter at this point.

  8. And, boom, filename unknown error appears.

  9. Close the editor and xcode

  10. Open project from .uproject file, not from xcode

  11. Export to html

  12. Same filename unknown error appears…

    LogPlayLevel: mono: INFO root: e[32m(Emscripten: Running sanity checks)e[0m
    LogPlayLevel: mono: Traceback (most recent call last):
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/emcc”, line 1579, in
    LogPlayLevel: mono: flush_js_optimizer_queue()
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/emcc”, line 1479, in flush_js_optimizer_queue
    LogPlayLevel: mono: run_passes(chunks[i], ‘js_opts_’ + str(i), just_split=‘receiveJSON’ in chunks[i], just_concat=‘emitJSON’ in chunks[i])
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/emcc”, line 1449, in run_passes
    LogPlayLevel: mono: final = shared.Building.js_optimizer(final, passes, jcache, debug_level >= 4, js_optimizer_extra_info, just_split=just_split, just_concat=just_concat)
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/shared.py”, line 1697, in js_optimizer
    LogPlayLevel: mono: ret = js_optimizer.run(filename, passes, NODE_JS, jcache, debug, extra_info, just_split, just_concat)
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/js_optimizer.py”, line 560, in run
    LogPlayLevel: mono: return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info, just_split, just_concat))
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/tempfiles.py”, line 39, in run_and_clean
    LogPlayLevel: mono: return func()
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/js_optimizer.py”, line 560, in
    LogPlayLevel: mono: return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info, just_split, just_concat))
    LogPlayLevel: mono: File “/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/js_optimizer.py”, line 461, in run_on_js
    LogPlayLevel: mono: filenames = pool.map(run_on_chunk, commands, chunksize=1)
    LogPlayLevel: mono: File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py”, line 251, in map
    LogPlayLevel: mono: return self.map_async(func, iterable, chunksize).get()
    LogPlayLevel: mono: File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py”, line 567, in get
    LogPlayLevel: mono: raise self._value
    LogPlayLevel: mono: OSError: [Errno 2] No such file or directory
    LogPlayLevel: mono: -------- End Detailed Actions Stats -----------------------------------------------------------
    LogPlayLevel: mono: ERROR: UBT ERROR: Failed to produce item: /Users/emrahgunduz/Documents/Unreal Projects/SideRollerTemp/Binaries/HTML5/SideRollerTemp.js
    LogPlayLevel: mono: Total build time: 391.87 seconds
    LogPlayLevel: CommandUtils.Run: Run: Took 392.096825s to run mono, ExitCode=5
    LogPlayLevel: BuildCommand.Execute: ERROR: BUILD FAILED
    LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception:
    LogPlayLevel: Program.Main: ERROR: Exception in AutomationUtils.Automation: Command failed (Result:5): /Users/Shared/UnrealEngine/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe SideRollerTemp HTML5 Development “/Users/emrahgunduz/Documents/Unreal Projects/SideRollerTemp/SideRollerTemp.uproject” -noxge -rocket -nocreatestub -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2015.09.09-17.16.24.txt’
    LogPlayLevel: Stacktrace: at AutomationTool.CommandUtils.RunAndLog (System.String App, System.String CommandLine, System.String Logfile, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
    LogPlayLevel: at AutomationTool.CommandUtils.RunAndLog (AutomationTool.CommandEnvironment Env, System.String App, System.String CommandLine, System.String LogName, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
    LogPlayLevel: at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String CommandLine, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
    LogPlayLevel: at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String Project, System.String Target, System.String Platform, System.String Config, System.String AdditionalArgs, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
    LogPlayLevel: at AutomationTool.UE4Build.BuildWithUBT (System.String ProjectName, System.String TargetName, UnrealTargetPlatform TargetPlatform, System.String Config, System.String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, System.String InAddArgs, Boolean ForceUnity, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
    LogPlayLevel: at AutomationTool.UE4Build.Build (AutomationTool.BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, System.Collections.Generic.Dictionary`2 PlatformEnvVars) [0x00000] in :0
    LogPlayLevel: at Project.Build (BuildCommand Command, AutomationTool.ProjectParams Params, Int32 WorkingCL) [0x00000] in :0
    LogPlayLevel: at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in :0
    LogPlayLevel: at BuildCookRun.ExecuteBuild () [0x00000] in :0
    LogPlayLevel: at BuildCommand.Execute () [0x00000] in :0
    LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=5
    LogPlayLevel: Domain_ProcessExit
    LogPlayLevel: Completed Launch On Stage: Build Task, Time: 395.539262
    LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully.
    PackagingResults:Error: Error Launch failed! Unknown Error

For more mystery, try hot reloading. Click the Compile button in editor. You’ll get a compiler error:

Info 
Info Running Mono...
Info 
Info Setting up Mono
Info /Users/Shared/UnrealEngine/4.9/Engine /Users/Shared/UnrealEngine/4.9/Engine/Binaries/Mac
Info Compiling game modules for hot reload
Info ERROR: System.ArgumentOutOfRangeException: < 0 || >= this.Length
Info Parameter name: startIndex
Info   at System.String.LastIndexOf (Char value, Int32 startIndex, Int32 count) [0x00000] in <filename unknown>:0
Info   at UnrealBuildTool.UnrealBuildTool.PatchActionHistoryForHotReloadAssembling (System.Collections.Generic.List`1 OnlyModules) [0x00000] in <filename unknown>:0
Info   at UnrealBuildTool.UnrealBuildTool.RunUBT (System.String[] Arguments) [0x00000] in <filename unknown>:0

After digging a lot (for at least 12 hours) in emscripten 1.30 in UE 4.9 and debugging the python files that are responsible for c to js, i found out that the 4.8 to 4.9 project convertion is a little broken.

After the upgrade, the required dylib files are not marked as non-usable or not deleted from the project. And 4.9 also thinks that the dylib is still usable. Even though the game starts to warn for some metadata mismacths, it is not able to detect that the main compiled game file is broken.

Uninstalling all engines on the system and just installing only 4.9 solved the problem and gave me a warning that UE4Editor-TheMap.dylib was either missing or incompatible. Rebuilding the dylib and dSYM files stopped file or folder not found errors, html export is a now working.

After project upgrade, Binaries folder must definitely be cleaned.

This error also appears on new 4.9 projects when a c++ class is created and hot plug is not able to compile the code correctly.

Also I found out that while the code is including all required files,
/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/Vorbis/libvorbis-1.3.2/lib/HTML5/libvorbisfile_Oz.bc

is asked as
/Users/Shared/UnrealEngine/4.9/Engine/Source/ThirdParty/Vorbis/libvorbis-1.3.2/Lib/HTML5/libvorbisfile_Oz.bc

The difference is the lib folder name. For osx users with case sensitive journal file systems this might cause a file not found error.