Skip to main content

Troubleshooting

Audience: engineers and operators diagnosing a sidecar integration. Error responses use the format { "status": "error", "error": "<type>", "message": "<text>" }. Search this page by the returned message.

Initial triage checklist

  1. Open Sessions in the sidecar backoffice, locate the exchange, and inspect its status and error code.
  2. Check the sidecar server logs (info level or higher) around the timestamp of the failure.
  3. Coordinate with the partner: most cross-organisation errors stem from allowlist or DNS configuration on the partner's side. Have them check Sessions for the same timestamp.

The sidecar fails to start​

Log symptomCauseResolution
Invalid environment variables with variable namesA required variable is missing or fails validation (URL, PEM, byte length)Set or correct the listed variables. See Environment variables.
JWT_PRIVATE_KEY must be an EC private key in PEM formatPEM is missing, truncated, or lacks valid line breaksIn a .env file, wrap the key in double quotes and encode line breaks as \n. In Kubernetes, mount it directly from a Secret.
Failed to run migrations or create initial adminPostgreSQL is unreachable, permissions are insufficient, database does not exist, or INITIAL_ADMIN_PASSWORD / INITIAL_ADMIN_EMAIL (in production) is missingVerify database host, port, ownership, and credentials, and ensure INITIAL_ADMIN_PASSWORD (and INITIAL_ADMIN_EMAIL in production) are set on first boot.
Wallet file not found at …WALLET_FILE_PATH does not point to the mounted keystoreMount wallet.json read-only and verify WALLET_FILE_PATH.
invalid password while loading the walletWALLET_PASS does not match the keystoreSupply the password used when encrypting wallet.json.

401 on core-system API calls​

messageResolution
Missing API Key or SecretInclude both x-api-key and x-api-secret headers. Verify that any internal reverse proxy preserves these headers.
Invalid or expired API KeyThe key ID is unknown, the secret is incorrect, or the key was revoked or expired. Inspect keys via GET /api/v1/admin/api-keys and issue a replacement via POST /api/v1/admin/api-keys if needed (secrets cannot be recovered after creation).

Auth Portal shows an error instead of the QR code​

The Auth Portal validates the Requester's login token before rendering a QR code.

Portal errorCauseResolution (Requester)
Invalid requester credentialsISS_CODE is not registered in the Auth Portal, or ISSUER does not match the registered issuer domainAlign ISS_CODE and ISSUER with your Auth Portal registration, or ask the network operator to update your member record.
Signature verification errorThe ekyc_pub TXT record on ISSUER does not match JWT_PRIVATE_KEYCheck that your DNS key matches your private key.
Request token has expired (410)Login token exceeded its 15-minute lifetimeRequest a new login token for each attempt; do not cache tokens.
Session reference already exists (409)The same login token was submitted to the portal more than once (double submit, browser back, or retry)Request a new login token for every sign-up attempt.
QR renders with no Providers listedThe token's accept list is empty, or none of the codes match active Auth Portal membersAdd and enable Provider partners in your allowlist using their exact Auth Portal member codes.

Login token rejected on the Provider​

Returned as 400 by token/verify, kyc/submit, and kyc/authorize. (kyc/invalidate does not require or verify a login token.)

