- Home /
Failed building WebGL Player
I get this message every time try to deploy for WebGL, even in a new clean project.
Any idea how to fix this problem?
Failed running python "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc" @"/Users/Diego/Test_unity/Assets/../Temp/emcc_arguments.resp"
stdout: stderr: Traceback (most recent call last): File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emscripten.py", line 1504, in _main(environ=os.environ) File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emscripten.py", line 1492, in _main temp_files.run_and_clean(lambda: main( File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/tempfiles.py", line 39, in run_and_clean return func() File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emscripten.py", line 1500, in DEBUG_CACHE=DEBUG_CACHE, File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emscripten.py", line 1384, in main shared.Building.ensure_struct_info(struct_info) File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/shared.py", line 1716, in ensure_struct_info import gen_struct_info File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/gen_struct_info.py", line 78, in import sys, os, re, json, argparse, tempfile, subprocess ImportError: No module named argparse
/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/js-optimizer.js:1844 default: throw 'whaa?'; ^ whaa? Traceback (most recent call last): File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc", line 1452, in flush_js_optimizer_queue() File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc", line 1364, in flush_js_optimizer_queue final = shared.Building.js_optimizer(final, js_optimizer_queue, jcache, debug_level >= 4, js_optimizer_extra_info) File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/shared.py", line 1592, in js_optimizer return js_optimizer.run(filename, passes, listify(NODE_JS), jcache, debug, extra_info) File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/js_optimizer.py", line 375, in run return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info)) File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/tempfiles.py", line 39, in run_and_clean return func() File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/js_optimizer.py", line 375, in return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info)) File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/js_optimizer.py", line 289, in run_on_js filenames = [run_on_chunk(command) for command in commands] File "/Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/js_optimizer.py", line 92, in run_on_chunk assert len(output) > 0 and not output.startswith('Assertion failed'), 'Error in js optimizer: ' + output AssertionError: Error in js optimizer:
UnityEditor.HostView:OnGUI()
Answer by Rotark · Mar 31, 2016 at 12:34 PM
Check this answer. I think it addresses what you were looking at, though I still sometimes get the error. I find removing and putting the build scenes back in helps. http://forum.unity3d.com/threads/failed-building-webgl-player.321433/