{"record":{"id":"a4ec8e93512351ab","repo":"Devolutions/UniGetUI","slug":"scoop-is-not-ready","errorCode":null,"errorMessage":"Scoop is not ready.","messagePattern":"Scoop is not ready\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs","lineNumber":199,"sourceCode":"                    CoreData.PowerShell5,\n                    \"-ExecutionPolicy Bypass -Command \\\"scoop uninstall -p scoop\\\"\"\n                );\n                await ReloadManagerAsync(manager);\n                return Success(\n                    \"run-manager-action\",\n                    manager,\n                    action,\n                    \"completed\",\n                    \"Scoop uninstall completed.\"\n                );\n\n            case \"cleanup-scoop\":\n                EnsureConfirmed(request, action);\n                EnsureManager(manager, \"Scoop\");\n                EnsureWindowsOnly(action);\n                if (string.IsNullOrWhiteSpace(manager.Status.ExecutablePath))\n                {\n                    throw new InvalidOperationException(\"Scoop is not ready.\");\n                }\n\n                // Clean old app versions (user scope)\n                await RunWindowsProcessAsync(\n                    manager.Status.ExecutablePath,\n                    manager.Status.ExecutableCallArgs + \" cleanup --all\"\n                );\n                // Clean old app versions (global scope, needs admin)\n                await RunWindowsProcessAsync(\n                    manager.Status.ExecutablePath,\n                    manager.Status.ExecutableCallArgs + \" cleanup --all --global\",\n                    runAsAdmin: true\n                );\n                // Clear download cache (user scope)\n                await RunWindowsProcessAsync(\n                    manager.Status.ExecutablePath,\n                    manager.Status.ExecutableCallArgs + \" cache rm --all\"\n                );","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs#L181-L217","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install Scoop first (install-scoop action) or install it manually, then retry cleanup.","Call reload-manager for Scoop and re-check GetMaintenanceInfo to confirm ExecutablePath is populated before cleanup.","If Scoop is installed but undetected, set its executable path explicitly via set-manager-executable (requires AllowCustomManagerPaths)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var info = client.GetMaintenanceInfo(\"Scoop\");\nif (string.IsNullOrWhiteSpace(info.ExecutablePath)) { /* Scoop not ready: install/reload before cleanup */ }","typeGuard":null,"tryCatchPattern":"try { await client.RunManagerActionAsync(req); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Scoop is not ready\"))\n{ /* install or reload Scoop, then retry cleanup */ }","preventionTips":["Ensure Scoop is installed and reload-manager resolves ExecutablePath before cleanup.","Surface Scoop readiness in the UI so cleanup is only offered when executable is resolved."],"tags":["ipc","manager-maintenance","scoop","state-validation","windows"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}