messageCauseResolution
Invalid token formatInput is not a valid JWT (wrong QR code or truncated deep-link parameter)Verify your mobile app forwards the full QR payload or the URL-decoded q parameter.
No public keys found for domain: …DNS TXT lookup for the Requester's iss returned no ekyc_pub recordThe Requester must publish its ekyc_pub record. Verify outbound DNS resolution from your sidecar.
Token verification failed for all keys from …Signature does not match any published ekyc_pub key, or algorithm is not ES512The Requester must align its DNS record and JWT_PRIVATE_KEY. See Check that your DNS key matches your private key.
Login token has expiredToken exceeded the Requester's REQUEST_TOKEN_EXPIRY_MINUTES lifetimeHave the customer restart the flow on the Requester's site.
Login token iat is in the futureClock drift between member serversSynchronise both servers with NTP.
This provider (…) is not in the login token accept listRequester has not allowlisted you as a Provider, or configured a different partner codeHave the Requester add you with your exact ISS_CODE and the Provider role.
Login token iss_code … is not an authorized or enabled partnerRequester is missing from your allowlist or disabledAdd the Requester under Partners and click Enable.
Login token iss_code … is not a requesterPartner exists without the Requester roleEnable the Requester role on the partner record.
Login token tier N exceeds partner max tier MRequested tier exceeds the partner's configured maxTierRaise Max tier for that partner if permitted by your bilateral agreement (new partners default to 0).
Token issuer is not a registered domain of this partnerToken iss does not match any domain configured on the partnerAdd the Requester's ISSUER domain under Domains on the partner record.

Provider submit or authorize fails​

messageCauseResolution
Validation Error (with details)data.user_info fails schema validation for the tierCompare against KYC data by tier. Common issues include gender outside M/F or missing address codes.
Either data+tier or attestationRef must be providedsubmit called without dataSupply data.user_info matching the requested tier.
Tier is required to process KYC flowauthorize called without tierInclude tier from the verified login token.
No active cached KYC found for this userNo active attestation exists for user_idCall kyc/submit instead.
Cached attestation reference is invalid or invalidated (400)attestation_ref is unknown, belongs to another user_id, or was invalidatedInvalidation is permanent. Call kyc/submit with current verified data and store the returned attestation_ref.
An active attestation exists for this user; invalidate it before submitting a replacement (409)submit called while an active attestation exists for user_idCall kyc/invalidate with the attestation_ref returned in the 409 body, then retry kyc/submit. If you lost the reference and attestation_ref was omitted due to a race, check your records or inspect the customer's latest session detail in Sessions.
Requested Tier N exceeds cached Tier MCached attestation was created at a lower tierCall kyc/invalidate, then kyc/submit at the higher tier.
Failed to submit consent to the auth portal / Auth portal rejected consent: HTTP … (500)Sidecar could not reach the Auth Portal over CamDX, or the Auth Portal rejected the requestCheck CAMDX_SECURITY_SERVER, EKYC_AUTH_PORTAL_MEMBER_CODE, Security Server permissions, and portal logs.
Failed to generate token (500)JWT_PRIVATE_KEY could not signVerify JWT_PRIVATE_KEY is a valid EC P-521 private key in PEM format.

Provider invalidate fails or remains pending​

ResultCauseResolution
404 Attestation not found for this userNo attestation matches both attestation_ref and user_idVerify user_id and attestation_ref match the original submit call.
400 ValidationErrorattestation_ref is not a UUID, or reason is not in the allowed enumUse a valid UUID and one of profile_updated, ekyc_repeated, data_correction, or other.
200 with already_invalidated: trueAttestation was already invalidated earlierExpected idempotent response; does not affect any replacement attestation.
200 with camdl_publication: "failed"Background CamDL revocation failed after max retries (RPC outage, missing revocation role, or insufficient gas)Invalidation is already active locally and on kyc-status-v1. Resolve the underlying cause and retry under Attestations in the backoffice; contact TSC if the wallet requires funding.
200 with camdl_publication: "pending" persistentlyBackground worker disabled or RPC_URL unreachableCheck CAMDL_PUBLICATION_WORKER_ENABLED, RPC_URL, and sidecar logs. Sharing remains unaffected.

Customer approved, but remains on the Auth Portal​

The Provider's submit or authorize returned 201, but the Auth Portal does not redirect the customer to the Requester's callback.

The Auth Portal rejected the consent delivery for one of the following reasons:

