Devolutions/UniGetUI · error · InvalidOperationException

The path field is required.

Error message

The path field is required.

What it means

Thrown by IpcManagerMaintenanceApi.SetExecutablePathAsync when request.Path is null or whitespace. This is checked only after the AllowCustomManagerPaths gate passes, so you only see it once custom paths are permitted. It guards against persisting an empty override into the ManagerPaths dictionary.

Source

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

        return Success("reload-manager", manager, "reload", "completed");
    }

    public static async Task<IpcManagerMaintenanceActionResult> SetExecutablePathAsync(
        IpcManagerMaintenanceRequest request
    )
    {
        ArgumentNullException.ThrowIfNull(request);
        var manager = IpcManagerSettingsApi.ResolveManager(request.ManagerName);
        if (!SecureSettings.Get(SecureSettings.K.AllowCustomManagerPaths))
        {
            throw new InvalidOperationException(
                "Custom manager paths are disabled by secure settings."
            );
        }

        if (string.IsNullOrWhiteSpace(request.Path))
        {
            throw new InvalidOperationException("The path field is required.");
        }

        Settings.SetDictionaryItem(Settings.K.ManagerPaths, manager.Name, request.Path);
        await ReloadManagerAsync(manager);
        return Success(
            "set-manager-executable",
            manager,
            "set-executable",
            "completed",
            $"Configured {manager.DisplayName} to use {request.Path}."
        );
    }

    public static async Task<IpcManagerMaintenanceActionResult> ClearExecutablePathAsync(
        IpcManagerMaintenanceRequest request
    )
    {
        ArgumentNullException.ThrowIfNull(request);

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Supply a non-empty executable path in the Path field.
  2. To remove a custom override, call clear-manager-executable instead of set with an empty path.
  3. Validate the path points to a real executable before sending to avoid a later reload failure.

Example fix

// before: POST set-manager-executable { "managerName": "scoop", "path": "" }
// after: POST clear-manager-executable { "managerName": "scoop" }
Defensive patterns

Strategy: validation

Validate before calling

if (string.IsNullOrWhiteSpace(request.Path)) { /* send to clear-manager-executable instead, or reject */ }

Prevention

When it happens

Trigger: POSTing to set-manager-executable with AllowCustomManagerPaths enabled but a missing/blank Path field in the body. To clear an override instead of setting one, the wrong endpoint is being used.

Common situations: Confusing set-manager-executable with clear-manager-executable (the latter removes the override). Sending an empty path expecting it to reset. A serialization bug dropping the Path field.

Related errors


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