{"record":{"id":"54f35ee388f886f4","repo":"chocolatey/choco","slug":"no-runner-was-found-that-implements-source-type-54f35e","errorCode":null,"errorMessage":"No runner was found that implements source type '{0}' or, it does not support requested functionality.","messagePattern":"No runner was found that implements source type '(.+?)' or, it does not support requested functionality\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs","lineNumber":211,"sourceCode":"            where TSourceRunner : class, IAlternativeSourceRunner\r\n        {\r\n            var runner = GetSourceRunner(config.SourceType, alternativeSourceRunners);\r\n            if (runner != null && function != null)\r\n            {\r\n                if (runner is IBootstrappableSourceRunner bootstrapper)\r\n                {\r\n                    // NOTE: Here we are passing the original config into the HandlePackageResult method, rather than what comes out of the Action, since\r\n                    // that configuration could be wildly different from what was passed in, and we want to continue with what was in play before\r\n                    // installing the required source application.\r\n                    bootstrapper.EnsureSourceAppInstalled(config, (packageResult, configuration) => HandlePackageResult(packageResult, config, CommandNameType.Install));\r\n                }\r\n\r\n                return function.Invoke(runner);\r\n            }\r\n\r\n            if (throwOnException)\r\n            {\r\n                throw new NotSupportedException(\"No runner was found that implements source type '{0}' or, it does not support requested functionality.\".FormatWith(config.SourceType));\r\n            }\r\n            else\r\n            {\r\n                this.Log().Warn(\"No runner was found that implements source type '{0}' or, it does not support requested functionality.\".FormatWith(config.SourceType));\r\n            }\r\n\r\n            return default;\r\n        }\r\n\r\n        public void ListDryRun(ChocolateyConfiguration config)\r\n        {\r\n            if (string.IsNullOrWhiteSpace(config.Sources) && !config.ListCommand.LocalOnly)\r\n            {\r\n                this.Log().Error(ChocolateyLoggers.Important, @\"Unable to search for packages when there are no sources enabled for\r\n packages and none were passed as arguments.\");\r\n                Environment.ExitCode = 1;\r\n                return;\r\n            }\r","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/chocolatey/choco/blob/0d5abdd10cc177a141e69547cad6935b419b6c17/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs#L193-L229","documentation":"Thrown by ChocolateyPackageService.PerformSourceRunnerFunction (the function/TResult overload) when GetSourceRunner returns null for config.SourceType or the function delegate is null, with throwOnException true. This is the TResult-returning counterpart of error 57, used for operations like Search and Count that return values rather than perform side effects. The runner either doesn't exist for the source type or doesn't implement the required interface (e.g., ISearchableSourceRunner, ICountSourceRunner).","triggerScenarios":"Requesting a search or count on an alternative source type whose runner is registered but doesn't implement the specific function interface (e.g., runner exists for ISourceRunner but not ISearchableSourceRunner). The source type has no runner at all. The function parameter is null due to an internal code error. throwOnException is true on the function path.","commonSituations":"Source type runner is installed for install/uninstall operations but doesn't support search/count. Extension provides partial source runner capability. User expects all source types to support all operations. Source type extension is partially installed or version-incompatible.","solutions":["Verify the source type runner supports the operation you're performing (search, count, etc.)","Use the default normal source type for search/list operations if the alternative source doesn't support them","Install or update the extension that provides full source runner support including the needed interface","Check documentation for which operations each source type supports"],"exampleFix":"// before\nchoco search mypackage --source-type=windowsfeatures\n// throws if windowsfeatures runner doesn't implement ISearchableSourceRunner\n\n// after (use normal source for search)\nchoco search mypackage\n// or list windows features directly if supported:\nchoco list --source-type=windowsfeatures","handlingStrategy":"validation","validationCode":"// Validate source type supports the required function interface before calling\nif (!sourceTypeRunnerImplements<ISearchableSourceRunner>(sourceType))\n{\n    Console.Error.WriteLine($\"Source type '{sourceType}' does not support search/count operations.\");\n    return;\n}\n\nbool sourceTypeRunnerImplements<T>(string sourceType) where T : class\n{\n    var runners = container.ResolveAll<T>();\n    return runners.Any(r => GetSourceRunnerName(r) == sourceType);\n}","typeGuard":"public static bool SupportsSearchOperation(IAlternativeSourceRunner runner)\n{\n    return runner is ISearchableSourceRunner;\n}","tryCatchPattern":"try\n{\n    var count = packageService.Count(config);\n}\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"No runner was found\") && ex.Message.Contains(\"functionality\"))\n{\n    logger.Error($\"Source type '{config.SourceType}' doesn't support this operation. Use a compatible source.\");\n}","preventionTips":["Check which operations (search, count, install) each source type supports","Use the normal source type for standard NuGet operations","Ensure source runner extensions implement all required interfaces for your use case","Verify extension compatibility with your Chocolatey version"],"tags":["source","source-type","runner","interface-mismatch","alternative-source","search"],"backgroundTag":null,"analyzedSha":"0d5abdd10cc177a141e69547cad6935b419b6c17","analyzedAt":"2026-08-13T18:33:03.301Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}