Devolutions/UniGetUI · warning · InvalidOperationException
Retry mode "{retryMode}" is not supported for operation {ope
Error message
Retry mode "{retryMode}" is not supported for operation {operationId}. What it means
Thrown by RetryOperation when the provided retryMode is valid syntactically but not applicable to the operation type. After NormalizeRetryMode converts the input to an internal mode string, GetRetryModes computes the set of valid modes for the operation. If the requested mode isn't in that set, this error fires. For example, 'retry-as-admin' is only available if the operation didn't already use admin and the manager supports it.
Source
Thrown at src/UniGetUI.Interface.IpcApi/IpcOperationApi.cs:224
tracked.Operation.Cancel();
return IpcCommandResult.Success("cancel-operation");
}
public static IpcCommandResult RetryOperation(string operationId, string? retryMode)
{
var tracked = GetTrackedOperation(operationId);
if (IsActive(tracked.Operation.Status))
{
throw new InvalidOperationException(
"Running or queued operations cannot be retried."
);
}
string normalizedRetryMode = NormalizeRetryMode(retryMode);
var availableRetryModes = GetRetryModes(tracked.Operation);
if (!availableRetryModes.Contains(ToRetryModeName(normalizedRetryMode)))
{
throw new InvalidOperationException(
$"Retry mode \"{retryMode}\" is not supported for operation {operationId}."
);
}
tracked.Operation.Retry(normalizedRetryMode);
return IpcCommandResult.Success("retry-operation");
}
public static IpcCommandResult ReorderOperation(string operationId, string action)
{
var tracked = GetTrackedOperation(operationId);
if (tracked.Operation.Status != OperationStatus.InQueue)
{
throw new InvalidOperationException(
"Only queued operations can be reordered."
);
}
View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Check AvailableRetryModes from GetOperation/ListOperations before calling RetryOperation.
- Start with 'retry' (always available for terminal operations) if unsure which modes apply.
- Inspect the manager's Capabilities to understand which retry modes it supports.
Example fix
// before — assuming retry-as-admin is always available
IpcOperationApi.RetryOperation(opId, "retry-as-admin");
// after
var info = IpcOperationApi.GetOperation(opId);
var mode = info.AvailableRetryModes.Contains("retry-as-admin")
? "retry-as-admin"
: info.AvailableRetryModes.FirstOrDefault() ?? "retry";
IpcOperationApi.RetryOperation(opId, mode); Defensive patterns
Strategy: validation
Validate before calling
var info = IpcOperationApi.GetOperation(operationId);
if (!info.AvailableRetryModes.Contains(retryMode ?? "retry"))
throw new ArgumentException($"Retry mode '{retryMode}' not available. Valid: {string.Join(", ", info.AvailableRetryModes)}"); Prevention
- Always read AvailableRetryModes before selecting a retry mode.
- Start with 'retry' (the default) if unsure — it is always available for terminal operations.
- Manager capabilities (CanRunAsAdmin, CanRunInteractively, CanSkipIntegrityChecks) determine which modes are offered.
When it happens
Trigger: Calling RetryOperation with a retryMode that is not in GetRetryModes(tracked.Operation). For PackageOperations, 'retry-as-admin' requires !Options.RunAsAdministrator AND manager.Capabilities.CanRunAsAdmin. 'retry-interactive' requires !Options.InteractiveInstallation AND CanRunInteractively. 'retry-no-hash-check' requires !Options.SkipHashCheck AND CanSkipIntegrityChecks. For SourceOperations, 'retry-as-admin' requires !ForceAsAdministrator.
Common situations: Requesting 'retry-as-admin' when the operation already ran as admin. Requesting 'retry-interactive' for a manager that doesn't support interactive mode (e.g., Pip). Requesting a retry mode for an operation type that doesn't support it (e.g., source operation with 'retry-interactive'). The capabilities flags on the manager gate which modes are available.
Related errors
- tailLines must be greater than or equal to zero.
- Only queued or running operations can be canceled.
- Running or queued operations cannot be retried.
- Only queued operations can be reordered.
- Unsupported queue action "{action}".
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/7592bdb044b1bc26.
Report an issue: GitHub.