Devolutions/UniGetUI · error · InvalidOperationException

The manager parameter is required when removing an ignored u

Error message

The manager parameter is required when removing an ignored update for a package that is not currently discoverable.

What it means

RemoveIgnoredUpdateAsync throws when the package is not currently discoverable (absent from both the upgradable and installed snapshots) AND no ManagerName is supplied. To delete an ignored-update entry for an undiscoverable package, the manager must be named explicitly so the database key 'manager\\id' can be built.

Source

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

            Message = $"Ignored updates for {package.Id}.",
        };
    }

    public static async Task<IpcCommandResult> RemoveIgnoredUpdateAsync(
        IpcPackageActionRequest request
    )
    {
        ArgumentNullException.ThrowIfNull(request);

        var package = TryFindPackageForStateMutation(request);
        if (package is not null)
        {
            await package.RemoveFromIgnoredUpdatesAsync();
        }
        else
        {
            var manager = GetManagers(request.ManagerName).FirstOrDefault()
                ?? throw new InvalidOperationException(
                    "The manager parameter is required when removing an ignored update for a package that is not currently discoverable."
                );
            IgnoredUpdatesDatabase.Remove($"{manager.Properties.Name.ToLowerInvariant()}\\{request.PackageId}");
        }

        await RefreshUpgradablePackagesSnapshotAsync();
        return IpcCommandResult.Success("unignore-package");
    }

    private static async Task<IpcPackageOperationResult> ExecuteOperationAsync(
        string command,
        IPackage package,
        IpcPackageActionRequest request,
        Func<IPackage, InstallOptions, AbstractOperation> operationFactory
    )
    {
        var options = await InstallOptionsFactory.LoadApplicableAsync(package);
        ApplyRequestOptions(options, request);

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Always include request.ManagerName when unignoring a package that may no longer be installed
  2. First resolve the package via search to obtain its manager, then call unignore with that manager
  3. Track the originating manager when the ignore entry is created so unignore can repeat it

Example fix

// before
await IpcPackageApi.RemoveIgnoredUpdateAsync(
    new IpcPackageActionRequest { PackageId = "old-pkg" });
// after
await IpcPackageApi.RemoveIgnoredUpdateAsync(
    new IpcPackageActionRequest { PackageId = "old-pkg", ManagerName = "winget" });
Defensive patterns

Strategy: validation

Validate before calling

// Require a manager for any unignore that may target an absent package
if (string.IsNullOrWhiteSpace(request.ManagerName)
    && TryFindPackageForStateMutation(request) is null)
    throw new ArgumentException("ManagerName is required for undiscoverable packages");

Prevention

When it happens

Trigger: Unignoring a package that is no longer installed/installed-out-of-snapshot while omitting ManagerName from the request.

Common situations: Package was uninstalled but still listed in the ignored-updates database; client assumes the manager can be inferred from the package alone.

Related errors


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