chocolatey/choco · error · NotSupportedException
No runner was found that implements source type '{0}' or, it
Error message
No runner was found that implements source type '{0}' or, it does not support requested functionality. What it means
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).
Source
Thrown at src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs:211
where TSourceRunner : class, IAlternativeSourceRunner
{
var runner = GetSourceRunner(config.SourceType, alternativeSourceRunners);
if (runner != null && function != null)
{
if (runner is IBootstrappableSourceRunner bootstrapper)
{
// NOTE: Here we are passing the original config into the HandlePackageResult method, rather than what comes out of the Action, since
// that configuration could be wildly different from what was passed in, and we want to continue with what was in play before
// installing the required source application.
bootstrapper.EnsureSourceAppInstalled(config, (packageResult, configuration) => HandlePackageResult(packageResult, config, CommandNameType.Install));
}
return function.Invoke(runner);
}
if (throwOnException)
{
throw new NotSupportedException("No runner was found that implements source type '{0}' or, it does not support requested functionality.".FormatWith(config.SourceType));
}
else
{
this.Log().Warn("No runner was found that implements source type '{0}' or, it does not support requested functionality.".FormatWith(config.SourceType));
}
return default;
}
public void ListDryRun(ChocolateyConfiguration config)
{
if (string.IsNullOrWhiteSpace(config.Sources) && !config.ListCommand.LocalOnly)
{
this.Log().Error(ChocolateyLoggers.Important, @"Unable to search for packages when there are no sources enabled for
packages and none were passed as arguments.");
Environment.ExitCode = 1;
return;
}
View on GitHub (pinned to 0d5abdd10c)
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
Example fix
// before choco search mypackage --source-type=windowsfeatures // throws if windowsfeatures runner doesn't implement ISearchableSourceRunner // after (use normal source for search) choco search mypackage // or list windows features directly if supported: choco list --source-type=windowsfeatures
Defensive patterns
Strategy: validation
Validate before calling
// Validate source type supports the required function interface before calling
if (!sourceTypeRunnerImplements<ISearchableSourceRunner>(sourceType))
{
Console.Error.WriteLine($"Source type '{sourceType}' does not support search/count operations.");
return;
}
bool sourceTypeRunnerImplements<T>(string sourceType) where T : class
{
var runners = container.ResolveAll<T>();
return runners.Any(r => GetSourceRunnerName(r) == sourceType);
} Type guard
public static bool SupportsSearchOperation(IAlternativeSourceRunner runner)
{
return runner is ISearchableSourceRunner;
} Try / catch
try
{
var count = packageService.Count(config);
}
catch (NotSupportedException ex) when (ex.Message.Contains("No runner was found") && ex.Message.Contains("functionality"))
{
logger.Error($"Source type '{config.SourceType}' doesn't support this operation. Use a compatible source.");
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No runner was found that implements source type '{0}' or act
- The '{0}' source does not support listing of packages
- When using the '--source' option with the 'choco list' comma
- The '{0}' source does not support searching for packages
- You must specify 'source' to remove an API key.
AI-assisted analysis of chocolatey/choco@0d5abdd10c (2026-08-13).
Data as JSON: /api/errors/54f35ee388f886f4.
Report an issue: GitHub.