WebGL Build Error, Need Help Debugging

Hi everyone, I’m trying to port my Unity Web Player project over to WebGL, but I’m recieving two errors in the export process that I haven’t been able to figure out…

Build Error 1

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/Derrick/Gambit Games Dropbox/Dropbox/Scrum Hero Digital App/Scrum Hero Unity Project/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc"
@"C:\Temp\tmp120c6172.tmp"', CurrentDirectory='C:/Users/Derrick/Gambit Games Dropbox/Dropbox/Scrum Hero Digital App/Scrum Hero Unity Project/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:290)
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()

Build Error 2

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/Derrick/Gambit Games Dropbox/Dropbox/Scrum Hero Digital App/Scrum Hero Unity Project/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc"
@"C:\Temp\tmp120c6172.tmp"', CurrentDirectory='C:/Users/Derrick/Gambit Games Dropbox/Dropbox/Scrum Hero Digital App/Scrum Hero Unity Project/Assets/../Temp/EmscriptenWork'

Is there a recommended way to find out where/why WebGL builds fail when the error isn’t immediately obvious?

Make sure you clear the console window before building. I have found that when a WebGL build fails I usually see three error messages; and if I fix the problem and build again, one of them gets cleared before the build, but the other two stay there. Then even after the build succeeds, those error messages are still visible, there looking suspicious.

So make sure you hit “clear” before building.

Sokki: This is my first time working with the WebGL export option, and WebGL in general. My background is mostly web player, mobile, and desktop.

gfoot: I’ll double check this, that’s an interesting quirk that I didn’t know about. I believe my console log was clear before I began the build process (I tried multiple times with the same error, but it’s been a few days so maybe I didn’t hit “Clear”).

Building for WebGL will only work on 64bit.
Is the above build on a 64bit machine?

Please don’t solicit in posts where people are asking for specific help. It’s not fair to the people wanting help and has a very negative impact on your reputation.

1 Like

same errors. unity 5.0.0f4 64bit editor, win 8.1 64bit.
even on empty project

There was a patch release today with a bunch of IL2CPP fixes. Can you try again with the new patch?

1 Like

Not yet. I will try this today or in a few days and write in this thread if it’s help. Thanks

I’m on a 64-Bit machine, but when the opportunity comes around I’ll check out the patched release. Thanks for the notification Dustin.

Ok, I’m idiot. This patch help me with this errors, but now I have one new. My user folder have russian chars (cause I forget about my microsoft account is russian, and sign in :frowning: ) I think the error due to this

C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_FastComp_Win\llvm-link: C:/Users/����/AppData/Local/Unity/Editor/EmscriptenCache/libcxx.bc: error: Could not open input file: No mapping for the Unicode character exists in the target multi-byte code page

I guess this patсh solve problem in latin-named user folder, so thanks, Dustin. I try compile on different pc with correct named user folder in next week.

Yes, indeed, WebGL builds will fail when building on user or project names with non-ASCII characters on windows (this is a limitation of the emscripten toolchain). Unity 5.1 will add proper error message output for this so at least people won’t be clueless when this happens.

Hi guys, still getting this error in 5.1.3f1.

What is weird however is this exact project worked under 5.0 earlier. The break occurred after the 5.1 upgrade. Unfortunately I can’t provide the project (50+gb), unless you want it via DVD or something.

Quick update, the patch release 5.1.3p2 fixed this.