abpframework/abp · warning · Exception

ERROR: Remote server returns '{response.StatusCode}'

Error message

ERROR: Remote server returns '{response.StatusCode}'

What it means

Thrown inside CheckProLicenseAsync when the HTTP GET to account.abp.io/api/license/check-user returns a non-success status code. It is thrown inside a try whose catch(Exception) returns false, so callers see 'not licensed' rather than the message. It surfaces only via logs/attached debuggers; the meaningful signal is that Pro license verification could not complete against the remote server.

Source

Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateInfoProvider.cs:98


    private async Task<bool> CheckProLicenseAsync()
    {
        if (!AuthService.IsLoggedIn())
        {
            return false;
        }

        try
        {
            var url = $"{CliUrls.AccountAbpIo}api/license/check-user";
            var client = _cliHttpClientFactory.CreateClient();

            using (var response = await client.GetHttpResponseMessageWithRetryAsync(url, CancellationTokenProvider.Token, Logger))
            {
                if (!response.IsSuccessStatusCode)
                {
                    throw new Exception($"ERROR: Remote server returns '{response.StatusCode}'");
                }

                await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response);

                var responseContent = await response.Content.ReadAsStringAsync();
                return JsonSerializer.Deserialize<bool>(responseContent);
            }
        }
        catch (Exception)
        {
            return false;
        }
    }
}

View on GitHub (pinned to 7ed43b1931)

Solutions

  1. Verify network connectivity and that https://account.abp.io is reachable from your environment (curl the /api/license/check-user endpoint).
  2. Re-run 'abp login <user>' to refresh credentials, then retry the command.
  3. If behind a corporate proxy, configure the proxy for the CLI's HttpClient (HTTPS_PROXY / abp CLI proxy settings).
  4. Retry after a transient outage; if the message is only logged you can proceed with a non-Pro template until the endpoint recovers.
Defensive patterns

Strategy: fallback

Validate before calling

// Before Pro template creation, probe connectivity.
using var probe = new HttpClient();
try
{
    var r = await probe.GetAsync("https://account.abp.io/api/license/check-user");
    if (!r.IsSuccessStatusCode) Console.WriteLine("License endpoint unavailable; Pro creation may downgrade.");
}
catch { Console.WriteLine("No network; license check will return false."); }

Try / catch

// The library already swallows this internally; treat 'not licensed' as the signal.
var isPro = await templateInfo.IsProLicensedAsync(); // returns false on any failure
if (!isPro) { /* fall back to free template */ }

Prevention

When it happens

Trigger: Calling GetTemplateInfoAsync (or 'abp new' with a Pro template) while logged in, when the license-check endpoint returns 5xx, 401, or a network-layer failure (DNS, TLS, proxy) that yields a non-success HttpResponseMessage.

Common situations: abp.io outage or maintenance window; corporate proxy/firewall blocking account.abp.io; expired auth cookie causing 401; transient 5xx during deployment; offline run with no network.

Related errors


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