Troubleshooting
Identify the failing layer before changing data: frontend build or browser request, Django startup, PostgreSQL, authentication, integrations, or a workflow rule. Record the release version, time, affected URL, HTTP status, account role, and a sanitized error message. Use the production deployment checklist for launch requirements and Updating EstateHub for rollback decisions.
Redact passwords, JWTs, secret keys, transfer evidence, identity-document URLs, and SMTP credentials before sharing logs or responses.
Fast Checks
From backend/, with the same settings and environment used by the affected service, run:
python manage.py check
python manage.py showmigrations
python manage.py makemigrations --check --dry-runFor a production release, also run python manage.py check --deploy --settings=core.settings.prod. Request /health/ on the deployed API and inspect the matching backend logs. This health endpoint checks database connectivity; a successful response does not verify email, storage, login, or payment workflows.
Installation Issues
- Confirm Python, Node.js, and PostgreSQL meet System Requirements and install the dependencies from the supplied manifests.
- Run commands from the correct project directory: Django from
backend/, Next.js fromfrontend/, and the supplied Compose stack from the workspace root. - If Compose fails to start PostgreSQL, set
DB_NAME,DB_USER, andDB_PASSWORDin Compose's environment or a root.env.backend/.envdoes not supply Compose interpolation values. Check the resolved configuration withdocker compose config, but do not share its secret-bearing output. - If the frontend loads but calls a development API host, replace the
NEXT_PUBLIC_API_BASE_URLvalue with the intended/api/v1URL and rebuild the frontend.
Configuration Issues
- Confirm
DJANGO_SETTINGS_MODULE=core.settings.prodfor each production backend process and management command. Do not switch to development settings to hide a production error. - Check that
ALLOWED_HOSTScontains backend hostnames without schemes; CORS and CSRF trusted origins include the frontend's HTTPS scheme. - Confirm public API, frontend, and optional WebSocket URLs match the deployed domains.
NEXT_PUBLIC_*values are fixed at frontend build time; changing them requires a new deployment. - Configure Storage, Email, and Social Login in the Admin Dashboard after first admin setup. Backend environment values are fallbacks; frontend Cloudinary or SMTP secrets are not required for managed uploads or email.
- Restart the affected backend process after changing its environment.
Authentication Issues
- Confirm the account contains the customer, seller, or administrator role required by the login namespace.
- Check account status and use the matching refresh endpoint for the token family.
- For missing recovery or verification email, confirm the enabled Email integration and sender, then inspect provider delivery logs. A successful API response does not prove delivery.
Database Issues
- Verify
DB_NAME,DB_USER,DB_PASSWORD,DB_HOST, andDB_PORTin the same process environment used by Django. EstateHub does not read a singleDATABASE_URLin its current settings. - Run
showmigrationsand inspect unapplied migrations before modifying schema state. - Restore into an isolated database before attempting destructive recovery.
- Treat
/health/HTTP 500 as a database-connectivity failure until logs prove otherwise.
Payment Issues
- Payments are manual bank transfers and do not advance through a gateway callback.
- Confirm the transaction identifier, evidence URL, purpose, amount, and current workflow state.
- Only an administrator verification/rejection action advances a submitted payment.
- Never delete payment or payout history to retry a failed operation.
API Issues
- Record the method, complete URL, HTTP status, role, sanitized body, and response.
- Verify the route namespace matches the caller role.
- Compare the request with the detailed API reference and inspect schema validation output.
- Confirm business-state preconditions in the relevant workflow guide before changing a request payload.
Deployment Issues
- Use a production Daphne startup command and verify that the application binds to the host's required port.
- If HTTPS redirects loop behind a TLS-terminating proxy, review the forwarded scheme and Django's trusted-proxy settings. Verify that Django recognizes the original request scheme.
- Confirm the deployed backend hostname is allowed, including any separate health-check host used by the provider.
- Test database, Storage and Email integrations, optional WebSockets, cache, and workers separately. Confirm each configured service is reachable from the backend.
- For a failed release, follow Rollback; do not restore code against an incompatible migrated schema.
Common Errors
| Symptom | Check first | Action |
|---|---|---|
| Compose reports missing database values | Root Compose interpolation for `DB_NAME`, `DB_USER`, and `DB_PASSWORD`. | Provide matching values to Compose and `backend/.env`; inspect `docker compose config` privately. |
| Frontend requests go to the wrong API | Built value of `NEXT_PUBLIC_API_BASE_URL` and its `/api/v1` suffix. | Set the correct production URL and rebuild/redeploy the frontend. |
| Repeated HTTPS redirects | TLS proxy forwarded scheme and Django production security settings. | Configure and test trusted proxy handling before using the production domain. |
| Production settings fail on WhiteNoise | Installed backend dependencies in the release environment. | Install the current `requirements.txt` before starting Django. |
| Realtime events disappear across processes | Channel-layer configuration and connectivity. | Configure and test a shared channel layer before scaling backend processes. |
| OTP or customer reset code vanishes | Cache configuration and connectivity. | Configure and test a shared cache for multi-process production. |
API and Workflow Problems
| Symptom | Check first | What is true in this release |
|---|---|---|
| Valid credentials fail on one login route | The account's JSON `roles` list and status. | Customer, seller, and administrator logins reject accounts outside their matching role group. |
| Email endpoint succeeds but no mail arrives | Enabled Email integration, sender verification, provider logs, and spam filtering. | Inspect the email provider delivery logs and retry with a test inbox. |
| Listing is absent from discovery | Status and purpose. | Only `available` listings with purpose `buy` or `rent` are public. |
| Seller listing fails when media is included | Nested `media` or `resources` in the request. | Seller create/update services synchronize nested media and resources. Confirm approved KYB, completed upload identifiers, and valid field values. |
| Reservation cannot be created | Property purpose/status and existing active deal. | The property must be `available`, purpose must match, and overlapping active reservations are rejected. |
| Payment remains submitted | Administrator verification action and transaction evidence. | Payments are manual bank transfers; there is no gateway callback or webhook to advance them. |
Safe Recovery
- Back up PostgreSQL and stored files before migrations, imports, or bulk administration; test restores in isolation.
- Run
populate_checklistsagain if buy/lease progress definitions are missing; the command usesupdate_or_create. - Test fixes with disposable records and preserve payment, payout, audit, and migration history.
- Do not run
seed_demo_dataagainst production; it creates predictable demonstration credentials. - Do not change workflow states directly in the database merely to bypass a validation error.
Requesting Support
Include the frontend and backend release or commit, runtime versions, settings module, affected page or endpoint, sanitized request and response, reproduction steps, timestamps, relevant logs, and any local code or add-on changes. Use the Support checklist and the official support channel supplied with your purchase or release.