Devolutions/UniGetUI · error · InvalidOperationException

No tracked operation with id "{operationId}" was found.

Error message

No tracked operation with id "{operationId}" was found.

What it means

GetTrackedOperation throws when the supplied operationId is absent from the in-memory Operations dictionary. Tracked operations exist only for the lifetime of the host process; once forgotten (ForgetTracking/ForgetOperation) or never created via IpcOperationApi.Track, the id is unknown to every query/mutation path (GetOperation, ForgetOperation, RetryOperation, ReorderOperation).

Source

Thrown at src/UniGetUI.Interface.IpcApi/IpcOperationApi.cs:286

            );
        }

        ForgetTracking(operationId);
        return IpcCommandResult.Success("forget-operation");
    }

    public static void ForgetTracking(string operationId)
    {
        Operations.TryRemove(operationId, out _);
    }

    private static TrackedOperation GetTrackedOperation(string operationId)
    {
        ArgumentException.ThrowIfNullOrWhiteSpace(operationId);

        return Operations.TryGetValue(operationId.Trim(), out var tracked)
            ? tracked
            : throw new InvalidOperationException(
                $"No tracked operation with id \"{operationId}\" was found."
            );
    }

    private static IpcOperationInfo CreateOperationInfo(TrackedOperation tracked)
    {
        var operation = tracked.Operation;
        return new IpcOperationInfo
        {
            Id = operation.Metadata.Identifier,
            Kind = GetOperationKind(operation),
            Title = operation.Metadata.Title,
            Status = operation.Status.ToString().ToLowerInvariant(),
            Started = operation.Started,
            LiveLine = tracked.LiveLine,
            LiveLineType = tracked.LiveLineType,
            QueuePosition = GetQueuePosition(operation),
            OutputLineCount = tracked.GetOutputCount(),

View on GitHub (pinned to 9b1d7d0eab)

Solutions

  1. Call IpcOperationApi.ListOperations() to enumerate currently tracked ids before referencing one
  2. Treat operation ids as process-local: never persist them across host restarts
  3. Treat a 'not found' on get-operation as 'already finished' rather than an error

Example fix

// before
IpcOperationApi.GetOperation(staleIdFromLastSession);
// after
var live = IpcOperationApi.ListOperations().Select(o => o.Id).ToHashSet();
if (!live.Contains(staleIdFromLastSession)) return; // already gone
IpcOperationApi.GetOperation(staleIdFromLastSession);
Defensive patterns

Strategy: validation

Validate before calling

// Validate the id is still tracked before touching it
var known = IpcOperationApi.ListOperations()
    .Select(o => o.Id)
    .ToHashSet(StringComparer.Ordinal);
if (!known.Contains(operationId))
    throw new UnknownOperationException(operationId);

Prevention

When it happens

Trigger: Calling get-operation/forget-operation/retry-operation/reorder-operation with an id that was never tracked, was already forgotten, or belongs to a previous host process.

Common situations: Client cached an operation id across a UniGetUI restart; calling forget twice; a race where the operation completed and was auto-evicted before the second call.

Related errors


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