Cannot package c++ plugin due to missing .emscripten file

Hello,

I’m trying to package a c++ plugin that I created but the process fails due to a missing .emscripten file as shown in the log below:

UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Performing full C++ include scan (building a new target)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Creating makefile for UE4Game (no existing makefile)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: NDK version: 19, GccVersion: 4.9
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: building WITHOUT VULKAN define
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Vulkan SDK is installed, but the project disabled Vulkan (bSupportsVulkan setting in Engine). Disabling Vulkan RHI for Android
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Compiling Native code with NDK API 'android-19'
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Performing 5 actions (4 in parallel)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: [3/5] clang++.exe CppTimelinePlugin.generated.cpp [armv7-es2]
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: [2/5] clang++.exe Module.CppTimelinePlugin.cpp [armv7-es2]
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: [1/5] clang++.exe UELinkerFixupsName.h [armv7-es2]
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: [4/5] clang++.exe UELinkerFixups.cpp [armv7-es2]
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: [5/5] arm-linux-androideabi-ar.exe UE4-CppTimelinePlugin-Android-Shipping-armv7-es2.a
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: I:\\android-ndk-r11c\toolchains/arm-linux-androideabi-4.9\prebuilt/windows-x86_64\bin/arm-linux-androideabi-ar.exe: creating I:/Plugins/CppTimelinePlugin/HostProject/Plugins/CppTimelinePlugin/Binaries/Android/UE4-CppTimelinePlugin-Android-Shipping-armv7-es2.a
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Total build time: 21.45 seconds
UATHelper: Package Plugin Task (Windows): CommandUtils.Run: Run: Took 21.5945129s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Package Plugin Task (Windows): CommandUtils.Run: Run: I:\Epic Games\4.13\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game HTML5 Development -project="I:\Plugins\CppTimelinePlugin\HostProject\HostProject.uproject"  -module CppTimelinePlugin -receipt I:\Plugins\CppTimelinePlugin\HostProject\Plugins\CppTimelinePlugin\Binaries\HTML5\UE4Game.target -
NoHotReload -ignorejunk
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Performing full C++ include scan (building a new target)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Creating makefile for UE4Game (no existing makefile)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Parsing headers for UE4Game
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:   Running UnrealHeaderTool "I:\Plugins\CppTimelinePlugin\HostProject\HostProject.uproject" "I:\Plugins\CppTimelinePlugin\HostProject\Intermediate\Build\HTML5\UE4Game\Development\UE4Game.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installe
d
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Reflection code generated for UE4Game in 4.100054 seconds
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: Setting Emscripten SDK 
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: ERROR: System.IO.FileNotFoundException: Could not find file ''.
UATHelper: Package Plugin Task (Windows): UnrealBuildTool: File name: ''
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at UnrealBuildTool.HTML5SDKInfo.SetUpEmscriptenConfigFile()
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at UnrealBuildTool.HTML5ToolChain.PreBuildSync()
UATHelper: Package Plugin Task (Windows): UnrealBuildTool:    at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments, FileReference ProjectFile)
UATHelper: Package Plugin Task (Windows): CommandUtils.Run: Run: Took 10.172504s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Package Plugin Task (Windows): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): I:\Epic Games\4.13\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game HTML5 Development -project="I:\Plugins\CppTi
UATHelper: Package Plugin Task (Windows): melinePlugin\HostProject\HostProject.uproject"  -module CppTimelinePlugin -receipt I:\Plugins\CppTimelinePlugin\HostProject\Plugins\CppTimelinePlugin\Binaries\HTML5\UE4Game.target -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.10.31-16.26.22.txt' 
UATHelper: Package Plugin Task (Windows):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Package Plugin Task (Windows):    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Package Plugin Task (Windows):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
UATHelper: Package Plugin Task (Windows):    at BuildPlugin.CompilePluginWithUBT(FileReference HostProjectFile, FileReference HostProjectPluginFile, PluginDescriptor Plugin, String TargetName, TargetType TargetType, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, List`1 ReceiptFileNames, String InAdditionalArgs)
UATHelper: Package Plugin Task (Windows):    at BuildPlugin.CompilePlugin(FileReference HostProjectFile, FileReference HostProjectPluginFile, PluginDescriptor Plugin, List`1 HostPlatforms, List`1 TargetPlatforms, String AdditionalArgs)
UATHelper: Package Plugin Task (Windows):    at BuildPlugin.ExecuteBuild()
UATHelper: Package Plugin Task (Windows):    at AutomationTool.BuildCommand.Execute()
UATHelper: Package Plugin Task (Windows):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
UATHelper: Package Plugin Task (Windows):    at AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Package Plugin Task (Windows):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Package Plugin Task (Windows):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Package Plugin Task (Windows):    at AutomationTool.Program.Main()
UATHelper: Package Plugin Task (Windows): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Package Plugin Task (Windows): BUILD FAILED

After installing emscripten, here is a list of things I’ve tried:

  • [Could not build for html5][1]
  • [Emscripten sdk found but of unexpected version][2]
  • [Could not find .emscripten file][3]
  • Deleting the Intermediate folder of my project and generating files again through the .uproject file
  • Installing the latest version of python
  • Made sure I included the HTML5 binaries in the engine installation options
  • Verifying the installation of my engine

Moreover, I noticed that in some screenshots in the previous posts the HTML5 sdk option contains SDK Paths while my editor doesn’t:

Could you provide some info on how to fix this issue and package my plugin?

Thank you in advance,

Orfeas

Orfeas El.,

Could you please upload your full error output logs?

Thanks!

Hello,

[Here][1] is the complete log of the build.

-Orfeas

Failed Package plugin log - Pastebin.com

Do you have any Marketplace Plugins installed on your Engine?

Just the substance plugin.

Edit: I’ve disabled substance and trying to package again.

Edit 2: The same log occurs again.

-Orfeas

Disable the substance plugin and delete your Intermediate and Saved folders and then try again. Provide me the logs after you’ve done that, to see if it changes.

Thanks!

[Here][1] is the output log

-Orfeas

Disabled substance (intermediate and saved folders deleted) - Pastebin.com

Could you try to delete the I:\Epic Games\4.13\Engine*Intermediate\Build\HTML5.emscripten* folder from your Engine? (only the bold part) Then go ahead and re-verify your version of the engine and try to package again, upload those logs as well.

Also, let me know whether or not you’re using a Source or Binary version of the engine.

Thanks!

Hello again,

I’ve tried your suggestion and the same error [occurs][1].

Moreover, I deleted the entire version of the engine and re-downloaded it through the launcher but again, the result is the [same][2].

I’m using the Binary version of the engine.

Thank you again,
-Orfeas

Package build log after re-verify - Pastebin.com
[2]: Package build log fresh install - Pastebin.com

Try removing the HTML5 target from the project you’re trying to package. The plugin should compile.

Hello, just to clarify, I’m trying to package a plugin that I have created and not my game.

I disabled the HTML5 option and I’ve tried to package my plugin again but the same error [occurs][1].

I’m not sure if this means something, but when navigating to the export folder, inside the Intermediate->Build sub-folder, a folder named HTML5 has been created. Is there a that the export process works fine but a “false” error to occur?

Thank you in advance,

-Orfeas

Disabled HTML5 package option - Pastebin.com

I see “Could not find file '” error message - This can be caused by having HOME environment variable. If you have one, try deleting it and see that makes a difference.