Devolutions/UniGetUI · error · InvalidOperationException

Scoop is not ready.

Error message

Scoop is not ready.

What it means

Thrown in the cleanup-scoop branch of RunActionAsync when manager.Status.ExecutablePath is null or whitespace. Cleanup needs to invoke scoop directly, so if Scoop's executable has not been resolved (not installed, not yet loaded, or path detection failed) the action cannot proceed and aborts before spawning anything.

Source

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

                    CoreData.PowerShell5,
                    "-ExecutionPolicy Bypass -Command \"scoop uninstall -p scoop\""
                );
                await ReloadManagerAsync(manager);
                return Success(
                    "run-manager-action",
                    manager,
                    action,
                    "completed",
                    "Scoop uninstall completed."
                );

            case "cleanup-scoop":
                EnsureConfirmed(request, action);
                EnsureManager(manager, "Scoop");
                EnsureWindowsOnly(action);
                if (string.IsNullOrWhiteSpace(manager.Status.ExecutablePath))
                {
                    throw new InvalidOperationException("Scoop is not ready.");
                }

                // Clean old app versions (user scope)
                await RunWindowsProcessAsync(
                    manager.Status.ExecutablePath,
                    manager.Status.ExecutableCallArgs + " cleanup --all"
                );
                // Clean old app versions (global scope, needs admin)
                await RunWindowsProcessAsync(
                    manager.Status.ExecutablePath,
                    manager.Status.ExecutableCallArgs + " cleanup --all --global",
                    runAsAdmin: true
                );
                // Clear download cache (user scope)
                await RunWindowsProcessAsync(
                    manager.Status.ExecutablePath,
                    manager.Status.ExecutableCallArgs + " cache rm --all"
                );

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Install Scoop first (install-scoop action) or install it manually, then retry cleanup.
  2. Call reload-manager for Scoop and re-check GetMaintenanceInfo to confirm ExecutablePath is populated before cleanup.
  3. If Scoop is installed but undetected, set its executable path explicitly via set-manager-executable (requires AllowCustomManagerPaths).
Defensive patterns

Strategy: validation

Validate before calling

var info = client.GetMaintenanceInfo("Scoop");
if (string.IsNullOrWhiteSpace(info.ExecutablePath)) { /* Scoop not ready: install/reload before cleanup */ }

Try / catch

try { await client.RunManagerActionAsync(req); }
catch (InvalidOperationException ex) when (ex.Message.Contains("Scoop is not ready"))
{ /* install or reload Scoop, then retry cleanup */ }

Prevention

When it happens

Trigger: Running the cleanup-scoop maintenance action on a system where Scoop is not installed, was just uninstalled, or has not finished initializing so Status.ExecutablePath is still empty. The action is Windows-only and Scoop-specific.

Common situations: Calling cleanup on a fresh install where Scoop was never set up. Running cleanup immediately after uninstall-scoop. Scoop present in PATH but the manager reload that resolves ExecutablePath has not completed. A broken Scoop install where path detection failed.

Related errors


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