Repository navigation
Closed
Description
Summary
When a user tries to register a Claude subscription in Settings → Claude Subscriptions, the UI does nothing — no error message, no feedback, no loading state change. The subscription simply doesn't appear in the table.
Root Cause
Two issues combine to create this silent failure:
1. Backend returns an error, frontend doesn't show it
The backend correctly rejects the request with a 500 error:
{"detail": "Encryption key not configured. Set CREDENTIAL_ENCRYPTION_KEY environment variable with a 32-byte hex string (64 characters). Generate with: python -c \"import secrets; print(secrets.token_hex(32))\""}But the frontend's addSubscription() function in src/frontend/src/views/Settings.vue catches the error and sets error.value, which may not be visible to the user depending on scroll position or rendering. There's no toast/notification for this failure — it just silently fails.
2. No setup validation or user guidance
CREDENTIAL_ENCRYPTION_KEY is required for any credential/subscription storage but:
- It's not set by default in
.env.exampleor generated during setup - The Settings page doesn't check whether encryption is configured before showing the subscription form
- A new Trinity deployment will always hit this issue when trying subscriptions for the first time
Steps to Reproduce
- Fresh Trinity deployment (or any deployment without
CREDENTIAL_ENCRYPTION_KEYin.env) - Go to Settings → Claude Subscriptions
- Fill in Name, Type, and paste a valid token (starting with
sk-ant-oat01-) - Click Register Subscription
- Nothing happens — no error shown, no subscription created
Expected Behavior
Either:
- Option A: Show the backend's error message to the user ("Encryption key not configured...") with instructions on how to fix it
- Option B: Detect missing encryption key on the Settings page load and show a setup banner before the subscription form
- Option C: Auto-generate the key during
start.shif not set (similar to howSECRET_KEYcould be handled)
Relevant Code
- Frontend:
src/frontend/src/views/Settings.vue—addSubscription()function (around line 1857) - Backend: The subscription creation endpoint at
POST /api/subscriptions— encryption key check - Config:
docker-compose.ymlline 41 —CREDENTIAL_ENCRYPTION_KEY=${CREDENTIAL_ENCRYPTION_KEY:-}(defaults to empty)
Workaround
Add to .env:
CREDENTIAL_ENCRYPTION_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))")Then recreate the backend container:
docker-compose up -d backendMetadata
Metadata
Assignees
Labels
No labels
Activity
fix: Subscription registration fails silently when CREDENTIAL_ENCRYPT…
docs: Update subscription-management flow and feature-flows index for A…
fix: Subscription registration fails silently when CREDENTIAL_ENCRYPT…
docs: Update subscription-management flow and feature-flows index for A…
fix: Subscription registration fails silently when CREDENTIAL_ENCRYPT…
merge: Resolve conflicts with upstream/main — Abilityai#148 subscript…
merge: integrate upstream/main into feature branch
merge: Resolve conflicts with upstream/main (docs only)
chore(enterprise): bump submodule pointer f5d69be6 → 7f40361 (ent#185) (