Troubleshooting: Common Issues¶
FRONTEND: "Une erreur inattendue s'est produite" / Intermittent 400 Errors¶
Symptom: Every page load shows a generic error. API calls sometimes return 400, sometimes work.
Root cause: Caddy's Go DNS resolver caches the backend container's IP. When the backend is recreated (new IP), Caddy sends requests to the old address.
Fix: Use a static IP network (see Caddy DNS Caching).
Quick fix: Restart the frontend:
LOGIN: ProConnect Button Only¶
Symptom: Login page shows "ProConnect" button, no Keycloak login option.
Fix: Add to .env:
Restart backend and frontend.
LOGIN: 400 Bad Request on /api/v1.0/authenticate/¶
Symptom: Clicking login returns 400.
Root cause: Caddy forwards requests with Host: messages.<domain> but Django's ALLOWED_HOSTS doesn't include it.
Fix: Ensure DJANGO_ALLOWED_HOSTS includes messages.<domain> (or calendars.<domain> for Calendars).
LOGIN: Redirect Loop After Login¶
Symptom: After successful login, the page keeps reloading.
Root cause (Calendars): CalDAV proxy returning 401 triggers frontend re-auth.
Fix: Ensure /caldav/* is proxied through the Django backend, not directly to CalDAV.
INBOUND: No Emails Received¶
Symptom: External emails don't arrive in Messages inbox.
Checklist:
1. MX record points to mx.<domain>
2. Port 25 open on firewall
3. MTA-in running as user: root
4. No Permission denied errors in MTA-in logs:
OUTBOUND: No Emails Sent¶
Symptom: Emails from Messages or Calendars not delivered.
Checklist:
1. Brevo SMTP credentials correct in .env
2. Brevo domain verification complete
3. Backend can reach smtp-relay.brevo.com:587
4. No Authentication credentials were not provided in Messages API logs
CALENDARS: "Failed to fetch mailboxes"¶
Symptom: Error banner in Calendars UI.
Checklist:
1. FEATURE_MESSAGES_INTEGRATION=True in Calendars .env
2. Channels configured correctly (api_key_hashes stored, scopes set)
3. MESSAGES_API_URL without trailing /api/v1.0/
4. DJANGO_SERVER_TO_SERVER_API_TOKENS (with DJANGO_ prefix) set in Messages .env
CALENDARS: Invitations Not Sent¶
Symptom: Event created, but attendees don't receive emails.
Checklist:
1. CALDAV_CALLBACK_BASE_URL uses static IP
2. 172.29.0.30 in Calendars DJANGO_ALLOWED_HOSTS
3. CALDAV API keys match between CalDAV and Calendars
4. translations.json mounted in Calendars backend
5. Messages API channel has messages:send scope
6. Check CalDAV logs: docker logs calendars-caldav-1 | grep HttpCallback
CALENDARS: CalDAV 401 Redirect Loop¶
Symptom: PROPFIND /caldav/... returning 401 causes infinite re-auth.
Fix: Proxy /caldav/* through Django, NOT directly to CalDAV server.