WebGL builds still fail ~25% of the time, requiring a full restart

I’ve updated to Unity 5.5.1f1, and the issues with WebGL builds still persist:

  • Builds often lock up my entire PC, I can’t really do anything productive for the 5-7 minutes it takes

  • 25% of the time, the build fails with an “IL2CPP.exe failed to execute properly” error

  • After it happens once, I have to restart my computer, and re-setup my environment, clear the il2cpp cache, and re-do the build. taking a good 10 minutes to get that going

So, if I need to fix an issue that shows up in my webGL build, and not the editor, I’m look at, on average 8.5 minutes a build. This is insane.

In the 25% of the time an error occurs, do you see any other information about the source of the error in the Editor.log file? There might be more details there about the cause of the problem.

Nothing beyond what shows up in the editor console. It usually comes down to an emscripten failure, but usually it’s a different error every time. I’ll post next time it comes up.

Failed running C:\Program Files\Unity 5 f4\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-stacktrace --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform=“WebGL” --architecture=“EmscriptenJavaScript” --configuration=“Release” --outputpath=“D:\NA Fountains\NA\NE Unity\NE\Assets /…/Temp/StagingArea/Data\Native\build.js” --cachedirectory=“D:\NA Fountains\NA\NE Unity\NE\Assets..\Library/il2cpp_cache” --compiler-flags=“-Oz” --linker-flags=“-s PRECISE_F32=2 -s DISABLE_EXCEPTION_CATCHING=0 --memory-init-file 1 -O3 -s NO_EXIT_RUNTIME=1 -g0 -s USE_WEBGL2=1 -s TOTAL_MEMORY=1073741824 --separate-asm --emit-symbol-map --output_eol linux -s MEMFS_APPEND_TO_TYPED_ARRAYS=1 -s ALLOW_MEMORY_GROWTH=1” --js-pre=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\FileSystem.js” --js-pre=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\MediaDevices.js” --js-pre=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\SendMessage.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Audio.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Cursor.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Eval.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\FileSystem.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\library_memfs.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Logging.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\SystemInfo.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\UnetWebSocket.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebCam.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebRequest.js” --js-libraries=“D:\NA Fountains\NA\NE Unity\NE\Assets\Plugins\WebGL\SharedBuffer.jslib” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AnimationModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AudioModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ClothModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CloudWebServicesModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CoreModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CrashReportingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_IMGUIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_JSONSerializeModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticlesLegacyModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticleSystemModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_Physics2DModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_PhysicsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainPhysicsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TextRenderingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UmbraModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UNETModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAdsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAnalyticsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityConnectModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VehiclesModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VideoModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VRModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_WebModule_Dynamic.bc” --map-file-parser=“C:\Program Files\Unity 5 f4\Editor\Data\Tools\MapFileParser\MapFileParser.exe” --extra-types.file=“C:\Program Files\Unity 5 f4\Editor\Data\il2cpp\il2cpp_default_extra_types.txt” --assembly=“D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll” --assembly=“D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll” --assembly=“D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll” --assembly=“D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll” --assembly=“D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\Managed\UnityEngine.dll” --generatedcppdir=“D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\il2cppOutput”

stdout:
Building build.js with EmscriptenToolChain.
Output directory: D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\Native
Cache directory: D:\NA Fountains\NA\NE Unity\NE\Library\il2cpp_cache
il2cpp.exe didn’t catch exception: Unity.IL2CPP.Building.BuilderFailedException: WARNING:root:did not see a source tree above or next to the LLVM root directory (guessing based on directory of C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_FastComp_Win\llc), could not verify version numbers match
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:java does not seem to exist, required for closure compiler, which is optional (define JAVA in C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\emscripten.config if you want it)
WARNING:root:closure compiler will not be available
LLVM ERROR: Invalid abbrev number
Traceback (most recent call last):
File “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++”, line 16, in
emcc.run()
File “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, line 1331, in run
shared.Building.llvm_opt(temp_file, llvm_opts, new_temp_file)
File “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py”, line 1592, in llvm_opt
assert os.path.exists(target), 'Failed to run llvm optimizations: ’ + output
AssertionError: Failed to run llvm optimizations:

