Troubleshooting
This page covers common errors you may encounter when developing with LaunchFast and how to fix them.
Content Security Policy violations
If you see an error like "Refused to load the image because it violates the Content Security Policy directive," it means you are loading a resource from a URL not in the allowlist.
Fix this by adding the domain to the appropriate CSP directive in server/index.ts:
contentSecurityPolicy: {
directives: {
'img-src': ["'self'", 'data:', 'https://*.example.com'],
// Add other directives as needed
},
}See the CSP documentation for the full list of directives.
Database errors
Migration failures
If prisma migrate deploy fails, check that you have not modified a committed migration file. Prisma compares checksums and will reject modified migrations. Always create new migrations instead of editing existing ones.
Connection issues
If the app cannot connect to the database, verify that the DATABASE_URL environment variable is set correctly. For local development, check that your .env file exists and contains the correct path.
Authentication issues
If login or signup flows fail silently, check the terminal output for email delivery logs. In development mode (no RESEND_API_KEY), verification codes are printed to the terminal instead of being sent.
If sessions are not persisting, verify that the SESSION_SECRET environment variable is set and that cookies are not being blocked by the browser.
Stripe webhook debugging
If webhooks are not being received, check that STRIPE_WEBHOOK_SIGNING_SECRET matches the secret from your Stripe dashboard. For local development, use the Stripe CLI to forward events:
stripe listen --forward-to localhost:3000/api/stripe/webhookThe CLI will output a webhook signing secret to use in your .env file.
Deployment failures
If fly deploy fails during the build step, check that the Node.js version in Dockerfile matches package.json. If it fails at runtime, check fly logs for the specific error. Common causes include missing environment variables and database migration failures.
Dev server issues
If the dev server fails to start, check that all dependencies are installed (npm i) and that no other process is using port 3000. If you see stale build artifacts, try removing node_modules/.cache and restarting.