Fix guides
Plain-English fixes for the errors AI-built apps hit most: Supabase, Firebase, Stripe, auth, and deployment. Try these first. If you are still stuck, we will fix it for you.
Supabase: "new row violates row-level security policy"
Why Supabase blocks inserts from your Lovable or Bolt app, and the exact policy SQL that fixes it safely.
Vercel build: "Module not found: Can't resolve"
Your app runs locally but the Vercel build fails on an import. The usual causes are file name casing, missing dependencies, and path aliases.
Environment variables undefined after deploy
Why process.env or import.meta.env values disappear in production, and how to fix prefixes, Vercel settings, and redeploys.
CORS: "No 'Access-Control-Allow-Origin' header"
What CORS errors mean in AI-built apps and the right fix for Express, Next.js API routes, and Supabase Edge Functions.
Login redirects to localhost after deploy
Magic links, password reset emails, or Google login redirect to localhost:3000 in production. Fix the Site URL and redirect allow list.
Next.js "Hydration failed" error
Why server and client HTML do not match in Next.js, with fixes for dates, random values, window checks, and invalid nesting.
404 or blank page when you refresh a sub-page
Clicking around works, but refreshing /dashboard or opening a shared link gives a 404 or a white screen. Add the single-page app fallback for your host.
Stripe: "No signatures found matching the expected signature"
Stripe webhook signature verification fails. The cause is almost always the wrong signing secret or a parsed request body. Fixes for Next.js, Express, and Supabase Edge Functions.
Stripe payment succeeded but the user is not upgraded
The customer paid, the money arrived, but their account never upgraded. How to trace the webhook, link the payment to the user, and update the database safely.
Firestore: "Missing or insufficient permissions"
Firestore reads or writes are denied, often suddenly after 30 days. Why test-mode rules expire and how to write safe security rules.
Firebase: auth/unauthorized-domain
Google sign-in works locally but fails on your deployed site with auth/unauthorized-domain. Add the domain to Firebase's authorized domains.
Supabase: "Database error saving new user"
Signups fail with Database error saving new user. A trigger on auth.users (usually handle_new_user) is failing. Here is how to find and fix it.
Supabase confirmation emails not arriving (rate limit exceeded)
Confirmation and magic-link emails never arrive, or you see email rate limit exceeded or Email address not authorized. The built-in email service is for testing only. Set up custom SMTP.
App freezes or goes blank after login (Supabase onAuthStateChange)
After signing in, the app hangs on a spinner or goes blank, and later Supabase calls never return. Often caused by awaiting Supabase calls inside onAuthStateChange.
Next.js "ReferenceError: window is not defined"
Next.js renders on the server, where window, document, and localStorage do not exist. Move browser code into useEffect or load the component client-only.
"TypeError: Failed to fetch" in the browser
Failed to fetch means the browser could not complete the request at all. Check the URL, mixed content, CORS, a paused Supabase project, or a crashed server.