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

  1. Verify the source type runner supports the operation you're performing (search, count, etc.)
  2. Use the default normal source type for search/list operations if the alternative source doesn't support them
  3. Install or update the extension that provides full source runner support including the needed interface
  4. 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

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


AI-assisted analysis of chocolatey/choco@0d5abdd10c (2026-08-13). Data as JSON: /api/errors/54f35ee388f886f4. Report an issue: GitHub.