{"record":{"id":"e2465867506c4fc4","repo":"egametang/ET","slug":"config-factory-group-not-found-configtype-fullna","errorCode":null,"errorMessage":"config factory group not found: {configType.FullName}, active groups: {string.Join(\", \", activeGroups)}, available groups: {string.Join(\", \", groupFactories.Keys)}","messagePattern":"config factory group not found: (.+?), active groups: (.+?), available groups: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.loader/Scripts/Loader/Share/ConfigLoaderHelper.cs","lineNumber":195,"sourceCode":"                    continue;\n                }\n\n                if (match != null)\n                {\n                    throw new Exception(\n                        $\"config factory group ambiguous: {configType.FullName}, matched groups: {matchedGroup}, {activeGroup}\");\n                }\n\n                match = factory;\n                matchedGroup = activeGroup;\n            }\n\n            if (match != null)\n            {\n                return match;\n            }\n\n            throw new Exception(\n                $\"config factory group not found: {configType.FullName}, active groups: {string.Join(\", \", activeGroups)}, available groups: {string.Join(\", \", groupFactories.Keys)}\");\n        }\n\n        private static List<string> GetActiveConfigGroups()\n        {\n            List<string> groups = new() { ConfigGroupNames.Config };\n            string startConfig = Options.Instance?.StartConfig;\n            if (!string.IsNullOrWhiteSpace(startConfig) && !string.Equals(startConfig, ConfigGroupNames.Config, StringComparison.Ordinal))\n            {\n                groups.Add(startConfig);\n            }\n\n            return groups;\n        }\n    }\n}\n","sourceCodeStart":177,"sourceCodeEnd":212,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.loader/Scripts/Loader/Share/ConfigLoaderHelper.cs#L177-L212","documentation":"Thrown by GetConfigFactory when no active config group contains a factory for the requested config type. The active groups are [\"Config\"] plus Options.Instance.StartConfig if set. If none of those groups register a factory for configType, the loader fails with the list of active groups and the groups that ARE available, so you can see what's missing.","triggerScenarios":"A config type exists in a group that is not currently active (e.g. it is registered under a group name that differs from both \"Config\" and Options.Instance.StartConfig). Or the config factory registration assembly was not loaded/scanned, so groupFactories.Keys does not include the expected group.","commonSituations":"StartConfig is set to a group name that has no factories for some config types the app needs. Config factory assemblies were excluded from the build or not added to the loader scan list. A config type was renamed but its ConfigGroup attribute was not updated.","solutions":["Check the 'available groups' in the error message; if the needed group exists but isn't active, set Options.Instance.StartConfig to that group name.","If the group is missing entirely, ensure the assembly containing the [Config]/[ConfigGroup] factory registration is referenced and loaded by CodeTypes scanning.","If the config type itself is missing, add the config factory class with the correct [ConfigGroup] attribute pointing to an active group."],"exampleFix":"// before: Options.StartConfig = \"Test\"; but factory only registered under \"Release\"\n// after: either set the correct StartConfig\nOptions.Instance.StartConfig = \"Release\";\n// or register the factory under the active group\n[ConfigGroup(\"Config\")]\npublic class MyConfigFactory : ConfigCategory<MyConfig> { }","handlingStrategy":"validation","validationCode":"// Before loading, verify every required config type has a factory in at least one active group\nList<string> activeGroups = GetActiveConfigGroups();\nforeach (var configType in requiredConfigTypes)\n{\n    if (!configFactories.TryGetFactories(configType, out var groups) ||\n        !activeGroups.Any(g => groups.ContainsKey(g)))\n    {\n        Log.Error($\"Config type {configType.FullName} has no factory in active groups: {string.Join(\", \", activeGroups)}\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always verify the StartConfig group name matches an existing group with factories.","Ensure all config factory assemblies are included in the build and scanned by CodeTypes.","When renaming a config type, update its [ConfigGroup] attribute and verify the group name matches an active group."],"tags":["config","loader","startup","missing-registration"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}