abpframework/abp · error · CliUsageException

Remote server returns '{statusCode}-{reasonPhrase}'. {server

Error message

Remote server returns '{statusCode}-{reasonPhrase}'. {serverError} Authentication or license check failed while accessing {CliUrls.WwwAbpIo}. Please make sure you are logged in with `abp login <username>` and your ABP commercial license is active and covers the requested version. You can check your license at {CliUrls.WwwAbpIo}my-organizations

What it means

Thrown by `AbpIoSourceCodeStore` when a download/template request to `www.abp.io` returns a non-success status, indicating authentication or license failure. It is a `CliUsageException` whose message combines the HTTP status code, the remote service error, and guidance to log in / verify the commercial license.

Source

Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs:302

    }

    private async Task EnsureAbpIoSuccessfulResponseAsync(HttpResponseMessage responseMessage)
    {
        if (responseMessage is { StatusCode: HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden })
        {
            var message = $"Remote server returns '{(int)responseMessage.StatusCode}-{responseMessage.ReasonPhrase}'. ";

            var serverError = await RemoteServiceExceptionHandler.GetAbpRemoteServiceErrorAsync(responseMessage);
            if (!string.IsNullOrWhiteSpace(serverError))
            {
                message += serverError + " ";
            }

            message += $"Authentication or license check failed while accessing {CliUrls.WwwAbpIo}. " +
                       "Please make sure you are logged in with `abp login <username>` and your ABP commercial license is active and covers the requested version. " +
                       $"You can check your license at {CliUrls.WwwAbpIo}my-organizations";

            throw new CliUsageException(message);
        }

        await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage);
    }

    private async Task<bool> IsVersionExists(string templateName, string version)
    {
        var url = $"{CliUrls.WwwAbpIo}api/download/all-versions?includePreReleases=true";

        try
        {
            var client = _cliHttpClientFactory.CreateClient();

            using (var response = await client.GetAsync(url,
                _cliHttpClientFactory.GetCancellationToken(TimeSpan.FromMinutes(10))))
            {
                await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response);
                var result = await response.Content.ReadAsStringAsync();

View on GitHub (pinned to 7ed43b1931)

Solutions

  1. Run `abp login <username>` with the account tied to an active commercial license and retry.
  2. Open abp.io/my-organizations and confirm the license is active and covers the requested version/template.
  3. If the license is fine, check for transient 5xx and retry, or verify network/proxy configuration.
Defensive patterns

Strategy: try-catch

Validate before calling

// Ensure authenticated and licensed before a commercial template request.
if (string.IsNullOrWhiteSpace(await authService.GetAccessTokenAsync()))
    throw new InvalidOperationException("Not logged in. Run `abp login <username>`.");

Try / catch

try { await sourceCodeStore.GetAsync(name, type, version); }
catch (CliUsageException ex) when (ex.Message.Contains("Authentication or license check failed"))
{
    logger.LogError("License/auth failed. Run `abp login` and verify your license at abp.io/my-organizations.");
    throw;
}

Prevention

When it happens

Trigger: Requesting a commercial template/module/version while not authenticated or with a license that does not cover it (typically 401/403 from the download endpoint).

Common situations: Forgot to run `abp login`; session expired; ABP commercial license expired or does not include the requested product/version; requesting a newer major than the license permits.

Understand the failure class

Related errors


AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13). Data as JSON: /api/errors/65162efc1a27b337. Report an issue: GitHub.