Devolutions/UniGetUI · error · InvalidOperationException

The manager action "{request.Action}" is not supported.

Error message

The manager action "{request.Action}" is not supported.

What it means

Thrown by the default arm of RunActionAsync's switch when request.Action is non-null but, after trim/lowercase, matches none of the supported cases (repair-winget, install-scoop, uninstall-scoop, cleanup-scoop). Distinct from error 37 (null action). The message echoes the raw request.Action for diagnostics.

Source

Thrown at src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs:234

                    manager.Status.ExecutableCallArgs + " cache rm --all"
                );
                // Clear download cache (global scope, needs admin)
                await RunWindowsProcessAsync(
                    manager.Status.ExecutablePath,
                    manager.Status.ExecutableCallArgs + " cache rm --all --global",
                    runAsAdmin: true
                );
                await ReloadManagerAsync(manager);
                return Success(
                    "run-manager-action",
                    manager,
                    action,
                    "completed",
                    "Scoop cleanup completed."
                );

            default:
                throw new InvalidOperationException(
                    $"The manager action \"{request.Action}\" is not supported."
                );
        }
    }

    private static IpcManagerMaintenanceInfo ToMaintenanceInfo(IPackageManager manager)
    {
        string? configuredExecutablePath = Settings.GetDictionaryItem<string, string>(
            Settings.K.ManagerPaths,
            manager.Name
        );

        List<string> supportedActions =
        [
            "reload",
        ];

        if (manager.Name.Equals("WinGet", StringComparison.OrdinalIgnoreCase))

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Use one of the exact supported actions: repair-winget, install-scoop, uninstall-scoop, cleanup-scoop.
  2. Call GetMaintenanceInfo to read the supportedActions list for the target manager before submitting.
  3. Check the action spelling and hyphenation character-for-character.

Example fix

// before
{ "managerName": "scoop", "action": "clean-scoop", "confirm": true }
// after
{ "managerName": "scoop", "action": "cleanup-scoop", "confirm": true }
Defensive patterns

Strategy: validation

Validate before calling

static readonly HashSet<string> s_actions = new(StringComparer.OrdinalIgnoreCase)
    { "repair-winget", "install-scoop", "uninstall-scoop", "cleanup-scoop" };

static bool IsValidAction(string? a) =>
    !string.IsNullOrWhiteSpace(a) && s_actions.Contains(a.Trim().ToLowerInvariant());

Prevention

When it happens

Trigger: POSTing an Action like 'cleanup', 'repair', 'reset-scoop', 'update-scoop', or a typo like 'clean-scoop'. The switch is case-insensitive but spelling/hyphenation must match exactly.

Common situations: Guessing an action name. Copying an action token from an older/newer API version. Mixing the action vocabulary with another endpoint (e.g. 'reload' belongs to the reload endpoint, not RunAction). Trailing whitespace is trimmed but internal differences are not.

Related errors


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