Can't launch my HTML5 project online (Assertion failed, emscripten error? )(4.24.3)

Hi everyone.
Recently I tried to launch my project online. I successfully packaged it in HTML5 format.
And tested it with the HTML5LaunchHelper.exe on local host.
But my Chrome just showed the following error.

Uncaught RuntimeError: abort(Assertion failed: target_thread, at: C:\b\s\w\ir\k\install\emscripten\system\lib\pthread\library_pthread.c,464,do_emscripten_dispatch_to_thread). Build with -s ASSERTIONS=1 for more info

A first I thought it might be something wrong with my project. Maybe it is too large(350MB) or has wrong settings. But I tried an empty project and the same error occured.
So I guess maybe the reason is about my UE4 editor. ;(
**I saw the word ‘emscripten’ in the error. Does it means there’s something to do with Emscripten?
And what is the meaninng of ‘Build with -s ASSERTIONS=1 for more info’ ? Should I input this code somewhere?

Has anyone been there before and know how to solve it ? I lookforward so much for your help. Thannnnks!**


Some background information:
My computer is 64-bit and my browser is Chrome.
I’m now using the github revised version UE4 editor which support html5,NOT an official old one. (4.24.3-html5-1.39.18 branch)
(Sad that new official version editor doesn’t support HTML5 anymore.)…eprint-project

Dear Prahlad,
Thank you for your answer.
I do have two versions of UE4 Engine on my computer. A 4.23 and a 4.24.3 and my current project is on the newer one.
I successfully packaged my project on windows 64-bit (.exe) file.

Do you know how should I fix this problem? Really a headache…
Looking forward to your reply.

Best regards,

Make sure you package your project on development instead of shipping as shipping just don’t work.
You can add those command lines into "**UnrealEngine/Engine/Platforms/HTML5/Source/Programs/UnrealBuildTool/HTML5ToolChain.cs"**
You can sneak in

**Result += " -s ****ASSERTIONS=1****";**

into line:384or any other parameter and modify 370 line to increase maximum memory, I think it breaks above 2gb im not sure. You will have to build **UnrealBuildTool again **for the setting to update.
Also make sure you open console (f12) to find more clues as to what went wrong.
Make sure models don’t have more than 64k vertexes as it is the limit for mobile platform.
The memory in browser is the size of all the game + the RAM the game actually uses.
Visit…ntation/issues to find others with same problems.

Also your problem has something to do with multithreading. Check HTML5 under project settings.

Hi ZeuslT,
Thank you so much for your suggestions. That’s very detailed.
I’m now trying it on.
Here I open the HTML5ToolChain.cs
Should I** replace******line 384 with

******Result += " -s ****ASSERTIONS=1****";**

Or**** add ****it after the original code?( I guess it is the former)

****May I ask what code should I input for increase memory? ****Please forgive me for unfamiliar with programming.

You also mentioned multithreading. Do you meanthe following package settings? I’ve read some tutorial and already enabled this.2020-10-06 143522.png

And one last question:

By this do you mean each mesh should limit within 64k or the whole model?

Best regards,

1 Like

If you read the code, it does “if” statement of “enable multithreading” you can insert your custom command line after the whole if/else so it would work no matter what, which should be line 367 for you. It seems your file and one on github don’t match so line numbers I gave don’t either.

You can change

Result += " -s WASM_MEM_MAX=600MB";


Result += " -s TOTAL_MEMORY=600MB";

to increase max memory.

Yes that is the multithreading setting, but I only mentioned that the error you were getting is connected to that, disabling it might give you more leads on how to fix your issue.

Each mesh shouldn’t have more vertexes than 64k. For example you can have a blueprint with multiple <64k vertex meshes.

1 Like

Hi ZeusLT, I have very big size of HTML5 package above 2 GB, the question is, is it feasible to use a dedicated server for html5 to overcome the load of file size or any problem dur player (download or lag etc) does it make sense at all? thanx