Hi, i will try explain in short and informative.
Does anyone know how to fix failed when build in WebGL? any response would be appreciated!
-I used unity 2020.2.x and i can build .exe for play on windows with no problem.
-when i try Switch and build in WebGL i got
“Exception: Unity.IL2CPP.Building.BuilderFailedException: Traceback”
and tell me something wrong about Emscripten and few python file(like, emcc.py,etc).
for full error detail please take a look text file i attached.
yesterday,I took a whole day try google and fix but i can’t
things i try so far:
- reinstall unity and retry → failed
- downgrade for few version like 2020.1.x → failed
- change unity to run as administrator → failed
- change build directory to C: and other drive → failed
- check my path is no non-latin character → failed
- check the path that file exists and yes it is → failed
- even try to build new project with just 1 cube Still failed! (same error just different path) - and so much many thing i can’t remember >x<".
actually, it not necessary now to build as WebGL platform i but i just want to fix it. also it’s good to know how to fix for my future project.
------------if you don’t want to click the file then this below-----------
Exception: Unity.IL2CPP.Building.BuilderFailedException: Traceback (most recent call last):
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, line 3063, in
sys.exit(run())
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, line 1521, in run
compile_source_file(i, input_file)
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, line 1513, in compile_source_file
if run_process(args, check=False).returncode != 0:
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py”, line 167, in run_process
return run_base(cmd, universal_newlines=universal_newlines, check=check, *args, **kw)
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py”, line 158, in run_base
proc = Popen(cmd, *args, **kw)
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py”, line 711, in init
errread, errwrite)
File “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py”, line 948, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Invocation was: Executable: “X:\Unity\2020.2.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe”
Arguments: -E “X:\Unity\2020.2.4f1\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"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\libil2cpp" -I"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\libil2cpp" -I"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\external\bdwgc\include" -I"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\external\xxHash" -I"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\external\baselib\Include" -I"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\external\baselib\Platforms\WebGL\Include" -I"X:\Unity\2020.2.4f1\Editor\Data\il2cpp\libil2cpp\pch" -I"X:\UnityProject\TestWebGL\Library\Il2cppBuildCache\WebGL\il2cppOutput" “X:\UnityProject\TestWebGL\Library\Il2cppBuildCache\WebGL\il2cppOutput\Il2CppCCalculateFieldValues.cpp” -o “X:\UnityProject\TestWebGL\Library\il2cpp_cache\88D4FB5475660F03317AD1FD1B3D06AB.o”
at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 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 :0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <afa9f07022084fb2b65f56c776d2e220>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List
1[T] arguments, System.Action1[T] setupStartInfo, System.String generatedCppOutputDirectory) (at <afa9f07022084fb2b65f56c776d2e220>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.Boolean platformSupportsManagedDebugging) (at <afa9f07022084fb2b65f56c776d2e220>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <afa9f07022084fb2b65f56c776d2e220>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action
1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :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:910)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :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 :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
6838169–795737–Unity WebGL Error.txt (5.51 KB)