Emscripten compile error, missing file

Current installation UE 4.11 does not create an .emscripten file under required folder (C:\Program Files\Epic Games\4.10\Engine\Intermediate\Build\HTML5). This causes the packaging to crash on start. Also, any existing file with the same name gets deleted.

Is there a way to solve this problem before a hotfix, as this is a breaking issure?

MainFrameActions: Packaging (HTML5): UnrealBuildTool: Setting Emscripten SDK 
MainFrameActions: Packaging (HTML5): UnrealBuildTool: ERROR: System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Epic Games\4.11\Engine\Intermediate\Build\HTML5\.emscripten'.
MainFrameActions: Packaging (HTML5): UnrealBuildTool: File name: 'C:\Program Files\Epic Games\4.11\Engine\Intermediate\Build\HTML5\.emscripten'
MainFrameActions: Packaging (HTML5): UnrealBuildTool:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
MainFrameActions: Packaging (HTML5): 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)
MainFrameActions: Packaging (HTML5): 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)
MainFrameActions: Packaging (HTML5): UnrealBuildTool:    at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
MainFrameActions: Packaging (HTML5): UnrealBuildTool:    at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
MainFrameActions: Packaging (HTML5): UnrealBuildTool:    at UnrealBuildTool.HTML5SDKInfo.SetUpEmscriptenConfigFile()
MainFrameActions: Packaging (HTML5): UnrealBuildTool:    at UnrealBuildTool.HTML5ToolChain.PreBuildSync()
MainFrameActions: Packaging (HTML5): UnrealBuildTool:    at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments, FileReference ProjectFile)
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: Took 10,8770336s to run UnrealBuildTool.exe, ExitCode=5

creating the file by hand and marking it as read only also causes a problem with UE4: ERROR: System.UnauthorizedAccessException: Access to the path 'C:\Program Files\Epic Games\4.11\Engine\Intermediate\Build\HTML5\.emscripten' is denied.

error also appear on newly created projects.

I wrote a simple app to keep .emscripten where it should be (auto creating file if deleted). So I can export packages.

However from time to time I see this error appear, after compiling and cooking finishes:

MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: [2016.04.01-13.33.23:500][  0]LogOutputDevice:Error: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: begin: stack for UAT
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: [2016.04.01-13.33.23:500][  0]LogWindows:Error: === Critical error: ===
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: Assertion failed: !Object->IsUnreachable() [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectHash.cpp] [Line: 423] 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: ChildActorComponent /Game/Packages/Proxify.Proxify_C:ChildActorComponent_0
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: [2016.04.01-13.33.23:500][  0]LogOutputDevice:Error: 
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: end: stack for UAT
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: [2016.04.01-13.33.23:587][  0]LogPhysics:Warning: PHYSX: ..\..\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: [2016.04.01-13.33.23:588][  0]LogPhysics:Warning: PHYSX: ..\..\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: Took 115,2905983s to run UE4Editor-Cmd.exe, ExitCode=3
MainFrameActions: Packaging (HTML5): Project.Cook: Cook failed. Deleting cooked data.

Error disappears after I restart UE 4.11

another html export error… this one also does not appear always.
enable “cook everyting”, and “generate pak” files.

in some cases, builder cannot delete the previous pak files and throws this error:

