WebGL unable to Build and Run!

Observed:
I downloaded the WebGL, installed, built and ran it in a new folder, but the error pops up like the image below.

What I did:
Downloaded the required WebGL, then nothing else, then clicked build and run with the following settings.

I’m super new to this and would require any kind of help if possible, thank you!

Hi Henry,
Did you use the default path? Does WeBGL have the same version as Unity? The versions should be the same. There should be a check in you Development Build. Are there any errors or warnings in the console when you run your game?

The default path goes to the folder of my current project. I went to desktop, created a new folder and Select that folder. The WebGL should have the same version as Unity. The errors popped up on the console are shown in the images above.

Hi Henry,

The errors popped up on the console are shown in the images above.

Not fully, unfortunately, can you copy/paste them in.

Also, as this is Text101 it’s a very small project, could you zip up the project files and upload in your reply, I will be happy to try a WebGL build at this end also with your same project. If I get a successful outcome we know it isn’t the project etc.

First:
Failed running C:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --compile-cpp --libil2cpp-static --platform=“WebGL” --architecture=“EmscriptenJavaScript” --configuration=“Release” --outputpath=“C:\Users\user2012\Desktop\Text101\Assets /…/Temp/StagingArea/Data\Native\build.bc” --cachedirectory=“C:\Users\user2012\Desktop\Text101\Assets…\Library/il2cpp_cache” --compiler-flags="-Oz -DIL2CPP_EXCEPTION_DISABLED=1 " --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AccessibilityModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AnimationModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ARModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AudioModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_BaselibModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ClothModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CloudWebServicesModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CoreModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CrashReportingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_DirectorModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_FacebookModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_GameCenterModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_GridModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ImageConversionModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_IMGUIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_InputModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_JSONSerializeModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticlesLegacyModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticleSystemModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_PerformanceReportingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_Physics2DModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_PhysicsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ScreenCaptureModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_SpatialTrackingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_SpriteMaskModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_StyleSheetsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainPhysicsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TextRenderingModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TilemapModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TimelineModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UIElementsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UIModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UmbraModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UNETModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAnalyticsModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityConnectModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestAudioModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestTextureModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestWWWModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VehiclesModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VideoModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VRModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_WebModule_Dynamic.bc” --additional-libraries=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_WindModule_Dynamic.bc” --map-file-parser=“C:\Program Files\Unity\Editor\Data\Tools\MapFileParser\MapFileParser.exe” --assembly=“C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll” --assembly=“C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll” --assembly=“C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\Managed\UnityEngine.Analytics.dll” --assembly=“C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\Managed\UnityEngine.dll” --generatedcppdir=“C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\il2cppOutput”

stdout:
Building build.bc with EmscriptenToolChain.
Output directory: C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\Native
Cache directory: C:\Users\user2012\Desktop\Text101\Library\il2cpp_cache
il2cpp.exe didn’t catch exception: Unity.IL2CPP.Building.BuilderFailedException: CRITICAL:root:Could not verify LLVM version: argument of type ‘NoneType’ is not iterable
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:

(no targets could be identified: need more than 1 value to unpack)

CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
CRITICAL:root:failing sanity checks due to previous fastcomp failure

Invocation was: Executable: “C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe”
Arguments: “C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++” -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -std=c++11 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DRUNTIME_IL2CPP -DNDEBUG -I"C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\il2cppOutput" “C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\il2cppOutput\Bulk_mscorlib_6.cpp” -o “C:\Users\user2012\Desktop\Text101\Library\il2cpp_cache\71876147E71CCA3108F8EB4567CD01D2.o”

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
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: CRITICAL:root:Could not verify LLVM version: argument of type ‘NoneType’ is not iterable
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:

(no targets could be identified: need more than 1 value to unpack)

CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
CRITICAL:root:failing sanity checks due to previous fastcomp failure

Invocation was: Executable: “C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe”
Arguments: “C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++” -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -std=c++11 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DRUNTIME_IL2CPP -DNDEBUG -I"C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\il2cppOutput" “C:\Users\user2012\Desktop\Text101\Temp\StagingArea\Data\il2cppOutput\Bulk_mscorlib_6.cpp” -o “C:\Users\user2012\Desktop\Text101\Library\il2cpp_cache\71876147E71CCA3108F8EB4567CD01D2.o”

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String args)
at il2cpp.Program.Run(String args)
at il2cpp.Program.Main(String args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List1, Action1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:324) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:305)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:151)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:41)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Second:
Exception: C:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1 arguments, System.Action1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:324) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:305)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:151)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:41)
UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:340)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:893)
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.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:271)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Third:
Error building Player: 3 errors

Fourth:
Build completed with a result of ‘Failed’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Fifth:
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Uploaded zip:
Text101.zip (5.6 MB)

Hi Henry,

Thank you for the further information and the file.

I opened your project in 2017.1.0f3 and built it successfully, selecting WebGL as the build type, thus the project itself appears to be ok.

I note you said you downloaded WebGL, I don’t recall that being necessary when I install 2017, e.g. it was integrated / options to select on the install.

Can you clarify why the download was necessary?

Having looked at the error message I have found this article;

Appreciating that the Unity version is different, but I wonder whether perhaps, having installed it separately, perhaps some other required components haven’t been installed, as indicated by the final response in the above article.


Updated Tue Dec 19 2017 12:29

Sorry for the delay responding, I needed to catch up on a few things and the first time I built your game Unity died on me. I rebooted my laptop (hadn’t been done for a while and was chugging) and tried again - all ok - WebGL build worked without issue. The resulting built game is linked below;

Final.zip (4.1 MB)

Note, it’s only called “Final” because I created a directory called “Final” for the build.

To me this would suggest that there is something missing from your install/setup.

I restarted, turned off and on again, to no avail…

I tried installing the visual studio from the thread you provided, it says failed to install.

I guess it’s no big deal if WebGL services ain’t working?? Other than that I have no clue lol…

Something else worth trying would be to uninstall/reinstall Unity, when it installs there should be options for the different platforms you want to include build support for (from memory), double check the install options and select WebGL etc from there rather than a separate download.

I did that, uninstalled and reinstalled by checking the WebGL. I’m using Unity 2017 though.

Unity community link According to Marco-Trivellato from Unity tech there is an issue with Facebook SDK folders. This might be your issue. There are also patches available for 2017. Not sure if this will correct the build but when Rob can build it successfully on his machine it seems to be an issue will your machine. You did not offer what OS your are using and in the comments this looks to be with iOS.

A post was split to a new topic: My game doesn’t load the next level after building it?

Privacy & Terms