Unity2020.3.25f1c1 + fmodstudio20205 Error Running Program

[18:37:36:274] ArgumentException: An item with the same key has already been added. Key: WebGL
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
FMODUnity.EditorSettings.AddMissingPlatforms () (at Assets/Plugins/FMOD/src/Editor/EditorSettings.cs:194)
FMODUnity.Settings.OnEnable () (at Assets/Plugins/FMOD/src/Settings.cs:618)
[18:37:37:133] ArgumentNullException: Value cannot be null.
Parameter name: value
System.RuntimeType.IsEnumDefined (System.Object value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.IsDefined (System.Type enumType, System.Object value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
FMODUnity.Platform.GetOutputType () (at Assets/Plugins/FMOD/src/Platform.cs:942)
FMODUnity.RuntimeManager.Initialize () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:250)
FMODUnity.RuntimeManager.get_Instance () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:163)
Rethrow as SystemNotInitializedException: [FMOD] Initialization failed
FMODUnity.RuntimeManager.get_Instance () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:172)
FMODUnity.RuntimeManager.get_StudioSystem () (at Assets/Plugins/FMOD/src/RuntimeManager.cs:186)
FMODUnity.RuntimeManager.AddListener (FMODUnity.StudioListener listener) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:438)
FMODUnity.StudioListener.OnEnable () (at Assets/Plugins/FMOD/src/StudioListener.cs:28)

Can you please enable API error logging in the FMOD Unity settings and share the resulting log, as well as some steps to reproduce this error?

Realized the above was coming from an editor tool that I myself built. mb

Hm. Changed my mind. Actually this is a problem in FMOD. The error is coming from this usage of LoadAssetAtPath:

Here’s the post I deleted:

Just hit this error on Unity 2021.3.2, FMOD 2.02.04. However in our case it occurs during bank load (preventing sound from working):

ArgumentException: An item with the same key has already been added. Key: WebGL
System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <e38a6d3ee47c43eb9b2e49c63fc0aa48>:0)
System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) (at <e38a6d3ee47c43eb9b2e49c63fc0aa48>:0)
FMODUnity.EditorSettings.AddPlatformForBuildTargets (FMODUnity.Platform platform) (at Assets/Plugins/FMOD/src/Editor/EditorSettings.cs:74)
FMODUnity.Settings.LinkPlatform (FMODUnity.Platform platform) (at Assets/Plugins/FMOD/src/Settings.cs:445)
FMODUnity.Settings.ForEachPlatform (System.Action`1[T] action) (at Assets/Plugins/FMOD/src/Settings.cs:411)
FMODUnity.Settings.OnEnable () (at Assets/Plugins/FMOD/src/Settings.cs:630)
UnityEditor.AssetDatabase:LoadAssetAtPath(String, Type)
DirtyBoy.Watcher:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Library/PackageCache/computer.rhys.dirty-boy@1.1.0/Editor/Watcher.cs:13)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[], Boolean) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:385)

Deleting the FMOD cache appears to have fixed the problem.

This resembles an issue that was resolved in 2.02.09. Can you please try updating to the latest version of the FMOD for Unity integration and let me know if you hit this again?