-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Troubleshooting
Common backend issues and fixes. The backend is a Docker Compose stack driven by backend/Makefile (see Backend Setup).
Symptom: make up returns errors; make status shows containers in Exit state.
Cause: .env not present, missing required vars, or required ports already in use.
Fix:
-
cd backend && cp .env.example .envif the file is missing. - Edit
.envand setPOSTGRES_PASSWORDandHASURA_GRAPHQL_ADMIN_SECRETandHASURA_GRAPHQL_JWT_SECRET. - Free the required ports:
lsof -i :5432,8080,4000,8484,9000,9001,8025and stop conflicting processes. -
make down && make up.
Symptom: make health reports DOWN for one or more services.
Cause: Service crashed during boot, missing env var, or downstream dependency not ready yet.
Fix:
-
make logs-hasura,make logs-auth: read the failing service's log. - For Hasura: confirm
HASURA_GRAPHQL_DATABASE_URLmatches your Postgres password. - For Auth: confirm
HASURA_GRAPHQL_JWT_SECRETis valid JSON. - Wait 10-20 seconds and run
make healthagain: Postgres takes a moment on first boot. - If still down,
make down && docker compose down -v && make up(this wipes volumes: local dev only).
Symptom: All lists, todos, and users are gone after running make clean.
Cause: make clean is intentionally destructive. It removes named volumes including postgres_data.
Fix: Restore from a backup: make restore FILE=backups/backup-<timestamp>.sql. Always make backup before make clean.
Symptom: Tables missing from the schema, or new app fields not visible.
Cause: make up only runs init.sql on first boot; subsequent schema changes need explicit migration.
Fix:
-
cd backend && make migrate-status: see which migrations are pending. -
make migrate: apply pending migrations. -
make metadata-apply: apply tracked tables and permissions. - Reload the Hasura console (
http://localhost:8080/console) and verify the changes.
Symptom: Client app (mobile/web/desktop/TV) GraphQL calls fail with network or CORS errors.
Cause: Backend not running, wrong endpoint, or simulator/emulator can't see localhost.
Fix:
-
cd backend && make health: confirm the backend is up. - Check the app's GraphQL endpoint matches the platform:
- Web / desktop:
http://localhost:8080/v1/graphql - iOS simulator:
http://127.0.0.1:8080/v1/graphql - Android emulator:
http://10.0.2.2:8080/v1/graphql - Physical device: host machine's LAN IP at
:8080
- Web / desktop:
- If CORS is the issue, check
HASURA_GRAPHQL_CORS_DOMAINinbackend/.env.
Symptom: App calls to the storage service return 5xx errors; uploads never appear. Cause: MinIO not reachable, bucket missing, or credentials misconfigured. Fix:
-
make status: confirmminioandstorageare both running. - Open the MinIO console at
http://localhost:9001(credentials inbackend/.env). - Confirm the configured bucket exists. If not, create it via the MinIO console.
- Restart storage:
docker compose restart storage.
Symptom: Console at http://localhost:8080/console keeps prompting for the secret.
Cause: HASURA_GRAPHQL_ADMIN_SECRET mismatch between .env and the running container, or browser local storage cleared.
Fix:
- Confirm
.envhas the secret set, thenmake restart. - Paste the exact secret value into the console prompt; the console caches it in browser storage.
Symptom: Auth password resets or invitations sent, but nothing appears in http://localhost:8025.
Cause: Auth service is configured to use a real SMTP server instead of Mailpit, or Mailpit container exited.
Fix:
- Confirm
AUTH_SMTP_HOST=mailpitandAUTH_SMTP_PORT=1025inbackend/.envfor local dev. -
make status: confirmmailpitcontainer is running. -
docker compose restart auth mailpit.
Symptom: make staging-up or make prod-up fails with port 80 or 443 already in use.
Cause: Another reverse proxy (nginx, Apache, another Traefik) is bound to those ports.
Fix: Stop the other service or have it forward to Traefik. The Compose files cannot share ports.
- Backend Setup: original setup walkthrough
- Backend Architecture: services, ports, data flow
- Database Schema: schema reference
- Deployment: staging and production deployment
- github.com/nself-org/task/issues: open an issue
Getting Started
Features
CLI & Agents
Backend
Architecture
Deployment
Reference
External