Failed when build webGL

hi I gets errors when building webGL ( it builds .exe successefully)
and I noticed that there’s no
il2cpp.exe in C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\build
not sure if it caused the problem.
Could you help me solve this issue or provide me the il2cpp.exe file?
Thanks.

Can you copy the full text of the error message and paste it on this forum thread as text? That will help us understand the cause.

Thanks for your quick response!
Here is the log:

Sorry I have to insert the screenshot. i can’t post with inserting the code it shows contain spam information.

Sorry, I still can’t see the full error message there. I’m unsure why posting as code causes the forum software to think it is spam. Maybe copy the text into a text file locally and attach that text file to this thread.

@CeciniaX It looks like a shader error. Can you compare to a new/empty project, does that build to WebGL? What Unity template are you using?

I attached the copy of the text:

7888894–1003987–Exception.txt (15.2 KB)
7888894–1003990–ShaderError.txt (1.02 KB)

I tried build an empty project to WebGL and get this error:

Exception: Unity.IL2CPP.Building.BuilderFailedException: no such file or directory
ERROR:root:Failed to run llvm optimizations:


Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: -E "C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -Wno-null-conversion -std=c++11 -O3 -Oz -DIL2CPP_EXCEPTION_DISABLED=1  -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DNDEBUG -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\external\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\external\xxHash" -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\external\baselib\Include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\external\baselib\Platforms\WebGL\Include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.28f1c1\Editor\Data\il2cpp\libil2cpp\pch" -I"D:\unity\webTest\Library\Il2cppBuildCache\WebGL\il2cppOutput" "D:\unity\webTest\Library\Il2cppBuildCache\WebGL\il2cppOutput\Il2CppCCalculateFieldValues.cpp" -o "D:\unity\webTest\Library\il2cpp_cache\7F5D1A609F276498AD69211B5FA92E4F.o"

   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
   at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:918)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <a2ece4873fda4c998e9f7fe8d9dc62e8>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

@CeciniaX Got it, you might want to install a different version of Unity also to compare, and/or reinstall this version.