Troubleshooting
0bf9bd04697609fc3d8b82eb933b1d1d29e84059. Version 2026.11.0-rc.0. License MIT. Status: A0–A10 implemented and verified on a disposable real API 1.0.0 stack; not published, tagged or deployed. This is the component's committed documentation, not proof of a distribution release or production qualification.
Start with the browser network panel, the API request id (X-Request-Id) and the
nginx/API logs. Never paste a sign-in link, recovery link, device code, one-time
secret, cookie or bearer into a ticket, chat or public issue.
Sign-in methods are missing
The login page offers only methods reported by
GET /api/v1/auth/capabilities:
- Email and recovery require SMTP delivery configured on the API.
- Passkeys require WebAuthn configured in the API and a browser that supports
navigator.credentials. - Google browser sign-in requires the provider configured and
MELODEE_AUTH_BROWSER_RETURN_URLon the same origin. - Bootstrap appears only while an operator challenge is pending.
If the page says the account service is unreachable, check same-origin routing,
the API /healthz, and that the served OpenAPI version is within
>=1.0.0 <2.0.0. The UI fails closed on a non-v1 contract rather than guessing.
“Sign in again to continue”
A sensitive API operation returned 403 reauthentication_required. The dialog
offers a genuine passkey step-up or an email re-authentication. The original
action is retried only after the step-up succeeds; it is never approved
automatically. If passkeys are not registered, use the email option.
Cookie or CSRF failures
- The API and UI must share one origin; update
MELODEE_PUBLIC_BASE_URL. - The
melodee_sessioncookie must be HttpOnly and, on HTTPS, Secure; themelodee_csrfcookie must be readable and match theX-CSRF-Tokenheader. - A reverse proxy must not strip
Origin,Sec-Fetch-*,CookieorSet-Cookie. - A foreign-origin cookie refresh is rejected with
403. Do not work around it with CORS; fix the origin configuration. - A
401after one cookie refresh means re-authentication, not a retry loop.
Magic-link or recovery link rejected
The link is single-use, expires quickly and is bound to the browser/flow the API defines. Opening the page does not consume it; an explicit confirmation does. Prefetching, reloading after the token was removed, or using a link twice yields “invalid, expired or already used”. Request a new link. Do not add retry loops that could consume or spam links.
Passkey sign-in or enrollment fails
passkey.enabled=false: WebAuthn is not configured on the API.protectedStorageWritable=false: no writable API storage volume can hold the protected public-key object. The UI disables enrollment and shows the operator prerequisite; existing passkeys may still sign in.SecurityError: the browser is not served from the API's configured RP origin. Open the exact public origin, not an alias or IP.NotAllowedError: the prompt was cancelled, timed out, or no authenticator matched. Try again.last_usable_pathon removal: add or verify another sign-in method first.- Passkey sign-in requires a discoverable credential. If the passkey was created without resident-key support, use another method or enroll a new passkey.
- Physical/synchronized authenticators and recovery have not been qualified; a virtual-authenticator pass is not a hardware claim.
Google linking or sign-in fails
- “Google is not enabled”: configure the API provider.
- “No public Google client ID configured”: rebuild the UI with
VITE_GOOGLE_CLIENT_IDmatching the API client ID. This is a public ID, never the secret. - “Already linked to another Melodee account”: identity linking never merges by email. Sign in to the other account and unlink there, or use another Google account.
- Browser sign-in requires
MELODEE_AUTH_BROWSER_RETURN_URLand the configured redirect URI. Cancellation at the provider currently leaves the API callback JSON visible; return to/auth/loginmanually. - Live Google is not qualified by the automated fixture.
Automation credential
The secret is shown once. If it is lost, revoke the credential and create a new
one; Melodee cannot re-display it. A catalog.read credential is refused for
favorites, reporting, operations or admin scopes. The server may also refuse an
elevated scope when the account lacks the matching capability.
Compatibility player rejected
- Create a separate credential for each device/protocol in
/auth/account/compatibility. - OpenSubsonic supports
apiKey=<secret>oru=<account>&p=<secret>; token (t/s) auth is not offered by the API. - A revoked credential is denied immediately.
- These credentials are not browser sessions. The public origin must proxy
/rest/(and other compatibility paths) to the API if players use it.
Bootstrap challenge rejected
401 means the challenge is unknown, expired or was replaced by re-running the
bootstrap command. 409 means the installation is already complete or the
completed installation has a verified sign-in path. Re-run the local command for
a new challenge only when the installation is still pending/pathless; do not
create an open-registration workaround.
Sign out says it could not be confirmed
The UI only reports success after the API confirms logout. If the network failed, the session may still be active; retry. If the API reports the session already invalid, the UI says “You were already signed out” rather than claiming a fresh revocation.
CLI still pending after approval
The device client polls at the server-advertised interval. Wait one cycle, and ensure the CLI uses the same API origin and registered client id as the browser approval. The observed CLI pin predates API 1.0.0 and rejects it; use a 1.0.0-compatible CLI build or the deterministic test client until the CLI adopts the release baseline.
Where the evidence lives
- Fast gate:
npm run gate. - Disposable real stack:
bash tests/integration/run.sh. - Sanitized results:
design/evidence/*.json. - Master audit and security review:
design/evidence/MASTER-COMPLETION-AUDIT.mdanddesign/evidence/SECURITY-REVIEW.md.