MainFrameActions: Packaging (HTML5): UE4Editor-Cmd: Execution of commandlet took:  55.35 seconds
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: Took 58,9368525s to run UE4Editor-Cmd.exe, ExitCode=0
MainFrameActions: Packaging (HTML5): Project.Cook: ********** COOK COMMAND COMPLETED **********
MainFrameActions: Packaging (HTML5): Project.CopyBuildToStagingDirectory: ********** STAGE COMMAND STARTED **********
MainFrameActions: Packaging (HTML5): Project.WriteStageCommandline: Creating UE4CommandLine.txt
MainFrameActions: Packaging (HTML5): Project.CreateStagingManifest: Creating Staging Manifest...
MainFrameActions: Packaging (HTML5): Project.CleanStagingDirectory: Cleaning Stage Directory: D:\ExpoKid\Saved\StagedBuilds\HTML5
MainFrameActions: Packaging (HTML5): Project.CopyManifestFilesToStageDir: Copying NonUFSFiles to staging directory: D:\ExpoKid\Saved\StagedBuilds\HTML5
MainFrameActions: Packaging (HTML5): Project.CopyManifestFilesToStageDir: Copying UFSFiles to staging directory: D:\ExpoKid\Saved\StagedBuilds\HTML5
MainFrameActions: Packaging (HTML5): Project.CopyBuildToStagingDirectory: ********** STAGE COMMAND COMPLETED **********
MainFrameActions: Packaging (HTML5): Project.Package: ********** PACKAGE COMMAND STARTED **********
MainFrameActions: Packaging (HTML5): HTML5Platform.Package: Package D:\ExpoKid\ExpoKid.uproject
MainFrameActions: Packaging (HTML5): HTML5Platform.Package: Setting Emscripten SDK for packaging..
MainFrameActions: Packaging (HTML5): Program.Main: ERROR: AutomationTool terminated with exception: System.IO.IOException: The directory is not empty.
MainFrameActions: Packaging (HTML5):    at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
MainFrameActions: Packaging (HTML5):    a
MainFrameActions: Packaging (HTML5): t System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
MainFrameActions: Packaging (HTML5):    at HTMLPakAutomation..ctor(ProjectParams InParam, DeploymentContext InSC)
MainFrameActions: Packaging (HTML5):    at HTML5Platform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
MainFrameActions: Packaging (HTML5):    at Project.Package(ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (HTML5):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (HTML5):    at AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (HTML5):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (HTML5):    at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (HTML5):    at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (HTML5):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (HTML5):    at AutomationTool.Program.Main()
MainFrameActions: Packaging (HTML5): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
MainFrameActions: Packaging (HTML5): Domain_ProcessExit
MainFrameActions: Packaging (HTML5): copying UAT log files...
MainFrameActions: Packaging (HTML5): BUILD FAILED

,

Thank you for bringing these issues to our attention. I have attempted to package a blueprint blank template with starter content on 4.11. I did not encounter any of the errors you have provided. Could you please explain exactly what you’re doing and also include the full output error logs as a .txt file?

Thanks!

Hey ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!

hi …

i’m reoppening the post.
sorry for this late late reply, but the error is still ongoing with the lates 4.12 version. I’ve uploaded a project to [https://github.com//ue4-v12-emcc-bug][1] for checking. This project is a simple top-down with simple object modifications made in editor and nothing more. Yet I’m still having this error:

ERROR: System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\HTML5\.emscripten'.

The project was created in 4.10.4 and upgraded to 4.12.4.

https://github.com//ue4-v12-emcc-bug

,

Emscripten should be set up by default with your version of the engine 4.12.4.

I packaged your project without the json plugin that you have attached to your project. Have you tried deactivating it and seeing whether or not that allowed you to package for HTML5?

Are your browsers showing up when you click on the downward arrow beside launch for launching onto a browser?

hi ,

json plugin has no effect on the situation, disabled or not. I’m able the produce the error on all windows machines on this floor (currently there are 6 only I have the json plugin installed to engine).

i think the problem shows itself if multiple engines are installed on the same machine.

as 4.9 needed emcc installed seperately, most of the pcs also had a 1.30 installed on somewhere, however uninstalling the rogue emscripten did not solve the problem either.

after installing 4.10, 4.11 it might be possible that 4.12 does not like this much emccs around and might be conjuring up some wrong directory for writing/reading what needs to be created/read.

in short, nothing gets compiled or cooked, cannot write/read .emscripten error appears and command ends.

I’m adding another log for Microsoft’s process monitor. You can see what is going on here. There is no write command for the .emscripten file, only delete and read.

[Process Monitor Log File][1]

[You can download process monitor from ms’s this link][2].

97660-logfile.rar (4.72 MB)
[2]: Process Monitor - Sysinternals | Microsoft Learn

While looking at the process details of UnrealBuildTool.exe I found this line:

EM_CONFIG=C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\HTML5\.emscripten

and EM_CONFIG location is specified system environments. Removing the environment variable solved the file creation problem. However, another emcc compile error appears now, which I think needs its own bug report.

Have you tried deleting your Intermediate file and seeing if that resolves all issues combined? As a test, I deleted mine and made sure I could still package without any issues - all went well.

Looking forward to hearing back from you. :slight_smile:

I also have this issue. I wanted to package an HTML5 demo of my marketplace plugin, but I can’t even build the plugin for HTML5. Using the automation tool with the BuildPlugin command fails with the exact same missing .emscripten file error. My plugin and associated project build and package fine for all other platforms.

i’m having the issue even with an empty project, on a newly formatted machine…

the error has changed for me. i’m opening a new bug report for it.

for emscripten config file error, please install multiple engines on a new machine, start a project on an older one, convert to new and try again.

Could you please upload the new logs or provide me a link to your new bug report? I didn’t see one in the system when I checked.

Thanks!

I deleted that bug report. After posting the report, I found that it was being caused by a marketplace plugin, not UE4. Thanks :slight_smile: