Troubleshooting

Native application path: gRPC for live data and edits; PMTiles, GeoParquet and COG through the CDN. Start there for browser gRPC-Web setup, signed private URLs and regeneration after changes. OGC API and GeoServices REST examples below are compatibility workflows.

Common issues and how to fix them when integrating the Honua .NET SDK.

If you cannot find your issue here, open a GitHub issue with the package name, version, server version (AdminClient.CheckCompatibilityAsync() output is ideal), the call you're making, and the exception message and stack.


Configuration

InvalidOperationException: Honua <X> base address must be configured.

You instantiated an SDK client without setting BaseAddress (or Address for Honua.Sdk.Grpc). Set the server URL in AddHonua*(o => o.BaseAddress = new Uri("https://...")). The SDK no longer defaults to a baked-in localhost URL on purpose -- silent localhost defaults masked mis-configuration in production.

Honua <X> base address must use HTTP or HTTPS.

BaseAddress was set to a non-HTTP(S) scheme (e.g. file://, ftp://, or a relative URI). Use an absolute http:// or https:// URL.

Honua <X> timeout must be greater than 10 milliseconds and less than 24 hours.

Options.Timeout is out of range. Common cause: assigning TimeSpan.Zero or a negative span. Pick a value in [11ms, 24h).


Authentication

Credentials silently absent / 401 Unauthorized on every call

By design, the SDK only sends ApiKey / BearerToken (or the values returned by ApiKeyProvider / BearerTokenProvider / AccessTokenProvider) over HTTPS, with one exception: loopback / localhost HTTP for local development.

If you're hitting http://your-internal-host (non-loopback) with credentials configured, the auth header is intentionally dropped and the server returns 401. Use HTTPS or terminate TLS upstream.

See authentication.md for the storage, refresh, and failure model and how AccessTokenProvider takes precedence over BearerTokenProvider / BearerToken.

Token provider raises -- requests still fire without credentials

If your *TokenProvider delegate returns null or an empty string, the SDK omits the credential header on that request. To fail closed instead, throw from the provider; the SDK propagates the exception to the caller.


gRPC

Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="...") in the browser

Browsers cannot speak native gRPC. From Blazor WebAssembly / browser JS hosts you must talk gRPC-Web through the server's gRPC-Web endpoint, not the native gRPC port. See docs/browser-wasm-support.md -- it documents the supported browser surface (REST clients only) plus the recommended escape hatch for native gRPC.

Channel disposed / ObjectDisposedException on reuse

HonuaGrpcClient and HonuaProcessGrpcClient each own a GrpcChannel when constructed from options. The DI extension AddHonuaGrpc registers IHonuaGrpcClient and IHonuaProcessGrpcClient as singletons so those channels survive across requests. If you construct either concrete client manually and dispose it, you cannot reuse it -- the underlying channel is gone. Either let DI own the lifetime, or pass a long-lived GrpcChannel to the matching channel-based constructor.

BaseAddress vs Address on gRPC

Both work. BaseAddress (Uri) is preferred for parity with the REST SDK clients; Address (string) remains supported. If both are set, BaseAddress wins.


Retry, timeout, and resilience

Calls return immediately with OperationCanceledException even though the server is healthy

Your Options.Timeout is shorter than the request actually needs. The total pipeline budget is Timeout; each attempt, including the response body, is limited to about 45% of that value (45 seconds when Timeout is left at its default of 100 seconds). Raise Timeout, or disable retries with EnableRetry = false while you isolate the slow call.

Setting MaxRetryAttempts throws ArgumentOutOfRangeException

MaxRetryAttempts must be in the inclusive range [2, 5] (Polly's standard resilience pipeline minimum is 2 attempts including the original call). Values outside that range fail at options assignment time for every package, including Honua.Sdk, Honua.Sdk.Processes, and Honua.Sdk.Grpc.

Unsafe HTTP methods aren't retried

Intentional for the default REST policy. GeoServices additionally retries PUT, DELETE, and the idempotent POST /query fallback according to its protocol-specific policy. If you need a different policy, register a custom resilience pipeline on the HttpClient after AddHonua*.


CORS / browser

Browser requests are blocked by CORS

The SDK does not configure CORS -- that's the server's responsibility. Confirm the Honua server allow-lists your origin and that pre-flight (OPTIONS) responses include the headers you set (e.g. Authorization, X-API-Key). For browser hosts, also see docs/browser-wasm-support.md.


Compatibility gate

CheckCompatibilityAsync returns IsSupported = false

Honua.Sdk.Admin requires compatible server version and Admin API metadata; see docs/compatibility.md. The UnsupportedReason string tells you the gap. Common cases:

  • The server is older than HonuaAdminCompatibility.MinimumSupportedServerVersion. Upgrade the server, or pin the SDK to a matching prior pre-release.
  • Compatibility metadata is missing or the server version cannot be parsed.
  • The Admin API major or base path differs from the SDK contract, or the API is deprecated.

Release channels, including nightly, are advisory and do not cause compatibility refusals.


Catalog / Records / STAC / Scenes

404 Not Found on STAC landing page / OGC API Records root

The Honua server must explicitly enable the public OGC API Records catalog (/records), the STAC catalog (/stac), or the OGC API Features landing page under its /api/v1 base. If the server returns 404, confirm:

  1. The server is on a version that exposes the catalog (see compatibility.md).
  2. The matching capability flag is enabled in adminClient.GetCapabilitiesAsync().
  3. Your BaseAddress does not include the protocol-specific suffix — pass the bare server root (e.g. https://your-host), not https://your-host/stac. The clients append their own protocol prefix.

StacException: STAC response did not include the expected ... / extension fields not surfaced

Use the *JsonAsync or *RawAsync escape hatches on IHonuaStacClient to read the raw response — these methods are intentionally Raw / Json-suffixed and return caller-owned JsonDocument / HttpResponseMessage. Dispose them when finished. Then file an issue if a stable STAC extension is worth promoting to a typed property.

Records search returns nothing although the catalog is populated

Records searches default to the default collection. Pass the explicit collection name your server exposes via IHonuaOgcRecordsClient.SearchAsync(collection, query, ct), or list collections first with ListCollectionsAsync(ct) to confirm the catalog IDs.

Scene ResolveAsync returns endpoints your renderer cannot reach

IHonuaSceneClient.ResolveAsync returns the server's render endpoint recommendation. The SDK does not validate the endpoint is reachable from the calling host. In browsers, you may still need to (a) terminate TLS at a gateway your scene server allows-lists, or (b) use the offline scene package contract (Honua.Sdk.Scenes + offline contracts in Honua.Sdk.Abstractions) to pre-stage assets.


Offline sync

Pull plans pull "everything" on first run

Expected. The offline planner records a checkpoint after the first successful pull; subsequent pulls send the checkpoint so the server returns only deltas. If you do not see this, confirm your storage adapter persists the checkpoint between runs -- the planner is checkpoint-driven, not timestamp-driven. See docs/offline-sync-core.md.

Conflict envelopes look empty

The planner only emits conflict envelopes when both sides modified the same row's tracked fields since the last checkpoint. Pure-server or pure-client edits with no overlap are not conflicts.


Build and packaging

error NU1101: Unable to find package Honua.Sdk.*

Every stable Honua.Sdk* package is on nuget.org, so a bare dotnet add package Honua.Sdk resolves. NU1101 now usually means one of:

  • a <packageSourceMapping> in your NuGet.config that routes Honua.Sdk* somewhere other than nuget.org, or a <clear /> that removed nuget.org;
  • you asked for a prerelease, which publishes to the authenticated GitHub Packages feed only - see INSTALL.md;
  • a package that does not exist under that name. dotnet package search Honua.Sdk lists what is published.

Dry runs are published to neither feed; their artifacts are attached to the corresponding GitHub Actions run.

401 Unauthorized / 403 Forbidden from nuget.pkg.github.com

The GitHub Packages NuGet endpoint requires authentication even for public packages, and it only accepts a classic personal access token with the read:packages scope -- fine-grained tokens are rejected. A 401 usually means no credentials reached the feed (source added without --username/--password, or credentials stored under a different source URL); a 403 usually means the token is fine-grained, expired, or missing read:packages. Re-run the dotnet nuget add source / update source step in INSTALL.md with a classic PAT.

Build fails with TreatWarningsAsErrors

The SDK ships with <TreatWarningsAsErrors>true</TreatWarningsAsErrors> in Directory.Build.props. If your downstream project enables analyzers we don't, you may see new warnings against generated/imported code. The clean fix is to suppress specific analyzer IDs in your own .editorconfig rather than relaxing the SDK build.

NuGet audit advisories (NU1901-NU1904) are the one exception: they stay warnings under TreatWarningsAsErrors, so a newly published advisory never fails restore or build.


Reporting an issue

When opening an issue, include:

  1. SDK package name(s) and version(s) (dotnet list package output is fine).
  2. .NET runtime version (dotnet --info).
  3. Honua server version (adminClient.GetCapabilitiesAsync() JSON dump if accessible).
  4. The full exception type, message, and stack trace -- not just the message.
  5. A minimal Program.cs (or dotnet new console snippet) that reproduces the issue.