WebGl not build! Error :(

This error appears:
Unity Version: 2018.1.0f2(64bit)

"
Failed running “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe” “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc” @“E:\Desenvolvimento de Jogos\Unity\Plataforma RPi\Assets..\Temp\emcc_arguments.resp”

stdout:
stderr:WARNING:root:–separate-asm works best when compiling to HTML. otherwise, you must yourself load the ‘.asm.js’ file that is emitted separately, and must do so before loading the main '.js` file
warning: unexpected number of arguments 4 in call to ‘_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv’, should be 0
warning: unexpected number of arguments 4 in call to ‘_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv’, should be 0
warning: unexpected number of arguments 2 in call to ‘_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv’, should be 0
warning: unexpected number of arguments 3 in call to ‘_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv’, should be 0
LLVM ERROR: IO failure on output stream.
Traceback (most recent call last):
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc”, line 13, in
emcc.run()
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, line 1670, in run
final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py”, line 1757, in emscripten
call_emscripten(cmdline)
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py”, line 1842, in _main
temp_files.run_and_clean(lambda: main(
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py”, line 78, in run_and_clean
return func()
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py”, line 1847, in
DEBUG=DEBUG,
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py”, line 1748, in main
temp_files=temp_files, DEBUG=DEBUG)
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py”, line 91, in emscript
funcs, metadata, mem_init = get_and_parse_backend(infile, settings, temp_files, DEBUG)
File “C:\Program Files\Unity\Hub\Editor\2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py”, line 160, in get_and_parse_backend
backend_output = open(temp_js).read()
IOError: [Errno 2] No such file or directory: ‘E:\Desenvolvimento de Jogos\Unity\Plataforma RPi\Temp\EmscriptenTemp\tmpvizxcz.4.js’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)"

Complement:

"
Exception: Failed building WebGL Player.
UnityEditor.WebGL.ProgramUtils.StartProgramChecked (System.Diagnostics.ProcessStartInfo p) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:48)
UnityEditor.WebGL.WebGlBuildPostprocessor.EmscriptenLink (BuildPostProcessArgs args, Boolean wasmBuild, System.String sourceFiles, System.String sourceFilesHash) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:408)
UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:457)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:920)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:285)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)"

Did you figure this problem out? I’m experiencing it on linux

I have the same issue in 2018.2.2f1 but only when doing a development build. Would be great to find a solution so I can profile my game in a browser.

1 Like

I Have The Same Problem ,who can help us?

1 Like

Yep, same for me with 2018.2.3f1
Can’t make WebGL with Development flag without the following error (but can without Dev flag)

Failed running “C:\Program Files\Unity 2018.2.3\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe” “C:\Program Files\Unity 2018.2.3\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc” @“C:\Users\username\source\repos\ares-game-client-ng\Assets..\Temp\emcc_arguments.resp”
stdout:
stderr:WARNING:root:–separate-asm works best when compiling to HTML. Otherwise, you must yourself load the ‘.asm.js’ file that is emitted separately, and must do so before loading the main ‘.js’ file. [-Wseparate-asm]warning: unexpected number of arguments 2 in call to ‘_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv’, should be 0warning: unexpected number of arguments 4 in call to

EDIT :
So the only way we were able to get a Development WebGL build to succeed was to switch back to asm linker (in player settings), and in build settings → check use prebuilt engine (and dev flag). I also updated to 2018.2.5 and tested but had to use this same approach as well.

1 Like

A bit late here but I found out what the issue was for me.The issue was that I had references (that was not used) in code to deleted .jslib files. After removing the references I can make a developer build just fine.

3 Likes

Same with Unity 2018.2.13f1:

Failed running "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc" @"C:\Projects\Uphill Rush\Assets\..\Temp\emcc_arguments.resp"