Portal error reasonResolution
Provider auth token ref does not match sessionThe login token passed to submit or authorize differs from the session the customer scanned. Forward the scanned token unchanged.
Provider auth token audience does not match requester issuer / issuer code does not match provider code / issuer does not match provider codePartner codes or issuer domains differ across sidecar configs, partner allowlists, and the Auth Portal registry. Align ISS_CODE and ISSUER with registration records.
Session not foundPortal session expired (login token lifetime elapsed) before consent arrived

Contact the network operator to inspect the session in the Auth Portal backoffice (Requests and Consents).

Requester kyc/fetch fails​

messageCauseResolution
Auth token has expiredMore than 5 minutes elapsed after approvalCall kyc/fetch immediately on callback; have the customer restart.
Auth token aud … does not match this service (…)Token was issued for a different Requester, or your ISS_CODE changedReject the request; align ISS_CODE with partners if changed.
Auth token iss_code … is not an authorized or enabled partner / is not a providerProvider is missing from allowlist, disabled, or lacks the Provider roleUpdate the partner entry under Partners.
Token is invalid or expiredRequest session for ref_id is unknown or expiredHave the customer restart the flow.
Request session is not in a fetchable state: completedThis flow was already fetchedUse the previously fetched data; do not call kyc/fetch twice for one session.
Requested tier N exceeds authorized tier Mtier in kyc/fetch exceeds the tier in the login tokenSend the tier requested in step 1.
Provider is not in the allowlist.No enabled Provider partner matches both iss_code and camdx_codeVerify the partner's Code, CamDX member code, and Provider role.
Provider refused the KYC request (400)The Provider's sidecar returned 4xx on resolveSee the next table; ask the Provider to check its sidecar log and Sessions for the exact reason.
Provider KYC resolution failed: HTTP … (500)The Provider's sidecar returned 5xx on resolveHave the customer retry, and escalate to the Provider if persistent.
Failed to retrieve KYC from provider (500)Your Security Server or the Provider was unreachableVerify CamDX connectivity and run Ping against the Provider in the backoffice.
Attestation verification failed: … / Attestation issuer is not a registered domain of this provider (500)Document failed integrity, signature, DNS-DID, or partner domain checksDo not accept the data. Confirm the Provider's openatts DNS record matches its wallet and its ISSUER domain is listed in your partner Domains.

Reasons a Provider refuses resolve​

These messages appear in the Provider's sidecar log when it returns 400 to a Requester's resolve call (the Requester sees 400 Provider refused the KYC request).

Provider messageResponsible sideResolution
No requester partner found for aud: …ProviderAdd the Requester to your allowlist with its exact ISS_CODE.
No domains configured for requester partner: …ProviderAdd the Requester's issuer domain under Domains on the partner record.
No public keys found for requester domains: …Requester or ProviderRequester publishes ekyc_pub at that domain, or Provider corrects the configured domain.
Requester signature verification failedRequesterRequester's published ekyc_pub DNS key does not match JWT_PRIVATE_KEY.
CamDX member code does not match the requester partnerProviderCorrect the Requester's CamDX member code in your allowlist and confirm the Security Server forwards X-Road-Client.
Auth token has already been used or is not redeemable / Auth token has already been used or expired–Replay or expired redemption attempt; expected rejection.
Token is invalid or expired–Auth token is unknown or older than 5 minutes.
Requested tier N exceeds authorized tier MRequesterFetch at or below the tier approved by the customer.
KYC data no longer availableProviderAttestation was invalidated after consent; ask the customer to re-share to deliver the replacement attestation.

Attestation status is unknown or unexpected​

Status checks are optional and never block sharing. GET /kyc/{ekyc_ref}/status returns 200 with unknown when a declared check cannot complete; unknown means status is inconclusive rather than current or invalidated. Check each source's reason:

