Devolutions/UniGetUI · error · InvalidOperationException
The IPC API token is not available. Start UniGetUI and try a
Error message
The IPC API token is not available. Start UniGetUI and try again.
What it means
Thrown by IpcClient.EnsureTokenAvailable when the _token field is null or whitespace. EnsureTokenAvailable guards every authenticated send (SendAuthenticatedAsync), so any protected IPC call made on a tokenless client fails immediately before any network attempt.
Source
Thrown at src/UniGetUI.Interface.IpcApi/IpcClient.cs:1488
private static bool IsProcessRunning(int processId)
{
try
{
using Process process = Process.GetProcessById(processId);
return !process.HasExited;
}
catch (Exception)
{
return false;
}
}
private void EnsureTokenAvailable()
{
if (string.IsNullOrWhiteSpace(_token))
{
throw new InvalidOperationException(
"The IPC API token is not available. Start UniGetUI and try again."
);
}
}
private static string BuildRelativeUri(
string relativePath,
IReadOnlyDictionary<string, string>? queryParameters
)
{
if (queryParameters is null || queryParameters.Count == 0)
{
return relativePath;
}
string query = string.Join(
"&",
queryParameters.Select(pair =>View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Start UniGetUI so it publishes its IPC token, then rediscover the endpoint/token.
- Construct IpcClient with the token from a valid IpcEndpointRegistration rather than null/empty.
- Call GetStatusAsync (an unauthenticated route) only after ensuring the client has a token for protected routes.
- Use the endpoint-discovery helper to find a live, token-bearing registration before building the client.
Defensive patterns
Strategy: validation
Validate before calling
// Discover a token-bearing live endpoint before constructing the client:
var reg = IpcClient.FindLiveEndpoint();
if (reg is null || string.IsNullOrWhiteSpace(reg.Token))
throw new InvalidOperationException("UniGetUI is not running or has no IPC token.");
using var client = new IpcClient(reg.ToTransportOptions(), reg.Token); Try / catch
try { await client.DoAuthenticatedCallAsync(); }
catch (InvalidOperationException ex) when (ex.Message.Contains("token is not available"))
{ /* start UniGetUI, rediscover endpoint, rebuild client with token */ } Prevention
- Ensure UniGetUI is running and has published its token before any protected IPC call.
- Never construct an IpcClient for protected routes with a null/empty token.
- Use the endpoint-discovery helper to obtain both transport options and token together.
When it happens
Trigger: Constructing an IpcClient without a token and then calling any authenticated method. Discovering endpoints when none have a token persisted. The token file/registration being unreadable or absent because UniGetUI is not running or has not yet written its IPC token.
Common situations: UniGetUI is not running, so no endpoint registration (and thus no token) exists. Calling IPC before the app has finished booting and written its token. Manually constructing a client for testing without passing the token. Stale registration left over after the app crashed without cleaning up.
Related errors
- The Unix socket path is not available for the named-pipe tra
- GitHub did not return an access token.
- GitHub sign-in is not configured for this build. UNIGETUI_GI
- GitHub authentication is required for cloud backups.
- No tracked operation with id "{operationId}" was found.
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/f6773c793d850380.
Report an issue: GitHub.