stdout:
stderr:WARNING:root:--separate-asm works best when compiling to HTML. Otherwise, you must yourself load the '.asm.js' file that is emitted separately, and must do so before loading the main '.js' file. [-Wseparate-asm]warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 5 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 3 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0error: unresolved symbol: _showAlertViewAborting compilation due to previous errors | undefinedTraceback (most recent call last):  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc", line 10, in <module>    python_selector.run(__file__, profile=True)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\python_selector.py", line 43, in run    sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename))  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\python_selector.py", line 13, in run_by_import    return getattr(importlib.import_module(os.path.basename(filename)), main)()  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 1611, in run    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py", line 2009, in emscripten    call_emscripten(cmdline)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2340, in _main    temp_files.run_and_clean(lambda: main(  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py", line 93, in run_and_clean    return func()  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2345, in <lambda>    DEBUG=DEBUG,  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2251, in main    temp_files=temp_files, DEBUG=DEBUG)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 99, in emscript    glue, forwarded_data = compiler_glue(metadata, settings, libraries, compiler_engine, temp_files, DEBUG)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 226, in compiler_glue    glue, forwarded_data = compile_settings(compiler_engine, settings, libraries, temp_files)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 532, in compile_settings    cwd=path_from_root('src'), error_limit=300)  File "C:\Programs\Unity 2018.2.13f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\jsrun.py", line 132, in run_js    raise Exception('Expected the command ' + str(command) + ' to finish with return code ' + str(assert_returncode) + ', but it returned with code ' + str(proc.returncode) + ' instead! Output: ' + str(ret)[:error_limit])Exception: Expected the command ['C:/Programs/Unity 2018.2.13f1/Editor/Data\\Tools\\nodejs\\node.exe', '--stack_size=8192', '--max-old-space-size=4096', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\compiler.js', 'C:\\Users\\Comp\\AppData\\Local\\Temp\\tmpim8bga.txt', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Audio.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Cursor.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Eval.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\FileSystem.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Logging.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Profiler.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\SystemInfo.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\UnetWebSocket.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Video.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebCam.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebGL.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebRequest.js', 'C:\\Programs\\Unity 2018.2.13f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\library_pthread_stub.js'] to finish with return code 0, but it returned with code 1 instead! Output: // The Module object: Our interface to the outside world. We import// and export values on it. There are various ways Module can be used:// 1. Not defined. We create it here// 2. A function parameter, function(Module) { ..generated code.. }// 3. pre-run appended it, var Module = {}; ..generated 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Note that this happens not on the first build run. First couple of dev builds are built completely fine. But on the third+ it completely fails miserably.

I wonder if the py scripts are messing up themselves. Maybe clean Unity install will help.

This utterly ridiculous btw, as no code was changed / added during build tests, only options e.g. linker / dev / pre-built engine.

2 Likes

Same issue with 2018.3.2f1, same error message.

This happens with dev enabled + pre-built engine disabled. Sometimes dev build builts with pre-build engine enabled.

I’d recommend to strip the JavaScript libraries and the import to those functions (just mock them out with static functions instead of dll imports). I have seen similar errors when the C# Method imports does not align with the Javascript code and emscripten fails. However, just a guess.

1 Like

Is there a quick way to find all js libs in the project?

I don’t think I have any left. Maybe some third-party plugin adds them.

@VergilUa i’d simply search with the Explorer/Finder for *.js and *.jslib files.

And in your IDE search for

[DllImport("__Internal")]

However, obviously not only jslib functions are imported that way. Also check for any *.dll files used but not available on WebGL which are enabled on “all platforms” in and used. In this case I’d actually expect the error to happen way before emscripten runs, but you never know.

1 Like

No .js / .jslib files found. I guess it’s native plugin issue, because in our project we’re actually using some plugins for the android / ios.

Found out what was causing this - it was indeed native plugin “Mobile Native Popups” that was enabled on all platforms.

Jeez, I wish there was a message about such libs. Free asset store plugins are truly evil.

2 Likes

@VergilUa happy you were able to solve it!

In case you do not find any problem in plugin, please try to delete Library folder.

1 Like

There was the same error, probably a problem in the names of folders with Cyrillic.
In my case, it was necessary to change the folder with the user name, because Unity is located there: C:\Users*Name*\AppData\Local\Unity

2 Likes

Had a problem close to this but i used the letter ‘ø’ in the project name… changing it to ‘o’ solved it for me. (Just in case anyone else comes by with similar problem).

2 Likes

hey, were you able to fix this issue If yes then please guide how to fix it as i am having a hard time fixing it. plsss…

I am also experiencing this issue in 2020.1.0f1