Search Unity

Resolved I can't build project as WebGL

Discussion in 'Web' started by s5904062663182, Sep 21, 2022.

  1. s5904062663182

    s5904062663182

    Joined:
    Aug 8, 2022
    Posts:
    9
    i use unity 2021.3.10f1 and use 3D templates as core
    start from nothing -> create 3rd person controller -> add input for movement -> add animation -> add camera and rotate it -> walk and sprint
    i thought that i should build a demo. now everything went bad.

    this is first warning

    Code (CSharp):
    1. C:\Program Files\Unity\Hub\Editor\2021.3.10f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Configuration.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.InputSystem.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.JSONSerializeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SubsystemsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsNativeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.VRModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.XRModule.dll --data-folder=C:/uniPJ/Visual_uni_tour/Library/Bee/artifacts/WebGL/il2cppOutput/data --generatedcppdir=C:/uniPJ/Visual_uni_tour/Library/Bee/artifacts/WebGL/il2cppOutput/cpp --enable-analytics --emit-method-map --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=C:/uniPJ/Visual_uni_tour/Library/Bee/artifacts/il2cpp_conv_qfrq.traceevents --print-command-line
    2. Error: IL2CPP error for method 'System.Boolean UnityEngine.Vector3::op_Equality(UnityEngine.Vector3,UnityEngine.Vector3)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:460
    3. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    4.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    5.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    6.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    7.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    8.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    9.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    10. Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::op_Division(UnityEngine.Vector3,System.Single)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:455
    11. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    12.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    13.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    14.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    15.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    16.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    17.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    18. Error: IL2CPP error for method 'System.Boolean UnityEngine.Quaternion::IsEqualUsingDot(System.Single)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Quaternion.cs:121
    19. System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_zero_m0C1249C3F25B1C70EAD3CC8B31259975A457AE39UnityEngine_MetadataUsageId
    20.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    21.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    22.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    23.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    24.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    25.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    26. Error: IL2CPP error for method 'System.Single UnityEngine.Mathf::Max(System.Single,System.Single)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Mathf.cs:143
    27. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    28.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    29.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    30.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    31.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    32.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    33.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    34. Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::get_zero()' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:421
    35. System.ArgumentException: An item with the same key has already been added. Key: Vector4_get_zero_m3D61F5FA9483CD9C08977D9D8852FB448B4CE6D1UnityEngine_MetadataUsageId
    36.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    37.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    38.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    39.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    40.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    41.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    42. Error: IL2CPP error for method 'System.Single UnityEngine.Mathf::Max(System.Single,System.Single)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Mathf.cs:143
    43. System.ArgumentException: An item with the same key has already been added. Key: Mathf_Approximately_m1DADD012A8FC82E11FB282501AE2EBBF9A77150BUnityEngine_MetadataUsageId
    44.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    45.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    46.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    47.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    48.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    49.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    50. 0x00007ff60c51284d (Unity) StackWalker::GetCurrentCallstack
    51. 0x00007ff60c519529 (Unity) StackWalker::ShowCallstack
    52. 0x00007ff60d489dc3 (Unity) GetStacktrace
    53. 0x00007ff60db2621d (Unity) DebugStringToFile
    54. 0x00007ff60b6e6062 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    55. 0x00000148b42da743 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    56. 0x00000148b42da65b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    57. 0x00000148b42da3a0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    58. 0x00000148ade51055 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    59. 0x00000148ade50ffb (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:Il2CPPResultProcessor (Bee.BeeDriver.NodeResult)
    60. 0x00000148ade505a3 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:ReportBuildResults (Bee.BeeDriver.BeeDriverResult)
    61. 0x00000148ade2e673 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
    62. 0x00000148ade2d203 (Mono JIT Code) [BuildPostprocessor.cs:160] UnityEditor.WebGL.WebGlBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
    63. 0x00000148ade2cdab (Mono JIT Code) UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
    64. 0x00000148ade2c618 (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    65. 0x00000148ade2c995 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
    66. 0x00007ffb3da2fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    67. 0x00007ffb3d96e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    68. 0x00007ffb3d96e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    69. 0x00007ff60c437614 (Unity) scripting_method_invoke
    70. 0x00007ff60c416eb4 (Unity) ScriptingInvocation::Invoke
    71. 0x00007ff60de976a1 (Unity) CallMono
    72. 0x00007ff60de9f957 (Unity) PostprocessPlayer
    73. 0x00007ff60de9a55f (Unity) DoBuildPlayer_PostBuild
    74. 0x00007ff60de9852e (Unity) DoBuildPlayer
    75. 0x00007ff60de8c62d (Unity) BuildPlayer
    76. 0x00007ff60bd157e6 (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    77. 0x00007ff60bc853a0 (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    78. 0x00000148ada39d87 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[],bool)
    79. 0x00000148ada387e3 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    80. 0x00000148ada35453 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    81. 0x00000148ada34f33 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    82. 0x00000148ada3195b (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    83. 0x00000147e26d0685 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    84. 0x00007ffb3da2fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    85. 0x00007ffb3d96e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    86. 0x00007ffb3d96e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    87. 0x00007ff60c413c5e (Unity) CallStaticMonoMethod
    88. 0x00007ff60c4139f6 (Unity) CallStaticMonoMethod
    89. 0x00007ff60d154e4f (Unity) BuildPlayerWithLastSettings
    90. 0x00007ff60ce764c0 (Unity) MenuController::ExecuteMenuItem
    91. 0x00007ff60d490f76 (Unity) ProcessMainWindowMessages
    92. 0x00007ff60d4b179c (Unity) ContainerWindow::ContainerWndProc
    93. 0x00007ffc14bde858 (USER32) CallWindowProcW
    94. 0x00007ffc14bde299 (USER32) DispatchMessageW
    95. 0x00007ff60d48fde3 (Unity) MainMessageLoop
    96. 0x00007ff60d49480b (Unity) WinMain
    97. 0x00007ff60e8220ce (Unity) __scrt_common_main_seh
    98. 0x00007ffc16467034 (KERNEL32) BaseThreadInitThunk
    99. 0x00007ffc169c26a1 (ntdll) RtlUserThreadStart
    the second is
    Code (CSharp):
    1. BuildFailedException: Incremental Player build failed!
    2. UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <99feab6f3db6407493924fe4a179a95b>:0)
    3. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:158)
    4. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <99feab6f3db6407493924fe4a179a95b>:0)
    5. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <99feab6f3db6407493924fe4a179a95b>:0)
    6. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    the third is

    Code (CSharp):
    1. Build completed with a result of 'Failed' in 19 seconds (19408 ms)
    2. 0x00007ff60c51284d (Unity) StackWalker::GetCurrentCallstack
    3. 0x00007ff60c519529 (Unity) StackWalker::ShowCallstack
    4. 0x00007ff60d489dc3 (Unity) GetStacktrace
    5. 0x00007ff60db2621d (Unity) DebugStringToFile
    6. 0x00007ff60b6e6062 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    7. 0x00000148b42da743 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    8. 0x00000148b42da65b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    9. 0x00000148b42da3a0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    10. 0x00000148ade51055 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    11. 0x00000148ada38acb (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    12. 0x00000148ada35453 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    13. 0x00000148ada34f33 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    14. 0x00000148ada3195b (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    15. 0x00000147e26d0685 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    16. 0x00007ffb3da2fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    17. 0x00007ffb3d96e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    18. 0x00007ffb3d96e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    19. 0x00007ff60c413c5e (Unity) CallStaticMonoMethod
    20. 0x00007ff60c4139f6 (Unity) CallStaticMonoMethod
    21. 0x00007ff60d154e4f (Unity) BuildPlayerWithLastSettings
    22. 0x00007ff60ce764c0 (Unity) MenuController::ExecuteMenuItem
    23. 0x00007ff60d490f76 (Unity) ProcessMainWindowMessages
    24. 0x00007ff60d4b179c (Unity) ContainerWindow::ContainerWndProc
    25. 0x00007ffc14bde858 (USER32) CallWindowProcW
    26. 0x00007ffc14bde299 (USER32) DispatchMessageW
    27. 0x00007ff60d48fde3 (Unity) MainMessageLoop
    28. 0x00007ff60d49480b (Unity) WinMain
    29. 0x00007ff60e8220ce (Unity) __scrt_common_main_seh
    30. 0x00007ffc16467034 (KERNEL32) BaseThreadInitThunk
    31. 0x00007ffc169c26a1 (ntdll) RtlUserThreadStart
    the 4th is

    Code (CSharp):
    1. UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    2.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <99feab6f3db6407493924fe4a179a95b>:0
    3.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <99feab6f3db6407493924fe4a179a95b>:0
    4. 0x00007ff60c51284d (Unity) StackWalker::GetCurrentCallstack
    5. 0x00007ff60c519529 (Unity) StackWalker::ShowCallstack
    6. 0x00007ff60d489dc3 (Unity) GetStacktrace
    7. 0x00007ff60db2621d (Unity) DebugStringToFile
    8. 0x00007ff60b6e6062 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    9. 0x00000148b42da743 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    10. 0x00000148b42da65b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    11. 0x00000148b42da3a0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    12. 0x00000148ade51055 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    13. 0x00000148ada354cb (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    14. 0x00000148ada34f33 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    15. 0x00000148ada3195b (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    16. 0x00000147e26d0685 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    17. 0x00007ffb3da2fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    18. 0x00007ffb3d96e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    19. 0x00007ffb3d96e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    20. 0x00007ff60c413c5e (Unity) CallStaticMonoMethod
    21. 0x00007ff60c4139f6 (Unity) CallStaticMonoMethod
    22. 0x00007ff60d154e4f (Unity) BuildPlayerWithLastSettings
    23. 0x00007ff60ce764c0 (Unity) MenuController::ExecuteMenuItem
    24. 0x00007ff60d490f76 (Unity) ProcessMainWindowMessages
    25. 0x00007ff60d4b179c (Unity) ContainerWindow::ContainerWndProc
    26. 0x00007ffc14bde858 (USER32) CallWindowProcW
    27. 0x00007ffc14bde299 (USER32) DispatchMessageW
    28. 0x00007ff60d48fde3 (Unity) MainMessageLoop
    29. 0x00007ff60d49480b (Unity) WinMain
    30. 0x00007ff60e8220ce (Unity) __scrt_common_main_seh
    31. 0x00007ffc16467034 (KERNEL32) BaseThreadInitThunk
    32. 0x00007ffc169c26a1 (ntdll) RtlUserThreadStart
    the 5th is
    Code (CSharp):
    1. [Version and Build] Build failed! 00:00:19.4078991
    2. 0x00007ff60c51284d (Unity) StackWalker::GetCurrentCallstack
    3. 0x00007ff60c519529 (Unity) StackWalker::ShowCallstack
    4. 0x00007ff60d489dc3 (Unity) GetStacktrace
    5. 0x00007ff60db2621d (Unity) DebugStringToFile
    6. 0x00007ff60b6e6062 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    7. 0x00000148b42da743 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    8. 0x00000148b42da65b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    9. 0x00000148b42da3a0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    10. 0x00000148ade51055 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    11. 0x00000148b5590f73 (Mono JIT Code) [PublisherBuildProcessor.cs:77] Unity.Play.Publisher.Editor.PublisherBuildProcessor/<WaitUntilBuildFinishes>d__7:MoveNext ()
    12. 0x00000148b5590b6a (Mono JIT Code) [EditorCoroutine.cs:80] Unity.EditorCoroutines.Editor.EditorCoroutine/YieldProcessor:MoveNext (System.Collections.IEnumerator)
    13. 0x00000148b55904fb (Mono JIT Code) [EditorCoroutine.cs:134] Unity.EditorCoroutines.Editor.EditorCoroutine:ProcessIEnumeratorRecursive (System.Collections.IEnumerator)
    14. 0x00000148b5590153 (Mono JIT Code) [EditorCoroutine.cs:115] Unity.EditorCoroutines.Editor.EditorCoroutine:MoveNext ()
    15. 0x00000148b9eb9a40 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    16. 0x00000147e26d0685 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    17. 0x00007ffb3da2fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    18. 0x00007ffb3d96e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    19. 0x00007ffb3d96e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    20. 0x00007ff60c437614 (Unity) scripting_method_invoke
    21. 0x00007ff60c416eb4 (Unity) ScriptingInvocation::Invoke
    22. 0x00007ff60c411ac5 (Unity) ScriptingInvocation::Invoke<void>
    23. 0x00007ff60c567b6b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
    24. 0x00007ff60ce90662 (Unity) SceneTracker::Update
    25. 0x00007ff60d040e1a (Unity) Application::TickTimer
    26. 0x00007ff60d48ff5a (Unity) MainMessageLoop
    27. 0x00007ff60d49480b (Unity) WinMain
    28. 0x00007ff60e8220ce (Unity) __scrt_common_main_seh
    29. 0x00007ffc16467034 (KERNEL32) BaseThreadInitThunk
    30. 0x00007ffc169c26a1 (ntdll) RtlUserThreadStart
    so i try create another project with unity 2021.3.10f1 and use 3D templates as core.
    i switch to WebGL and then build the project with noting in it.
    now it's showing an error about

    Building Library\Bee\artifacts\WebGL\GameAssembly\master_WebGL_wasm\ryrx_mscorlib.o failed with output:
    C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:14:38: error: unknown type name 'RuntimeMethod'
    typedef void (*Action)(void*, const RuntimeMethod*);

    please help
     
  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    273
    Try deleting the Library folder in case there's some stale artifacts causing these errors.
     
  3. s5904062663182

    s5904062663182

    Joined:
    Aug 8, 2022
    Posts:
    9
    after I delete the Library folder and try building the project with WebGL publisher again. this time I got 2 error
    1st

    Code (CSharp):
    1. C:\Program Files\Unity\Hub\Editor\2021.3.10f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Configuration.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.InputSystem.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.JSONSerializeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SubsystemsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsNativeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.VRModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.XRModule.dll --data-folder=C:/uniPJ/Visual_uni_tour/Library/Bee/artifacts/WebGL/il2cppOutput/data --generatedcppdir=C:/uniPJ/Visual_uni_tour/Library/Bee/artifacts/WebGL/il2cppOutput/cpp --enable-analytics --emit-method-map --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=C:/uniPJ/Visual_uni_tour/Library/Bee/artifacts/il2cpp_conv_qfrq.traceevents --print-command-line
    2. Error: IL2CPP error for method 'System.Single UnityEngine.Mathf::Max(System.Single,System.Single)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Mathf.cs:143
    3. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_Item_m18BC65BB0512B16A1F9C8BE4B83A3E7BBAD7064DUnityEngine_MetadataUsageId
    4.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    5.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    6.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    7.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    8.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    9.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    10. Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::get_zero()' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:421
    11. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    12.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    13.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    14.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    15.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    16.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    17.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    18. Error: IL2CPP error for method 'System.Boolean UnityEngine.Vector4::op_Equality(UnityEngine.Vector4,UnityEngine.Vector4)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector4.cs:278
    19. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    20.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    21.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    22.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    23.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    24.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    25.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    26. Error: IL2CPP error for method 'System.Single UnityEngine.Vector3::Magnitude(UnityEngine.Vector3)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:379
    27. System.ArgumentException: An item with the same key has already been added. Key: Vector4_get_zero_m3D61F5FA9483CD9C08977D9D8852FB448B4CE6D1UnityEngine_MetadataUsageId
    28.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    29.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    30.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    31.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    32.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    33.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    34. Error: IL2CPP error for method 'System.Int32 UnityEngine.Vector4::GetHashCode()' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector4.cs:147
    35. System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_zero_m0C1249C3F25B1C70EAD3CC8B31259975A457AE39UnityEngine_MetadataUsageId
    36.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    37.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    38.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    39.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    40.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    41.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    42. 0x00007ff7cff7284d (Unity) StackWalker::GetCurrentCallstack
    43. 0x00007ff7cff79529 (Unity) StackWalker::ShowCallstack
    44. 0x00007ff7d0ee9dc3 (Unity) GetStacktrace
    45. 0x00007ff7d158621d (Unity) DebugStringToFile
    46. 0x00007ff7cf146062 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    47. 0x00000255c74bc3e3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    48. 0x00000255c74bc31b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    49. 0x00000255c74bc0a0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    50. 0x00000255c74bbf65 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    51. 0x00000255c74bbf0b (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:Il2CPPResultProcessor (Bee.BeeDriver.NodeResult)
    52. 0x00000255c74bb533 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:ReportBuildResults (Bee.BeeDriver.BeeDriverResult)
    53. 0x00000255c7499cb3 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
    54. 0x00000255c74987a3 (Mono JIT Code) [BuildPostprocessor.cs:160] UnityEditor.WebGL.WebGlBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
    55. 0x00000255c749836b (Mono JIT Code) UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
    56. 0x00000255c7497c48 (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    57. 0x00000255c7497f65 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
    58. 0x00007ffc49d7fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    59. 0x00007ffc49cbe764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    60. 0x00007ffc49cbe8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    61. 0x00007ff7cfe97614 (Unity) scripting_method_invoke
    62. 0x00007ff7cfe76eb4 (Unity) ScriptingInvocation::Invoke
    63. 0x00007ff7d18f76a1 (Unity) CallMono
    64. 0x00007ff7d18ff957 (Unity) PostprocessPlayer
    65. 0x00007ff7d18fa55f (Unity) DoBuildPlayer_PostBuild
    66. 0x00007ff7d18f852e (Unity) DoBuildPlayer
    67. 0x00007ff7d18ec62d (Unity) BuildPlayer
    68. 0x00007ff7cf7757e6 (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    69. 0x00007ff7cf6e53a0 (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    70. 0x00000255c6149077 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[],bool)
    71. 0x00000255c614885b (Mono JIT Code) UnityEditor.BuildPipeline:BuildPlayerInternal (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[])
    72. 0x00000255c614834b (Mono JIT Code) UnityEditor.BuildPipeline:BuildPlayer (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[])
    73. 0x00000255c614818b (Mono JIT Code) UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
    74. 0x00000255c61478e3 (Mono JIT Code) [PublisherBuildProcessor.cs:178] Unity.Play.Publisher.Editor.PublisherBuildProcessor:OpenBuildGameDialog (UnityEditor.BuildTarget)
    75. 0x00000255c6146b4b (Mono JIT Code) [PublisherWindow.cs:749] Unity.Play.Publisher.Editor.PublisherWindow:OnWebGLBuildTargetSet ()
    76. 0x00000255c61460b3 (Mono JIT Code) [PublisherWindow.cs:510] Unity.Play.Publisher.Editor.PublisherWindow:OnCreateABuildClicked ()
    77. 0x00000255c614600d (Mono JIT Code) [PublisherWindow.cs:627] Unity.Play.Publisher.Editor.PublisherWindow/<>c__DisplayClass75_0:<SetupButton>b__0 ()
    78. 0x00000255c6145faf (Mono JIT Code) UnityEngine.UIElements.Clickable:Invoke (UnityEngine.UIElements.EventBase)
    79. 0x00000255c6145cfb (Mono JIT Code) UnityEngine.UIElements.Clickable:ProcessUpEvent (UnityEngine.UIElements.EventBase,UnityEngine.Vector2,int)
    80. 0x00000255c6145a5c (Mono JIT Code) UnityEngine.UIElements.Clickable:OnMouseUp (UnityEngine.UIElements.MouseUpEvent)
    81. 0x00000255c5cc4944 (Mono JIT Code) UnityEngine.UIElements.EventCallbackFunctor`1<TEventType_REF>:Invoke (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.PropagationPhase)
    82. 0x00000255c5cc467a (Mono JIT Code) UnityEngine.UIElements.EventCallbackRegistry:InvokeCallbacks (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.PropagationPhase)
    83. 0x00000255c5ca8f8b (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEvent (UnityEngine.UIElements.EventBase)
    84. 0x00000255c5cd9aa3 (Mono JIT Code) UnityEngine.UIElements.TextElement:HandleEvent (UnityEngine.UIElements.EventBase)
    85. 0x00000255c5ca8bf8 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
    86. 0x00000255c602604b (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    87. 0x00000255c5ca707e (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
    88. 0x00000255c5ca6c1b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    89. 0x00000255c5cacb0b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
    90. 0x00000255c5cab243 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
    91. 0x00000255c5cab19b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
    92. 0x00000255c5ca6ea3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    93. 0x00000255c5ca6763 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
    94. 0x00000255c5ca65fb (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
    95. 0x00000255c5dfe24b (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    96. 0x00000255c5dfdd33 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    97. 0x00000255c5dfdb4f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
    98. 0x00000255c5dfda8b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    99. 0x00000255c5dfd8dd (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    100. 0x00000255c5dfd996 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    101. 0x00007ffc49d7fe24 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    102. 0x00007ffc49cbe764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    103. 0x00007ffc49cbe8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    104. 0x00007ff7cfe97614 (Unity) scripting_method_invoke
    105. 0x00007ff7cfe76eb4 (Unity) ScriptingInvocation::Invoke
    106. 0x00007ff7cfe71ac5 (Unity) ScriptingInvocation::Invoke<void>
    107. 0x00007ff7cff9411a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
    108. 0x00007ff7d09cf5e8 (Unity) GUIView::ProcessRetainedMode
    109. 0x00007ff7d0f1a31b (Unity) GUIView::OnInputEvent
    110. 0x00007ff7d09cf3fa (Unity) GUIView::ProcessInputEvent
    111. 0x00007ff7d0f1b2eb (Unity) GUIView::ProcessEventMessages
    112. 0x00007ff7d0f14ebf (Unity) GUIView::GUIViewWndProc
    113. 0x00007ffd0d43e858 (USER32) CallWindowProcW
    114. 0x00007ffd0d43e299 (USER32) DispatchMessageW
    115. 0x00007ff7d0eefde3 (Unity) MainMessageLoop
    116. 0x00007ff7d0ef480b (Unity) WinMain
    117. 0x00007ff7d22820ce (Unity) __scrt_common_main_seh
    118. 0x00007ffd0c6c7034 (KERNEL32) BaseThreadInitThunk
    119. 0x00007ffd0db026a1 (ntdll) RtlUserThreadStart
    and 2nd

    Code (CSharp):
    1. BuildFailedException: Incremental Player build failed!
    2. UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <99feab6f3db6407493924fe4a179a95b>:0)
    3. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:158)
    4. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <99feab6f3db6407493924fe4a179a95b>:0)
    5. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <99feab6f3db6407493924fe4a179a95b>:0)
    6. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    7. Unity.Play.Publisher.Editor.PublisherBuildProcessor:OpenBuildGameDialog(BuildTarget) (at Library/PackageCache/com.unity.connect.share@4.2.3/Editor/PublisherBuildProcessor.cs:178)
    8. Unity.Play.Publisher.Editor.PublisherWindow:OnWebGLBuildTargetSet() (at Library/PackageCache/com.unity.connect.share@4.2.3/Editor/PublisherWindow.cs:748)
    9. Unity.Play.Publisher.Editor.PublisherWindow:OnCreateABuildClicked() (at Library/PackageCache/com.unity.connect.share@4.2.3/Editor/PublisherWindow.cs:509)
    10. Unity.Play.Publisher.Editor.<>c__DisplayClass75_0:<SetupButton>b__0() (at Library/PackageCache/com.unity.connect.share@4.2.3/Editor/PublisherWindow.cs:627)
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    i did call vector2 variable but didn't use vector2_get_zero or vector2.zero
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    To make sure that I understand, when you create a new, empty project with the 3D template, does this same error occur?
     
  5. unity_RNFT2fcmU8xvTA

    unity_RNFT2fcmU8xvTA

    Joined:
    Jan 18, 2021
    Posts:
    1
    Hi, same for me here. I've tried both solutions here with an empty project but still got errors.

    I also downgrade 2021.3.9f1 to 2021.3.6f1 but still got an error.

    ok, right now I just have Windows Build Support (IL2CPP) installed and got an new errors.

    Code (CSharp):
    1. C:\Program Files\Unity\Hub\Editor\2021.3.10f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Configuration.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Burst.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Burst.Unsafe.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Mathematics.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.RenderPipeline.Universal.ShaderLibrary.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.RenderPipelines.Core.Runtime.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.RenderPipelines.Universal.Runtime.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteMaskModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SubsystemsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsNativeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.VRModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.XRModule.dll --data-folder=C:/Users/xxx/Documents/xxxx/UnityProjects/xxxx/My project (1)/Library/Bee/artifacts/WebGL/il2cppOutput/data --generatedcppdir=C:/Users/xxx/Documents/xxxx/UnityProjects/xxxx/My project (1)/Library/Bee/artifacts/WebGL/il2cppOutput/cpp --enable-analytics --emit-method-map --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=C:/Users/xxx/Documents/xxxx/UnityProjects/xxxx/My project (1)/Library/Bee/artifacts/il2cpp_conv_2k1y.traceevents --print-command-line
    2. Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::get_zero()' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector3.cs:421
    3. System.ArgumentException: An item with the same key has already been added. Key: TextureRegistry_get_instance_m4E974FC5F20C8DD77920F121ECD4F26FAC01385FUnityEngine_MetadataUsageId
    4.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    5.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    6.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    7.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    8.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    9.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    10. Error: IL2CPP error for method 'System.Boolean UnityEngine.Vector4::op_Equality(UnityEngine.Vector4,UnityEngine.Vector4)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector4.cs:278
    11. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    12.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    13.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    14.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    15.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    16.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    17.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    18. Error: IL2CPP error for method 'System.Boolean UnityEngine.Vector2::op_Equality(UnityEngine.Vector2,UnityEngine.Vector2)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Vector2.cs:363
    19. System.ArgumentException: An item with the same key has already been added. Key: Mathf_RoundToInt_m60F8B66CF27F1FA75AA219342BD184B75771EB4BUnityEngine_MetadataUsageId
    20.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    21.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    22.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    23.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    24.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    25.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    26. Error: IL2CPP error for method 'System.Single UnityEngine.Mathf::Clamp01(System.Single)' in /Users/bokken/buildslave/unity/build/Runtime/Export/Math/Mathf.cs:311
    27. System.ArgumentException: An item with the same key has already been added. Key: Vector2_get_zero_m32506C40EC2EE7D5D4410BF40D3EE683A3D5F32CUnityEngine_MetadataUsageId
    28.    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    29.    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    30.    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    31.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    32.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    33.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    34. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    Somehow I just fixed the issue by chance. I went back to my VR project and I can't build also because there's an error same as this post https://forum.unity.com/threads/failed-to-resolve-target-api-for-values.1243390/ turns out, my problem was solved by changing the Regional Format to English.

    upload_2022-9-24_0-33-41.png

    after that, I went back and build my WebGL Project again, now everything is working.
     
    Last edited: Sep 23, 2022
  6. s5904062663182

    s5904062663182

    Joined:
    Aug 8, 2022
    Posts:
    9
    oh sorry. it's not the same. this is an error that I got if I build from an empty project.


    Code (CSharp):
    1. Building Library\Bee\artifacts\WebGL\GameAssembly\master_WebGL_wasm\ryrx_mscorlib.o failed with output:
    2. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:14:38: error: unknown type name 'RuntimeMethod'
    3.         typedef void (*Action)(void*, const RuntimeMethod*);
    4.                                             ^
    5. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:16:29: error: unknown type name 'Il2CppMethodSlot'
    6.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
    7.                                    ^
    8. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:16:52: error: unknown type name 'RuntimeObject'
    9.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
    10.                                                           ^
    11. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:18:9: error: unknown type name 'VirtualInvokeData'
    12.                 const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
    13.                       ^
    14. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:25:42: error: unknown type name 'RuntimeMethod'
    15.         typedef void (*Action)(void*, T1, const RuntimeMethod*);
    16.                                                 ^
    17. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:27:29: error: unknown type name 'Il2CppMethodSlot'
    18.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
    19.                                    ^
    20. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:27:52: error: unknown type name 'RuntimeObject'
    21.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
    22.                                                           ^
    23. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:29:9: error: unknown type name 'VirtualInvokeData'
    24.                 const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
    25.                       ^
    26. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:36:46: error: unknown type name 'RuntimeMethod'
    27.         typedef void (*Action)(void*, T1, T2, const RuntimeMethod*);
    28.                                                     ^
    29. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:38:29: error: unknown type name 'Il2CppMethodSlot'
    30.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2)
    31.                                    ^
    32. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:38:52: error: unknown type name 'RuntimeObject'
    33.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2)
    34.                                                           ^
    35. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:40:9: error: unknown type name 'VirtualInvokeData'
    36.                 const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
    37.                       ^
    38. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:47:50: error: unknown type name 'RuntimeMethod'
    39.         typedef void (*Action)(void*, T1, T2, T3, const RuntimeMethod*);
    40.                                                         ^
    41. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:49:29: error: unknown type name 'Il2CppMethodSlot'
    42.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
    43.                                    ^
    44. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:49:52: error: unknown type name 'RuntimeObject'
    45.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
    46.                                                           ^
    47. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:51:9: error: unknown type name 'VirtualInvokeData'
    48.                 const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
    49.                       ^
    50. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:58:58: error: unknown type name 'RuntimeMethod'
    51.         typedef void (*Action)(void*, T1, T2, T3, T4, T5, const RuntimeMethod*);
    52.                                                                 ^
    53. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:60:29: error: unknown type name 'Il2CppMethodSlot'
    54.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
    55.                                    ^
    56. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\mscorlib.cpp:60:52: error: unknown type name 'RuntimeObject'
    57.         static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
    58.                                                           ^
    59. fatal error: too many errors emitted, stopping now [-ferror-limit=]
    60. 20 errors generated.
    61. emcc2: error: '"C:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\clang++.exe" -target wasm32-unknown-emscripten -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=19 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL "--sysroot=C:\Program Files\Unity\Hub\Editor\2021.3.10f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\cache\sysroot" -Xclang -iwithsysroot/include\compat -D__webgl__ -Wno-c++11-extensions -Wno-nonportable-include-path -ffunction-sections -fno-unwind-tables -fomit-frame-pointer -fno-threadsafe-statics -std=c++11 -Wno-#warnings -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DHAVE_BDWGC_GC -DNDEBUG -I. -IC:/uniPJ/UniTest/Library/Bee/artifacts/WebGL/il2cppOutput/cpp "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/libil2cpp/pch" "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/libil2cpp" "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/external/baselib/Include" "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include" -Oz -fcolor-diagnostics -fdiagnostics-absolute-paths -UGC_THREADS -UUSE_MMAP -UUSE_MUNMAP -c -xc++ C:/uniPJ/UniTest/Library/Bee/artifacts/WebGL/il2cppOutput/cpp/mscorlib.cpp -o Library/Bee/artifacts/WebGL/GameAssembly/master_WebGL_wasm/ryrx_mscorlib.o' failed (1)
    62. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    Code (CSharp):
    1. Building Library\Bee\artifacts\WebGL\GameAssembly\master_WebGL_wasm\dx5f_TypeValues.o failed with output:
    2. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:980:1: error: unknown type name 'IL2CPP_EXTERN_C_BEGIN'
    3. IL2CPP_EXTERN_C_BEGIN
    4. ^
    5. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:981:20: error: expected ';' after top level declarator
    6. IL2CPP_EXTERN_C_END
    7.                    ^
    8.                    ;
    9. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1050:79: error: expected class name
    10. struct EqualityComparer_1_t209913D8BB9C5DF2E3F26BA94AD53F39604FBFB8  : public RuntimeObject
    11.                                                                               ^
    12. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1061:79: error: expected class name
    13. struct EqualityComparer_1_t7DB7FC11B7957026D1FB280BF9E0D8D8DBEE039A  : public RuntimeObject
    14.                                                                               ^
    15. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1072:85: error: expected class name
    16. struct APIUpdaterRuntimeHelpers_t5AAE6FE9D573002EAD03E4D17F910902D815EED3  : public RuntimeObject
    17.                                                                                     ^
    18. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1077:65: error: expected class name
    19. struct ASN1_t33549D58797C9C33AA83F13AD184EAA00C584A6F  : public RuntimeObject
    20.                                                                 ^
    21. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1088:72: error: expected class name
    22. struct ASN1Convert_tDA6D2B7710D7868F3D559D5BE7F2C7816BB50AB6  : public RuntimeObject
    23.                                                                        ^
    24. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1093:79: error: expected class name
    25. struct ActivationServices_t688315315A97608B7C0ACD314FCECFD6ED5AE2CF  : public RuntimeObject
    26.                                                                               ^
    27. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1100:2: error: unknown type name 'RuntimeObject'
    28.         RuntimeObject* ____constructionActivator_0;
    29.         ^
    30. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1104:70: error: expected class name
    31. struct Activator_tB31D4E2D282C5AA90D61D6EB0A297A5D3D41DA24  : public RuntimeObject
    32.                                                                      ^
    33. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1109:79: error: expected class name
    34. struct AppContextSwitches_t542F10E9BE2333B7BE24C8858C8A24EFA6C06D38  : public RuntimeObject
    35.                                                                               ^
    36. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1124:84: error: expected class name
    37. struct AppDomainLevelActivator_tF729C4269DFEA1EE766C5C1F92AFA0957DF286A7  : public RuntimeObject
    38.                                                                                    ^
    39. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1129:2: error: unknown type name 'RuntimeObject'
    40.         RuntimeObject* ____next_1;
    41.         ^
    42. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1133:75: error: expected class name
    43. struct AppDomainSetup_tCECBEFD01C102F2D0027CBB0C071FA66B87803C4  : public RuntimeObject
    44.                                                                           ^
    45. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1166:2: error: unknown type name 'RuntimeObject'
    46.         RuntimeObject* ____activationArguments_15;
    47.         ^
    48. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1168:2: error: unknown type name 'RuntimeObject'
    49.         RuntimeObject* ___domain_initializer_16;
    50.         ^
    51. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1170:2: error: unknown type name 'RuntimeObject'
    52.         RuntimeObject* ___application_trust_17;
    53.         ^
    54. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1206:2: error: unknown type name 'Il2CppIUnknown'
    55.         Il2CppIUnknown* ____activationArguments_15;
    56.         ^
    57. C:\uniPJ\UniTest\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\Il2CppCCalculateTypeValues.cpp:1207:2: error: unknown type name 'Il2CppIUnknown'
    58.         Il2CppIUnknown* ___domain_initializer_16;
    59.         ^
    60. fatal error: too many errors emitted, stopping now [-ferror-limit=]
    61. 20 errors generated.
    62. emcc2: error: '"C:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\clang++.exe" -target wasm32-unknown-emscripten -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=19 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL "--sysroot=C:\Program Files\Unity\Hub\Editor\2021.3.10f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\cache\sysroot" -Xclang -iwithsysroot/include\compat -D__webgl__ -Wno-c++11-extensions -Wno-nonportable-include-path -ffunction-sections -fno-unwind-tables -fomit-frame-pointer -fno-threadsafe-statics -std=c++11 -Wno-#warnings -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DHAVE_BDWGC_GC -DNDEBUG -I. -IC:/uniPJ/UniTest/Library/Bee/artifacts/WebGL/il2cppOutput/cpp "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/libil2cpp/pch" "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/libil2cpp" "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/external/baselib/Include" "-IC:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include" -Oz -fcolor-diagnostics -fdiagnostics-absolute-paths -UGC_THREADS -UUSE_MMAP -UUSE_MUNMAP -c -xc++ C:/uniPJ/UniTest/Library/Bee/artifacts/WebGL/il2cppOutput/cpp/Il2CppCCalculateTypeValues.cpp -o Library/Bee/artifacts/WebGL/GameAssembly/master_WebGL_wasm/dx5f_TypeValues.o' failed (1)
    63. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    Code (CSharp):
    1. BuildFailedException: Incremental Player build failed!
    2. UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <99feab6f3db6407493924fe4a179a95b>:0)
    3. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:158)
    4. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <99feab6f3db6407493924fe4a179a95b>:0)
    5. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <99feab6f3db6407493924fe4a179a95b>:0)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    Code (CSharp):
    1. Build completed with a result of 'Failed' in 13 seconds (12698 ms)
    2. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    3.  
    Code (CSharp):
    1. UnityEditor.BuildPlayerWindow+BuildMethodException: 31 errors
    2.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <99feab6f3db6407493924fe4a179a95b>:0
    3.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <99feab6f3db6407493924fe4a179a95b>:0
    4. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    5.  
    ^31 error from empty project

    Code (CSharp):
    1. [Version and Build] Build failed! 00:00:12.6981547
    2. UnityEngine.Debug:LogError (object)
    3. Unity.Play.Publisher.Editor.PublisherBuildProcessor/<WaitUntilBuildFinishes>d__7:MoveNext () (at Library/PackageCache/com.unity.connect.share@4.2.3/Editor/PublisherBuildProcessor.cs:77)
    4. Unity.EditorCoroutines.Editor.EditorCoroutine/YieldProcessor:MoveNext (System.Collections.IEnumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:80)
    5. Unity.EditorCoroutines.Editor.EditorCoroutine:ProcessIEnumeratorRecursive (System.Collections.IEnumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:134)
    6. Unity.EditorCoroutines.Editor.EditorCoroutine:MoveNext () (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:115)
    7. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @s5904062663182: I would recommend re-installing Unity. This seems like some of the files in the installation are incorrect.
     
  8. s5904062663182

    s5904062663182

    Joined:
    Aug 8, 2022
    Posts:
    9
    I don't know if because of unity hub or not I'm re-install both unity-hub and unity editor and then restarting and installing 2021.3.10f1 with unity hub still got the same error for both empty projects and the main project.

    both unity hub and project installed in driver C:
    i did try install drive D before and it's still the same error

    i might try this because I'm using Thailand region right now.
     
  9. s5904062663182

    s5904062663182

    Joined:
    Aug 8, 2022
    Posts:
    9
    [SOLVED] It's I don't need to install "Windows Build Support (IL2CPP)". i just change the regional format to English and now I can build the project.

    building with WebGL publisher has no error.

    building with unity build and run got a memory leak <----- maybe need help for this one next
    Code (CSharp):
    1. A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
    thank you guys for the help.
     
    JoshPeterson likes this.
  10. s5904062663182

    s5904062663182

    Joined:
    Aug 8, 2022
    Posts:
    9
    somehow when i disabled the compression format. the project that i build will be stuck at 90%. but if I select zip it work fine
     
  11. thaimegasoft

    thaimegasoft

    Joined:
    Dec 2, 2022
    Posts:
    3
    Build WebGL fail
    =================================================

    C:\Program Files\Unity\Hub\Editor\2021.3.15f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Cinemachine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Configuration.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Burst.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Burst.Unsafe.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Mathematics.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.RenderPipeline.Universal.ShaderLibrary.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.RenderPipelines.Core.Runtime.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.RenderPipelines.Universal.Runtime.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.TextMeshPro.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Timeline.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Unity.Tutorials.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.DirectorModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.ParticleSystemModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteMaskModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SubsystemsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIElementsNativeModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.VRModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.XRModule.dll --data-folder=D:/Unity Projects/Purely2D/Library/Bee/artifacts/WebGL/il2cppOutput/data --generatedcppdir=D:/Unity Projects/Purely2D/Library/Bee/artifacts/WebGL/il2cppOutput/cpp --enable-analytics --emit-method-map --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=D:/Unity Projects/Purely2D/Library/Bee/artifacts/il2cpp_conv_3ws2.traceevents --print-command-line
    Error: IL2CPP error for method 'System.Single Unity.Mathematics.math::asfloat(System.Int32)' in D:/Unity Projects/Purely2D/Library/PackageCache/com.unity.mathematics@1.2.6/Unity.Mathematics/math.cs:295
    System.ArgumentException: An item with the same key has already been added. Key: Single_IsNaN_mFE637F6ECA9F7697CE8EFF56427858F4C5EDF75DUnity_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::get_zero()' in /Users/bokken/build/output/unity/unity/Runtime/Export/Math/Vector3.cs:421
    System.ArgumentException: An item with the same key has already been added. Key: Mathf_RoundToInt_m60F8B66CF27F1FA75AA219342BD184B75771EB4BUnityEngine_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'System.Boolean UnityEngine.Vector4::eek:p_Equality(UnityEngine.Vector4,UnityEngine.Vector4)' in /Users/bokken/build/output/unity/unity/Runtime/Export/Math/Vector4.cs:278
    System.ArgumentException: An item with the same key has already been added. Key: Matrix4x4_get_identity_m6568A73831F3E2D587420D20FF423959D7D8AB56UnityEngine_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'System.Int32 System.BitConverter::SingleToInt32Bits(System.Single)' in assembly 'D:\Unity Projects\Purely2D\Library\Bee\artifacts\WebGL\ManagedStripped\mscorlib.dll'
    System.ArgumentException: An item with the same key has already been added. Key: Matrix4x4_get_identity_m6568A73831F3E2D587420D20FF423959D7D8AB56Unity_RenderPipelines_Universal_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'System.Void UnityEngine.Color::.ctor(System.Single,System.Single,System.Single,System.Single)' in /Users/bokken/build/output/unity/unity/Runtime/Export/Math/Color.cs:38
    System.ArgumentException: An item with the same key has already been added. Key: Mathf_Approximately_m1DADD012A8FC82E11FB282501AE2EBBF9A77150BUnity_RenderPipelines_Universal_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'System.Int32 UnityEngine.Vector4::GetHashCode()' in /Users/bokken/build/output/unity/unity/Runtime/Export/Math/Vector4.cs:147
    System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_zero_m0C1249C3F25B1C70EAD3CC8B31259975A457AE39UnityEngine_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'UnityEngine.Vector3 UnityEngine.Vector3::eek:p_Multiply(UnityEngine.Vector3,System.Single)' in /Users/bokken/build/output/unity/unity/Runtime/Export/Math/Vector3.cs:449
    System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_zero_m0C1249C3F25B1C70EAD3CC8B31259975A457AE39Unity_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    Error: IL2CPP error for method 'System.Void Unity.Profiling.ProfilerMarker/AutoScope::.ctor(System.IntPtr)' in /Users/bokken/build/output/unity/unity/Runtime/Profiler/ScriptBindings/ProfilerMarker.bindings.cs:103
    System.ArgumentException: An item with the same key has already been added. Key: Vector3_get_one_mC9B289F1E15C42C597180C9FE6FB492495B51D02UnityEngine_MetadataUsageId
    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    at Unity.IL2CPP.Contexts.Components.MetadataUsageCollectorComponent.Add(String identifier, MethodMetadataUsage usage)
    at Unity.IL2CPP.CodeWriters.ManagedSourceCodeWriter.Dispose()
    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath)
    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data)
    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
    Last edited: Dec 7, 2022
  12. thaimegasoft

    thaimegasoft

    Joined:
    Dec 2, 2022
    Posts:
    3
    Build error.

    BuildFailedException: Incremental Player build failed!
    UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <63965ae56af7489797f355b7c1211ab2>:0)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:179)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <63965ae56af7489797f355b7c1211ab2>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <63965ae56af7489797f355b7c1211ab2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    =================
    Build completed with a result of 'Failed' in 174 seconds (173909 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936

    Can you try the latest Unity 2021.3 release? This looks like an issue that we may have already corrected.
     
  14. thaimegasoft

    thaimegasoft

    Joined:
    Dec 2, 2022
    Posts:
    3
    =======
    I use ==> 2021.3.15f1
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
  16. zbalai

    zbalai

    Joined:
    May 28, 2012
    Posts:
    21
    I spent like ten hours on a WEBGL build error on an empty project.
    Solution was - it seems now - that I also installed Android and PC CPP build for the editor.
    Now the project gets built.
    2023.07.09
    Unity version 2022.3.4f1
     
  17. Skyblade

    Skyblade

    Joined:
    Nov 19, 2013
    Posts:
    77
    I had to change regional settings as well, then reboot and reinstall Unity Editor, delete Library and Temp folders, start Clean build. Only then WebGL started to build.
    Also, when choosing Runtime Speed optimisation, it takes forever to link build.js (wasm).