Devolutions/UniGetUI · warning · InvalidOperationException

No package matching id "{PackageId}" was found.

Error message

No package matching id "{PackageId}" was found.

What it means

FindSearchResult throws when no package across the ready, managerName-matching managers matches the requested id via live FindPackages search. Used by download and as the fallback for state mutation.

Source

Thrown at src/UniGetUI.Interface.IpcApi/IpcPackageApi.cs:605

            OutputPath = outputPath,
            Output = operation.GetOutput().Select(line => line.Item1).ToArray(),
        };
    }

    private static IPackage FindSearchResult(IpcPackageActionRequest request)
    {
        foreach (var manager in GetManagers(request.ManagerName))
        {
            var package = manager.FindPackages(request.PackageId).FirstOrDefault(candidate =>
                MatchesIdentity(candidate, request)
            );
            if (package is not null)
            {
                return package;
            }
        }

        throw new InvalidOperationException(
            $"No package matching id \"{request.PackageId}\" was found."
        );
    }

    private static IPackage FindAnyPackage(IpcPackageActionRequest request)
    {
        return TryFindPackageForStateMutation(request)
            ?? FindSearchResult(request);
    }

    private static IPackage FindInstalledPackage(IpcPackageActionRequest request)
    {
        var package = GetInstalledPackagesSnapshot(request.ManagerName).FirstOrDefault(candidate =>
            MatchesIdentity(candidate, request)
        );
        if (package is not null)
        {
            return package;

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Verify the package id with a search call first and use the returned id/source
  2. Ensure the relevant managers and their sources are enabled and ready
  3. Check that MatchesIdentity expectations (id + optional source) are satisfied

Example fix

// before
await IpcPackageApi.DownloadPackageAsync(
    new IpcPackageActionRequest { PackageId = "gitt" });
// after
var hit = manager.FindPackages("git").FirstOrDefault();
if (hit is null) return Result.NotFound();
await IpcPackageApi.DownloadPackageAsync(
    new IpcPackageActionRequest { PackageId = hit.Id, SourceName = hit.Source.Name });
Defensive patterns

Strategy: try-catch

Try / catch

try
{
    return FindSearchResult(request);
}
catch (InvalidOperationException) when (IsPackageNotFound(ex))
{
    return Result.NotFound($"Package {request.PackageId} not found");
}

Prevention

When it happens

Trigger: Calling download on a package id no manager can find via search; misspelled id; package absent from all configured sources.

Common situations: Wrong/missing source configured; id casing or source mismatch in MatchesIdentity; sources offline.

Related errors


AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13). Data as JSON: /api/errors/9effb5c6a4b6f23a. Report an issue: GitHub.