Windows 64 packaging succeeds, but 32 bit and HTML5 fails

I’ve tried to google it for a while now, but haven’t found any solutions that work for me.

HTML5 Packaging Log

I see there are a lot of warnings about some BINARYEN, and an assert failure claiming “–separate-asm requires building to HTML”, but googling it have left me no wiser.

Windows 32-bit Packaging Log

This one just as a long expception message that I can’t really decipher. Googling the entire string obviously doesn’t work, and I can’t find any significant part of it that answers what the problem is either.

And here’s the log for the successful build, if that helps.

Windows 64-bit Packaging Log

EDIT:
It’s also worth mentioning that I can package for these platform with a fresh, blank C++ project. It’s only after I start adding content and classes that these issues show themselves. It’s happened in another project too, so I might be doing something codewise that’s ignored for Windows 64, but not for other platforms.

Same problem for me, anyone has got solution ?

I found the source of the HTML5 issue.

I did eventually manage to update the emscripten version to 1.37.16, all I needed was to restart my computer after I’d updated the version and the environment variables through the Emscripten Command Prompt with these commands:

emsdk update
emsdk install latest
emsdk activate latest --global

However, this was not the issue. Even when using 1.37.16, it failed to package. It did get rid of the “BINARYEN” warnings, but it still found an error when it got to the main project CPP compilation.

What I did notice was that when I launched the project, I got the warning about “Class None” not being a valid class. This error turned out to come from the fact that the engine had no tutorial set, and this was what prevented me from packaging for HTML5. By going to Tutorials under the “Engine” tab in the Project Settings and setting the tutorial to EditorTutorial rather than None, I fixed the issue and am now able to package for HTML5.

I still can’t package for Windows 32 however, and I noticed that I can’t even package a blank template project for windows 32. Given that the two issues are not related, I have decided to resolve this question and separate the Windows 32 issue to a new question.

For anyone who finds this later looking for a solution to the Windows 32 issue, hopefully my other question will have been resolved by then. You can go here to see if it has:

Okay ! I found it, it’s due to Emscripten version used bu UE4. Make sure to use an updated version of Emscripten and choose 1.37.16 version of it when compiling project.

Could you give me a walkthrough on how to do that? I already tried downloading and installing another emscripten version but even though I have 1.37.16 installed UE4 keeps using the 1.35.0 version to compile. How do I make it use 1.37.16?

Basically you have to use UE 4.16 or newer, and specify the EMSDK environment variable before launching UE4 editor. In the original comment Mars- achieves this by using the --global specifier in emsdk activate (emsdk activate latest --global), which writes the EMSDK environment variable to global system registry for all users. After that try rebooting, then open a new command prompt, and type “set EMSDK”, which should show up the location of your Emscripten SDK directory. That should be enough to route UE4 to pick up your own Emscripten compiler version.

The support for customizing Emsdk location like this was added to UE 4.16, it was not yet present in UE 4.15.