Troubleshooting¶
Common issues and solutions for FastReact development and deployment.
Setup Issues¶
Init script prerequisites not met
Solution: Install all required tools:
- Python 3.12+: https://www.python.org/downloads/
- Docker: https://docs.docker.com/get-docker/
- Node.js 22+: https://nodejs.org/
- Sqitch: https://sqitch.org/download/
Init script permission denied
Solution: Make the script executable:
Port conflicts during init
Solution: Stop conflicting services:
# Find what's using port 5432
lsof -i :5432
# Stop the service or change the port in docker-compose.yml
Database Issues¶
Migration fails with "relation does not exist"
The schema hasn't been created yet. Run migrations in order:
"could not connect to server"
The database container isn't running:
Migration fails mid-way
Check which migrations are deployed:
Revert to a safe point and redeploy:
Authentication Issues¶
Login returns 401 with correct credentials
- Verify your admin user was created:
uv run scripts/create_admin.py - Check that
FR_ENVIRONMENTis set correctly inbackend/.env - Verify database is running and migrations are applied
"CORS error" in browser console
Add your frontend URL to CORS settings in backend/.env:
Google OAuth redirect fails
Ensure your redirect URI in Google Cloud Console exactly matches:
Session cookie not being set
In development, ensure FR_ENVIRONMENT=dev is set. The cookie SameSite and Secure settings differ between dev and production.
Frontend Issues¶
API client types are out of sync
Regenerate the TypeScript client after backend changes:
TypeScript errors after npm run generate
Backend changed a model that the frontend uses. Check the TypeScript errors to find what changed, then update your components accordingly.
Vite build fails
Fix all TypeScript errors, then retry the build.
React Router v7 route not found
Ensure the route is registered in frontend/app/routes.ts:
Backend Issues¶
ModuleNotFoundError after adding code
The dependency injection container hasn't been updated. Add your new service/repo to app/config/container.py and wire it up.
422 Unprocessable Entity from API
The request body doesn't match the Pydantic model. Check:
- Required fields are present
- Field types match (e.g., sending a string where an int is expected)
- Visit
http://localhost:8000/docsto see the expected schema
500 Internal Server Error
Check the backend terminal for the full Python traceback. Common causes:
- Database connection failed
- Missing environment variable
- Unhandled exception in a service
409 Conflict on user creation
The email already exists in the database. Use a different email or check the existing user.
Email Issues¶
Emails not received in development
By default, development uses stub mode — check your backend logs for [STUB EMAIL] blocks containing the email content and links.
Email not sending in production
- Verify
FR_EMAIL_PROVIDERis set correctly - Check your API key is valid
- Ensure your sender domain is verified with the provider
- Check provider rate limits
Stripe Issues¶
Webhook signature verification fails
The FR_STRIPE_WEBHOOK_SECRET doesn't match the one configured in Stripe dashboard.
Use the Stripe CLI for local testing:
The CLI prints a webhook signing secret — use that value for local development.
Subscription not updating after payment
Webhooks aren't reaching your server. Check:
- Stripe CLI is running (development) or webhook endpoint is configured (production)
- The endpoint returns a 200 response
- Check Stripe dashboard webhook logs for delivery attempts
Docker Issues¶
Container exits immediately
Check logs:
Database volume conflicts
Reset the database volume:
Getting More Help¶
If you're stuck:
- Check the GitHub Issues for similar problems
- Search for the error message online
- Review the Architecture Overview to understand expected behavior
- Enable debug logging in
backend/.env:FR_LOG_LEVEL=debug