Invocation was: Executable: “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe”
Arguments: “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++” -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -std=c++11 -Oz -I"C:\Program Files\Unity 5 f4\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity 5 f4\Editor\Data\il2cpp\external\boehmgc\include" -I"D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\il2cppOutput" “D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\il2cppOutput\Bulk_UnityEngine_2.cpp” -o “D:\NA Fountains\NA\NE Unity\NE\Library\il2cpp_cache\E6BE2E3A49E7615F2D11CC12263B2434.o”

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile)
at Unity.IL2CPP.Building.CppProgramBuilder.Build()
at il2cpp.Program.DoRun(String[ ] args)
at il2cpp.Program.Run(String[ ] args)
at il2cpp.Program.Main(String[ ] args)
stderr:

Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: WARNING:root:did not see a source tree above or next to the LLVM root directory (guessing based on directory of C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_FastComp_Win\llc), could not verify version numbers match
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:java does not seem to exist, required for closure compiler, which is optional (define JAVA in C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\emscripten.config if you want it)
WARNING:root:closure compiler will not be available
LLVM ERROR: Invalid abbrev number
Traceback (most recent call last):
File “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++”, line 16, in
emcc.run()
File “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, line 1331, in run
shared.Building.llvm_opt(temp_file, llvm_opts, new_temp_file)
File “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py”, line 1592, in llvm_opt
assert os.path.exists(target), 'Failed to run llvm optimizations: ’ + output
AssertionError: Failed to run llvm optimizations:

Invocation was: Executable: “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe”
Arguments: “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++” -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -std=c++11 -Oz -I"C:\Program Files\Unity 5 f4\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity 5 f4\Editor\Data\il2cpp\external\boehmgc\include" -I"D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\il2cppOutput" “D:\NA Fountains\NA\NE Unity\NE\Temp\StagingArea\Data\il2cppOutput\Bulk_UnityEngine_2.cpp” -o “D:\NA Fountains\NA\NE Unity\NE\Library\il2cpp_cache\E6BE2E3A49E7615F2D11CC12263B2434.o”

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile)
at Unity.IL2CPP.Building.CppProgramBuilder.Build()
at il2cpp.Program.DoRun(String[ ] args)
at il2cpp.Program.Run(String[ ] args)
at il2cpp.Program.Main(String[ ] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List1, Action1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:298) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:289)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:131)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:39)
UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry, BuildReport)

These are definitely errors in Emscripten. Is there a chance one of your disks is too full? That could cause this issue.

I’ll clear up my drive and try again (I have 9 GB remaining at the moment), here’s another different error from today:

Failed running C:\Program Files\Unity 5 f4\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-stacktrace --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform=“WebGL” --architecture=“EmscriptenJavaScript” --configuration=“Release” --outputpath=“D:\NE\NC\NA Unity\NA\Assets /…/Temp/StagingArea/Data\Native\build.js” --cachedirectory=“D:\NE\NC\NA Unity\NA\Assets..\Library/il2cpp_cache” --compiler-flags=“-Oz” --linker-flags=“-s PRECISE_F32=2 -s DISABLE_EXCEPTION_CATCHING=0 --memory-init-file 1 -O3 -s NO_EXIT_RUNTIME=1 -g0 -s USE_WEBGL2=1 -s TOTAL_MEMORY=1073741824 --separate-asm --emit-symbol-map --output_eol linux -s MEMFS_APPEND_TO_TYPED_ARRAYS=1 -s ALLOW_MEMORY_GROWTH=1” --js-pre=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\FileSystem.js” --js-pre=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\MediaDevices.js” --js-pre=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\SendMessage.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Audio.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Cursor.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Eval.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\FileSystem.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\library_memfs.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Logging.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\SystemInfo.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\UnetWebSocket.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebCam.js” --js-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebRequest.js” --js-libraries=“D:\NE\NC\NA Unity\NA\Assets\Plugins\WebGL\SharedBuffer.jslib” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AnimationModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AudioModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ClothModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CloudWebServicesModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CoreModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CrashReportingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_IMGUIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_JSONSerializeModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticlesLegacyModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticleSystemModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_Physics2DModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_PhysicsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainPhysicsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TextRenderingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UmbraModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UNETModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAdsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAnalyticsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityConnectModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VehiclesModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VideoModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VRModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_WebModule_Dynamic.bc” --map-file-parser=“C:\Program Files\Unity 5 f4\Editor\Data\Tools\MapFileParser\MapFileParser.exe” --extra-types.file=“C:\Program Files\Unity 5 f4\Editor\Data\il2cpp\il2cpp_default_extra_types.txt” --assembly=“D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll” --assembly=“D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll” --assembly=“D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll” --assembly=“D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll” --assembly=“D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Managed\UnityEngine.dll” --generatedcppdir=“D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\il2cppOutput”

