FAQ & Troubleshooting
Common Issues
Section titled “Common Issues”Containers won’t start
Section titled “Containers won’t start”Symptom: docker compose up fails or containers restart in a loop.
Check:
- Ensure Docker Engine and the Compose plugin are installed:
docker compose version - Check for port conflicts:
lsof -i :3000andlsof -i :8000 - Review container logs:
docker compose logs backendordocker compose logs frontend
Database connection errors
Section titled “Database connection errors”Symptom: Backend logs show connection refused or could not connect to server.
Fix: The database container may still be starting. Wait 10-15 seconds and check again. If persistent, verify your DATABASE_URL in .env matches the Postgres container settings.
”Invalid token” or 401 errors
Section titled “”Invalid token” or 401 errors”Symptom: API requests return 401 Unauthorized.
Check:
- Access tokens expire after 15 minutes by default (
ACCESS_TOKEN_EXPIRES_MINUTES). The frontend auto-refreshes, but API scripts need to handle refresh or re-login. - Ensure
JWT_SECREThasn’t changed between requests — changing it invalidates all existing tokens. - For registration tokens, verify the token hasn’t been revoked and hasn’t exceeded
max_uses.
CORS errors in the browser
Section titled “CORS errors in the browser”Symptom: Browser console shows CORS policy errors.
Fix: Set FRONTEND_ORIGIN to the exact URL your frontend is served from (e.g. https://nodebyte.example.com). Include the scheme and port if non-standard.
Cookies not working in production
Section titled “Cookies not working in production”Symptom: Login works but the session doesn’t persist (redirected to login on every page load).
Fix:
- Set
COOKIE_SECURE=true(required for HTTPS) - Set
COOKIE_SAMESITE=lax(orstrictif frontend and API share a domain) - Ensure your reverse proxy passes the correct headers (
X-Forwarded-Proto: https)
Turnstile widget not appearing
Section titled “Turnstile widget not appearing”Symptom: The registration page doesn’t show the CAPTCHA widget.
Check:
- In development, the test keys render an invisible widget — this is expected
- In production, ensure
NEXT_PUBLIC_TURNSTILE_SITE_KEYis set correctly - To disable entirely:
TURNSTILE_ENABLED=false
Browser extension can’t connect
Section titled “Browser extension can’t connect”Symptom: The extension shows a connection error.
Fix:
- Open extension settings and verify the API URL (e.g.
http://localhost:8000) - The extension talks directly to the backend — it doesn’t use the frontend proxy
- Ensure the backend is running and accessible from your browser’s network
Migration errors on startup
Section titled “Migration errors on startup”Symptom: Backend fails with Alembic migration errors.
Fix:
docker compose exec backend alembic upgrade headIf migrations are stuck, check the alembic_version table in PostgreSQL.
Getting Help
Section titled “Getting Help”- API documentation — interactive Swagger UI at
/docson your backend - Source code — github.com/dot-billy/nodebyte
- Issues — report bugs on the GitHub Issues page