ArgumentException: An item with the same key has already been added.

When opening unity, we sometimes have the following log :

ArgumentException: An item with the same key has already been added. Key: Check Duplicate Bundle Dependencies
      at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <567df3e0919241ba98db88bec4c6696f>:0
      at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
      at UnityEditor.AddressableAssets.Build.AnalyzeRules.AnalyzeResultData.OnAfterDeserialize () [0x00005] in D:\jenkins\workspace\UHM\Library\PackageCache\com.unity.addressables@1.6.0\Editor\Build\AnalyzeRules\AnalyzeResultData.cs:31

When this happens, we usually have errors in the final build regarding adressables, as they are not all built. The build otherwise is built correctly.

Any idea what might cause that? We saw that just a couple days ago and itā€™s hard to get what the cause might be as itā€™s pretty random.

Weā€™re on Unity 2019.2.13f1, using Addressables 1.6.2

1 Like

Ancient thread, but Iā€™m seeing the same error and thereā€™s not really any context to follow it. It occurs when doing a build from the Addressables Groups tab.

ArgumentException: An item with the same key has already been added. Key: 7cfa27aebb5612c4aa22dee300a322d5
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.Build.Pipeline.BundleBuildContent..ctor (System.Collections.Generic.IEnumerable`1[T] bundleBuilds) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.7.3/Editor/Shared/BuildContent.cs:161)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.DoBuild[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext aaContext) (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:157)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:78)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase.BuildData[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/Build/DataBuilders/BuildScriptBase.cs:74)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContentImpl () (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/Settings/AddressableAssetSettings.cs:1722)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContent () (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/Settings/AddressableAssetSettings.cs:1704)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildPlayerData () (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:270)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildScript (System.Object context) (at Library/PackageCache/com.unity.addressables@1.8.5/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:265)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <d7545a46516941d4b2f2dec578cd41ee>:0)

I would assume itā€™s trying to tell me that maybe an asset exists in multiple bundles, but why not throw a warning up or something instead? It just falls on its face here.

Iā€™ll ping the team. Which version of Addressables are you using?

1.8.5 on Unity 2019.4.8f1. The error was persisting through restarts etc. Recreating the addressable groups did not resolve.

I deleted all of the bundles and addressable groups, then recreated them and it seemed to resolve. I canā€™t repro the error anymore.

Thatā€™s a pretty old version of the package. Could you try updating and see if that helps?

how to find the key resource?

ArgumentException: An item with the same key has already been added. Key: ad7e587a1f3609b45bbc49c7b24db172
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.Build.Pipeline.BundleBuildContent..ctor (System.Collections.Generic.IEnumerable`1[T] bundleBuilds) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.17.0/Editor/Shared/BuildContent.cs:161)
UnityEditor.AddressableAssets.Build.AnalyzeRules.BundleRuleBase.RefreshBuild (UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext buildContext) (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/Build/AnalyzeRules/BundleRuleBase.cs:106)
UnityEditor.AddressableAssets.Build.AnalyzeRules.BundleRuleBase.CalculateBuiltInResourceDependenciesToBundleDependecies (UnityEditor.AddressableAssets.Settings.AddressableAssetSettings settings, System.String[] builtInResourcesPaths) (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/Build/AnalyzeRules/BundleRuleBase.cs:281)
UnityEditor.AddressableAssets.Build.AnalyzeRules.CheckResourcesDupeDependencies.RefreshAnalysis (UnityEditor.AddressableAssets.Settings.AddressableAssetSettings settings) (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs:32)
UnityEditor.AddressableAssets.Build.AnalyzeSystem.RefreshAnalysis (UnityEditor.AddressableAssets.Build.AnalyzeRules.AnalyzeRule rule) (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/Build/AnalyzeRules/AnalyzeSystem.cs:164)
UnityEditor.AddressableAssets.GUI.AssetSettingsAnalyzeTreeView.<RunAllSelectedRules>b__4_0 (UnityEditor.AddressableAssets.GUI.AnalyzeRuleContainerTreeViewItem ruleContainer) (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/GUI/AssetSettingsAnalyzeTreeView.cs:69)
UnityEditor.AddressableAssets.GUI.AssetSettingsAnalyzeTreeView.PerformActionForEntireRuleSelection (System.Action`1[T] action) (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/GUI/AssetSettingsAnalyzeTreeView.cs:60)
UnityEditor.AddressableAssets.GUI.AssetSettingsAnalyzeTreeView.RunAllSelectedRules () (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/GUI/AssetSettingsAnalyzeTreeView.cs:67)
UnityEditor.AddressableAssets.GUI.AnalyzeRuleGUI.<OnGUI>b__3_0 () (at Library/PackageCache/com.unity.addressables@1.17.15/Editor/GUI/AnalyzeRuleGUI.cs:38)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <42d975c3c02743a7bdf5c81753993fc0>:0)

Same issue. Unity 2019.4.18f and Addressables 1.16.19

I just was on 1.16.10 when I first got the error.

I had opened a project I hadnā€™t touched in a month. Added 4 new prefabs to an addressable group. Assigned their label and shorted their addressable name. Then clicked build and got this error.

Tried cleaning and rebuilding but it persisted.

I assumed it was something with the 4 new prefabs so I removed them and clicked build and I continue to get the error.

Looks like the last person to mess with the addressables was a teammate. Perhaps there is a clash in their setup versus mine?

I ended up closing unity. Cleaning the cache again. Then rebuilding. Now it works.

1 Like

I had the issue recently. I was on addressables 1.10.0 and updated to a later version 1.18.9 and the update alone didnā€™t fix it.

I decided to look at AddressableGroups window and remove the recently added entries and found that some how each entry was added twice.

ie. I deleted an entry but the entry remained in the group list. It was only after I tried deleting the entry again that it disappeared.

So somehow I did indeed add an Addressable entry twice but the window excludes showing any duplicates.

1 Like

Had this issue myself on Addressables 1.18.16 this week. Seems to be the same as Dr-Nick had above. After removing all of the recently added Addressable entries and then adding them again, the error went away, but there were no duplicates listed in the Addressables Groups window, and the console didnā€™t give any specifics. It would be really great if there was a way to know which Addressables were being duplicated.

the duplicate key is a GUID and you can search in the whole project folder to find references

1 Like

I get a similar issue although it doesnā€™t have anything to do with Addressable Assets. The error does say Iā€™m missing a key.

The error I get. Iā€™m not really sure whatā€™s going on so any help would be appreciated!

/Applications/Unity/Hub/Editor/2021.2.2f1/Unity.app/Contents/il2cpp/build/deploy/il2cpp @ /Bee/artifacts/rsp/6827040134566167516.rsp
Error: IL2CPP error (no further information about what managed code was being converted is available)
System.ArgumentException: An item with the same key has already been added. Key: mscorlib
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Unity.IL2CPP.DataModel.BuildLogic.CecilLoading.AssemblyCache.Populate(IEnumerable1 assemblies) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.DataModel/BuildLogic.CecilLoading/AssemblyCache.cs:line 33
at Unity.IL2CPP.DataModel.BuildLogic.CecilLoading.CecilAssemblyLoader.LoadDeferred(ReadOnlyCollection1 allAssemblyPaths, LoadParameters parameters) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.DataModel/BuildLogic.CecilLoading/CecilAssemblyLoader.cs:line 69 at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.Initialize(UnderConstruction2& systemAssembly) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.DataModel/BuildLogic/DataModelBuilder.cs:line 263
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.Build() in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.DataModel/BuildLogic/DataModelBuilder.cs:line 49
at Unity.IL2CPP.AssemblyConversion.Phases.InitializePhase.Run(AssemblyConversionContext context) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/Phases/InitializePhase.cs:line 19
at Unity.IL2CPP.AssemblyConversion.Classic.ClassicConverter.Run(AssemblyConversionContext context) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion.Classic/ClassicConverter.cs:line 11
at Unity.IL2CPP.AssemblyConversion.AssemblyConverter.ConvertAssemblies(AssemblyConversionInputData data, AssemblyConversionParameters parameters, AssemblyConversionInputDataForTopLevelAccess dataForTopLevel) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/AssemblyConverter.cs:line 30
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:179)

Experiencing a similar error as above in Unity 2020.3 when generating a Linux x86_64 IL2CPP build

Fatal error in Unity CIL Linker
System.ArgumentException: An item with the same key has already been added. Key: mscorlib
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Unity.Linker.EngineStripping.EngineModuleResolver.Initialize(UnityLinkContext context, AssemblyDefinition unityEngineFacade, ModulesAssetFile modulesAssetFile)
   at Unity.Linker.EngineStripping.EngineStrippingContext.Initialize(AssemblyDefinition unityEngineFacade)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
   at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriver()
stderr:

Simalar issue too. When Trying to build for WebGl, with wn empty project of Unity Editor 2021.3.1:
keep having ā€˜An item with the same key has already been added. Key: mscorlibā€™

Building Library\Bee\artifacts\WebGL\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2021.3.1f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=C:/_ToBurn/_ProjMy/Unity/NGToolEMptyProject_Test/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/WebGL/ManagedStripped --include-link-xml=C:/_ToBurn/_ProjMy/Unity/NGToolEMptyProject_Test/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-directory=C:/_ToBurn/_ProjMy/Unity/NGToolEMptyProject_Test/Temp/StagingArea/Data/Managed --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --architecture=EmscriptenJavaScript --platform=WebGL --use-editor-options --enable-engine-module-stripping --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/WebGLSupport/modules.asset --editor-data-file=C:/_ToBurn/_ProjMy/Unity/NGToolEMptyProject_Test/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --print-command-line
Fatal error in Unity CIL Linker
System.ArgumentException: An item with the same key has already been added. Key: mscorlib
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Unity.Linker.EngineStripping.EngineModuleResolver.Initialize(UnityLinkContext context, AssemblyDefinition unityEngineFacade, ModulesAssetFile modulesAssetFile)
at Unity.Linker.EngineStripping.EngineStrippingContext.Initialize(AssemblyDefinition unityEngineFacade)
at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
at Unity.Linker.UnityDriver.RunDriver()
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

Iā€™m not quite sure what the cause of this issue is. You might be able to work around it by disabling the ā€œStrip Engine Codeā€ option in the Player Settings though. Iā€™m curious to see if that will allow it to build, or if it will lead to a different error message later.

Hi, thank you for reply. So I test with your suggestion but it doesnā€™t works (unity 2021.3.2:
8119310--1052210--upload_2022-5-11_8-24-15.png

Building Library\Bee\artifacts\WebGL\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2021.3.2f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=C:/_ToBurn/_ProjMy/Unity/3DNotes_ReduxAsmDef/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/WebGL/ManagedStripped --include-link-xml=C:/_ToBurn/_ProjMy/Unity/3DNotes_ReduxAsmDef/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-directory=C:/_ToBurn/_ProjMy/Unity/3DNotes_ReduxAsmDef/Temp/StagingArea/Data/Managed --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --architecture=EmscriptenJavaScript --platform=WebGL --use-editor-options --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2021.3.2f1/Editor/Data/PlaybackEngines/WebGLSupport/modules.asset --editor-data-file=C:/_ToBurn/_ProjMy/Unity/3DNotes_ReduxAsmDef/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --print-command-line
Fatal error in Unity CIL Linker
System.ArgumentException: An item with the same key has already been added. Key: mscorlib
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Unity.Linker.EngineStripping.EngineModuleResolver.Initialize(UnityLinkContext context, AssemblyDefinition unityEngineFacade, ModulesAssetFile modulesAssetFile)
   at Unity.Linker.EngineStripping.EngineStrippingContext.Initialize(AssemblyDefinition unityEngineFacade)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
   at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
   at Unity.Linker.UnityDriver.RunDriver()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <a017e354f3154926a5617fbac3a64fcc>:0)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:158)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <a017e354f3154926a5617fbac3a64fcc>: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 <a017e354f3154926a5617fbac3a64fcc>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 4 seconds (3808 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <a017e354f3154926a5617fbac3a64fcc>:0
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <a017e354f3154926a5617fbac3a64fcc>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Odd - Iā€™m surprised that code is running when engine code stripping is disabled. Can you submit a bug report for this issue?

It works now. Ok here is what i do ( itā€™s extreme, but i have tried many things and none fixed it):

  • Uninstall All unity Editor
  • Then Uninstall UnityHub
  • Reinstall UnitHub
  • Reinstall Unity editor 2021.3.2
  • create new empty poject, build webgl:
    ā†’ it works

!? But, I then open a project that had issue building webGl, It still not works.

And now event the empty project that was working, itā€™s no more working!?

Event with a new empty project.

It through this similar/same error:

Building Library\Bee\artifacts\WebGL\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2021.3.2f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=C:/_ToBurn/_ProjMy/Unity/My project (3)/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/WebGL/ManagedStripped --include-link-xml=C:/_ToBurn/_ProjMy/Unity/My project (3)/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-directory=C:/_ToBurn/_ProjMy/Unity/My project (3)/Temp/StagingArea/Data/Managed --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --architecture=EmscriptenJavaScript --platform=WebGL --use-editor-options --enable-engine-module-stripping --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2021.3.2f1/Editor/Data/PlaybackEngines/WebGLSupport/modules.asset --editor-data-file=C:/_ToBurn/_ProjMy/Unity/My project (3)/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=C:/_ToBurn/_ProjMy/Unity/My project (3)/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll --print-command-line
Fatal error in Unity CIL Linker
System.ArgumentException: An item with the same key has already been added. Key: mscorlib
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Unity.Linker.EngineStripping.EngineModuleResolver.Initialize(UnityLinkContext context, AssemblyDefinition unityEngineFacade, ModulesAssetFile modulesAssetFile)
   at Unity.Linker.EngineStripping.EngineStrippingContext.Initialize(AssemblyDefinition unityEngineFacade)
   at Unity.Linker.Steps.InitializeEngineStrippingStep.Process()
   at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
   at Unity.Linker.UnityDriver.RunDriver()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <a017e354f3154926a5617fbac3a64fcc>:0)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:158)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <a017e354f3154926a5617fbac3a64fcc>: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 <a017e354f3154926a5617fbac3a64fcc>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 15 seconds (15284 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <a017e354f3154926a5617fbac3a64fcc>:0
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <a017e354f3154926a5617fbac3a64fcc>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

By reinstalling Unity (2021.3.2) (No need to reinstall Unity Hub tho), it works for new empty project. But, i wont try again, to open a project that didnā€™t work, bcz it gonna make any project wonā€™t works any more. For Build WebGl

Weird!

OK, Found the cause. I remove the following asset:

handzlikchris/Unity.MissingUnityEvents: Editor extension to generate events that are executed before property set, eg. Transform-position, Transform-rotation, Transform-parent which allows to write more event driven code or debug property changes that are not simple to track down. Easily customisable to allow adding events to different property setters / types. (github.com)