I am having some Emscripten compiling errors, could somebody help me with this

I am trying to compile my game to WebGL and I’m getting some crazy errors

Here is the errors, could anyone assist me with this?:

Error building Player: Win32Exception: ApplicationName='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe"', CommandLine='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Users/Zandre/SkyDrive/Documents/Private/LevLaCo Game/Game/Code/LevLaco_Platformer/LevLaco_Platformer/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\Users\Zandre\AppData\Local\Temp	mp498e2980.tmp"', CurrentDirectory='C:/Users/Zandre/SkyDrive/Documents/Private/LevLaCo Game/Game/Code/LevLaco_Platformer/LevLaco_Platformer/Assets/../Temp/EmscriptenWork'

And

Win32Exception: ApplicationName='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe"', CommandLine='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Users/Zandre/SkyDrive/Documents/Private/LevLaCo Game/Game/Code/LevLaco_Platformer/LevLaco_Platformer/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\Users\Zandre\AppData\Local\Temp	mp498e2980.tmp"', CurrentDirectory='C:/Users/Zandre/SkyDrive/Documents/Private/LevLaCo Game/Game/Code/LevLaco_Platformer/LevLaco_Platformer/Assets/../Temp/EmscriptenWork'
System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start ()
(wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:33)
NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:42)
NativeCompiler.Execute (System.String arguments, System.String compilerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.LinkObjects (IEnumerable`1 sources, System.String outfile)
UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.MultiThreadedCompile (System.String outfile, IEnumerable`1 sources, IEnumerable`1 includePaths, Boolean exceptionSupport)
UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.CompileDynamicLibrary (System.String outFile, IEnumerable`1 sources, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:304)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()

I will be eternally grateful if someone can help me solve this!

Unity is running python.exe as part of the post process build event.

python.exe fails.

Error building Player: Win32Exception

That’s the error. The rest is just the callstack to the error.

You could get more information from Windows with some tools that log exceptions, although I can’t remember what it’s called at the moment (EDIT: Process Explorer - IIRC you can monitor and filter events from a specific application - choose python.exe and try building again. It should list errors toward the end of the log). Perhaps it’s a file permission thing or something silly like that. You could also try running python.exe with the same arguments from a command window (WIN + R, cmd, enter) and see if you get more information.

Try running this and see if anything pops out…

cd "C:/Users/Zandre/SkyDrive/Documents/Private/LevLaCo Game/Game/Code/LevLaco_Platformer/LevLaco_Platformer/Assets/../Temp/EmscriptenWork"

"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Users/Zandre/SkyDrive/Documents/Private/LevLaCo Game/Game/Code/LevLaco_Platformer/LevLaco_Platformer/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\Users\Zandre\AppData\Local\Temp	mp498e2980.tmp"

If you want to get an overview, let’s replace the paths with something short (this won’t run, its just to give you some clarity).

cd C:/.../EmscriptenWork
python.exe emcc -Oz -s NO_EXIT_RUNTIME=1 -o UserAssembly.bc @"tmp498e2980.tmp"

I don’t know what the at-sign does on that string. Perhaps it’s part of the shell (well I would assume it is), but I don’t know more.

To understand what python will do, consult the python manual and figure out what -Oz -s and -o means. My guess is that it’s something like optimization level, setting a define and defining output file.