stdout:
Building build.js with EmscriptenToolChain.
Output directory: D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Native
Cache directory: D:\NE\NC\NA Unity\NA\Library\il2cpp_cache
ObjectFiles: 467 of which compiled: 100
Time Compile: 33431 milliseconds Bulk_Generics_14.cpp
Time Compile: 27516 milliseconds Bulk_Assembly-CSharp_3.cpp
Time Compile: 26160 milliseconds Bulk_Generics_5.cpp
Time Compile: 22389 milliseconds Bulk_Assembly-CSharp_2.cpp
Time Compile: 21902 milliseconds GenericMethods1.cpp
Time Compile: 21243 milliseconds GenericMethods0.cpp
Time Compile: 17959 milliseconds Bulk_Assembly-CSharp_4.cpp
Time Compile: 17261 milliseconds Bulk_Assembly-CSharp_0.cpp
Time Compile: 16925 milliseconds Bulk_mscorlib_6.cpp
Time Compile: 15664 milliseconds Bulk_Assembly-CSharp_5.cpp
Total compilation time: 88291 milliseconds.
Response file: C:\Users\FrostFire\AppData\Local\Temp_1681885659\response.rsp
Response file: C:\Users\FrostFire\AppData\Local\Temp_1824712997\response.rsp
il2cpp.exe didn’t catch exception: Unity.IL2CPP.Building.BuilderFailedException: “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc” -o “D:\NE\NC\NA Unity\NA\Library\il2cpp_cache\linkresult_32C6B339E538F94A73A02090DBBF1CDA\build.js” -s PRECISE_F32=2 -s DISABLE_EXCEPTION_CATCHING=0 --memory-init-file 1 -O3 -s NO_EXIT_RUNTIME=1 -g0 -s USE_WEBGL2=1 -s TOTAL_MEMORY=1073741824 --separate-asm --emit-symbol-map --output_eol linux -s MEMFS_APPEND_TO_TYPED_ARRAYS=1 -s ALLOW_MEMORY_GROWTH=1 --pre-js “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\FileSystem.js” --pre-js “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\MediaDevices.js” --pre-js “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\SendMessage.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Audio.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Cursor.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Eval.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\FileSystem.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\library_memfs.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Logging.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\SystemInfo.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\UnetWebSocket.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebCam.js” --js-library “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebRequest.js” --js-library “D:\NE\NC\NA Unity\NA\Assets\Plugins\WebGL\SharedBuffer.jslib” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AIModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AnimationModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AudioModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ClothModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CloudWebServicesModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CoreModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CrashReportingModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_IMGUIModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_JSONSerializeModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticlesLegacyModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticleSystemModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_Physics2DModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_PhysicsModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainPhysicsModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TextRenderingModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UIModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UmbraModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UNETModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAdsModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAnalyticsModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityConnectModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VehiclesModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VideoModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VRModule_Dynamic.bc” “C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_WebModule_Dynamic.bc” @“C:\Users\FrostFire\AppData\Local\Temp_1824712997\response.rsp”

