Devolutions/UniGetUI · warning · InvalidOperationException
Only queued operations can be reordered.
Error message
Only queued operations can be reordered.
What it means
Thrown by ReorderOperation when the operation's status is not OperationStatus.InQueue. Only operations waiting in the queue can be reordered. An operation that is Running, or has reached any terminal state (succeeded, failed, canceled), cannot be moved within the queue.
Source
Thrown at src/UniGetUI.Interface.IpcApi/IpcOperationApi.cs:238
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."
);
}
switch (NormalizeQueueAction(action))
{
case "run-now":
tracked.Operation.SkipQueue();
break;
case "run-next":
tracked.Operation.RunNext();
break;
case "run-last":
tracked.Operation.BackOfTheQueue();
break;
default:
throw new InvalidOperationException($"Unsupported queue action \"{action}\".");
}View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Check the operation status via GetOperation before calling ReorderOperation.
- Use the AvailableQueueActions field — if empty, the operation is not reorderable.
- Refresh the operation list after any queue change to get current positions.
Example fix
// before
IpcOperationApi.ReorderOperation(opId, "run-now");
// after
var info = IpcOperationApi.GetOperation(opId);
if (info.AvailableQueueActions.Contains("run-now"))
IpcOperationApi.ReorderOperation(opId, "run-now"); Defensive patterns
Strategy: validation
Validate before calling
var info = IpcOperationApi.GetOperation(operationId);
if (info.AvailableQueueActions.Count == 0)
throw new InvalidOperationException($"Operation {operationId} is not queued and cannot be reordered."); Prevention
- Gate reorder UI on AvailableQueueActions being non-empty.
- Only InQueue operations can be reordered.
- Refresh the operation list after any queue change to get current state.
When it happens
Trigger: Calling ReorderOperation for an operation whose status is Running or any terminal state. The operation is found (GetTrackedOperation succeeds) but is not InQueue. The AvailableQueueActions field on IpcOperationInfo is empty for non-queued operations, serving as the client-side guard.
Common situations: Operation started executing between the client's status check and the reorder call. Client shows queue controls for an operation that already left the queue. Attempting to reorder an operation that just completed.
Related errors
- Only queued or running operations can be canceled.
- Running or queued operations cannot be retried.
- Unsupported queue action "{action}".
- Running or queued operations cannot be forgotten.
- tailLines must be greater than or equal to zero.
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/a3d45429d6034ae3.
Report an issue: GitHub.