reasonCauseResolution
timeoutCheck exceeded STATUS_CHECK_TIMEOUT_MSRetry; increase STATUS_CHECK_TIMEOUT_MS only if network latency is consistently high.
unreachableCamDL JSON-RPC endpoint unreachableVerify RPC_URL and outbound network rules.
http_errorProvider's status service returned a non-200 responseVerify CamDX connectivity, kyc-status-v1 publication, and that the Provider has you enabled with the Requester role.
bad_responseResponse failed schema, merkle_root, nonce, or responded_at freshness checksCheck server clock sync (NTP) and report malformed responses to the Provider.
bad_signatureResponse signature failed verification against the Provider's DNS keysProvider must align its ekyc_pub DNS record with JWT_PRIVATE_KEY.
not_foundProvider's status service has no delivery record of this attestation for your organisationConfirm the attestation originated from that Provider and contact them if unexpected.
member_mismatchAttestation's CamDX member differs from your Provider partner's CamDX member codeCorrect CamDX member code on the partner record.
chain_mismatchAttestation's CamDL chain ID differs from your CAMDL_CHAIN_IDAlign CAMDL_CHAIN_ID with the network chain or treat CamDL checking as unsupported for that attestation.
not_configuredRPC_URL or CAMDL_CHAIN_ID is unsetConfigure both variables to enable CamDL checks.
malformed_declarationAttestation's declared status metadata is invalidCannot be resolved on the Requester side; ask the Provider to issue a replacement attestation.

Overall unknown also occurs when one declared source returns current while another returns unknown. Once any check confirms invalidated, the overall status remains invalidated.

Status is not_supported​

The attestation declares no status checks, so the sidecar performs no network calls (for example, when the Provider configured ATTESTATION_STATUS_CHECKS=none). The attestation remains valid and needs no reissuance; only the Provider can enable checks for future attestations.

404 on GET /kyc/{ekyc_ref}, /status, or DELETE​

The ekyc_ref is unknown or was deleted. Deleted attestations retain only non-PII metadata, and read-back, status, and delete calls return 404. Verify you are passing the ekyc_ref returned by kyc/fetch.

Ping fails in the backoffice​

ResultCauseResolution
Connection failed: …Security Server is unreachable or path is misconfiguredVerify CAMDX_SECURITY_SERVER and the partner's CamDX eKYC path.
Provider returned HTTP 400: … No partner found for CamDX member codePartner has not allowlisted your member codeAsk the partner to add your exact CAMDX_MEMBER_CODE.
… is not enabled / … is not an authorized requesterPartner record exists but is disabled or lacks the Requester roleAsk the partner to enable you and assign the Requester role.
Provider returned HTTP 4xx/5xx (CamDX error)ping service is not published or access is not grantedAsk the partner's Security Server administrator to publish ping and grant access to your member code.

Check that your DNS key matches your private key​

Compute the expected ekyc_pub value from your sidecar's private key and compare it with your live DNS record:

# Derive ekyc_pub from the private key (same encoding as scripts/generate-test-resources.js)
JWT_PRIVATE_KEY="$(cat ekyc-private.pem)" node -e '
const c = require("crypto");
const pem = process.env.JWT_PRIVATE_KEY.replace(/\\n/g, "\n");
const { x, y } = c.createPublicKey(pem).export({ format: "jwk" });
const X = Buffer.from(x, "base64url"), Y = Buffer.from(y, "base64url");
console.log("ekyc_pub=" + Buffer.concat([Buffer.from([Y[Y.length - 1] & 1 ? 3 : 2]), X]).toString("base64"));'

# Query public DNS
dig +short TXT ekyc.yourorg.com.kh

One of the returned ekyc_pub= records must match exactly. For attestations, the address in openatts … p=did:ethr:<address>#controller must match your attestation wallet address.

Allow for DNS caching up to the record's TTL after changes; use short TTLs (such as 300 seconds) during key rotation.

Reporting an issue​

When escalating an issue to a partner or the network operator, provide the timestamp, the ref_id (decoded from the login token; non-sensitive), both organisations' codes, and the exact error message. Never share raw tokens, API secrets, or customer personal data.