WARNING:root:did not see a source tree above or next to the LLVM root directory (guessing based on directory of C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_FastComp_Win\llc), could not verify version numbers match
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:java does not seem to exist, required for closure compiler, which is optional (define JAVA in C:\Program Files\Unity 5 f4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\emscripten.config if you want it)
WARNING:root:closure compiler will not be available
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:root:not all asm.js optimizations are possible with ALLOW_MEMORY_GROWTH, disabling those
Wrote crash dump file “C:\Users\FROSTF~1\AppData\Local\Temp\llc.exe-b99337.dmp”
0x00007FF65EC844F1 (0x000000464ACCF370 0x00000046536ED458 0x00000046536ED438 0x000000464AE39CA0), rl_set_output_buffer() + 0x242271 bytes(s)
0x00007FF65ECD84D8 (0x0000004662520FF0 0x00007FF8043354D8 0x0000004614B74220 0x00007FFFE0DE69D8), rl_set_output_buffer() + 0x296258 bytes(s)
0x00007FF65EC843FB (0x00000046536ED438 0x00000046536ECFC8 0x000000464AE4C330 0x000000464AE4C370), rl_set_output_buffer() + 0x24217B bytes(s)
0x00007FF65EC8B25C (0x000000464AE4C370 0x000000464ACCF520 0x000000465098C020 0x00007FFFE0DE69D8), rl_set_output_buffer() + 0x248FDC bytes(s)
0x00007FF65EC8AA82 (0x0000004614B745A0 0x000000464AE4C370 0x000000464ACCF520 0x000000465098C020), rl_set_output_buffer() + 0x248802 bytes(s)
0x00007FF65E84E866 (0x0000004614B74220 0x000000465098C020 0x000000465098C020 0x0000000000000000)
0x00007FF65E8517E0 (0x000000464AE3D

Update, freeing my disk space to 60 GB didn’t fix the issue

Another new error today:

FileNotFoundException: Could not find file “D:\NE\NC\NA Unity\NA\Temp\StagingArea\Data\Native\build.asm.js”.
System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:305)
System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363)
System.IO.StreamReader…ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:167)
System.IO.StreamReader…ctor (System.String path, System.Text.Encoding encoding)
(wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding)
System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:587)
System.IO.File.ReadAllText (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:582)
UnityEditor.WebGL.CodeAnalysisUtils.ReplaceDuplicates (System.String builtCodePath, Int32 interations) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/CodeAnalysisUtils.cs:145)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:589)
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, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.HostView:OnGUI()

Thanks for freeing up disk space. It seems that was not the issue. Do you have another machine where you could try this build? If not, can to provide the project to us in a bug report? I’m wondering if this is specific to the installation on your machine, or if it is related to the project.

I do not have another machine I can do the build on no. I can’t provide the project either, the code and assets are proprietary IP that I need to keep locked up.

Maybe it is worth trying an empty project a few times to see if this happens there as well. That might tell us if it is specific to the project, or related to some installation or path issue on the machine.

I was able to complete 3 WebGL builds in a row on an empty project after failing to create a webGL build on the original project having issues. Looks like it’s project-related.

On the bright side, it looks like a workaround for this may be to:

  1. (When the original project (Project A) fails…)
  2. Open an empty project (Project B)
  3. Make a WebGL build for Project B
  4. Close Unity
  5. Delete the “Library\il2cpp_cache” folder for Project A
  6. Open the original project (Project A)
  7. Try making the webgl build again (for Project A)

Edit: Clarified some steps

Thanks for the details. This issue just gets weirder!

So does this step happen in the directory original project, or in the directory for the empty project?

directory for the original project.

Ok, so the steps about opening an empty project are probably unnecessary. I suspect that just deleting the Library\il2cpp_cache in the project that fails will probably work around the issue.

After talking with our WebGL team here, we have had a few reports of something that might be similar. We’ve not seen one in a little while though. So it might be work trying the latest Unity 5.5 patch release to see if something was corrected.

Updating unity to newer versions is not a trivial task for our team. We typically lose about 3 days of productivity transferring shader changes and feature testing/fixes.

Yes, I know that can be a pain. I wish that I could give you a more certain idea that a new version of Unity will correct this issue, but we are not sure.