Lovable, Bolt, Cursor, Replit, and v0

Your AI-built app broke? Find the fix.

Paste the error from the screen. These are plain-English repairs for the problems that show up after you deploy — ranked with the ones builders hit most often first.

Show fixes for

40 fixes

Most common problems first.

  1. Rank 1. Supabase login redirects to localhost:3000 after deploy

    Login or email confirm sends users to localhost:3000 on your live site? Change Supabase's Site URL and add your domain to Redirect URLs.

  2. Rank 2. Invalid API key (Supabase)

    Supabase says "Invalid API key" on your live site? Usually the key or project URL env var is missing, mistyped, or from another project.

  3. Rank 3. Environment variables are undefined in production

    Works locally but env vars are undefined once deployed? Add them to your host, use the VITE_ or NEXT_PUBLIC_ prefix for browser code, then redeploy.

  4. Rank 4. Supabase returns an empty array [] but the table has data

    Your Supabase query returns [] with no error even though rows exist? Row Level Security is on with no policy allowing the read.

  5. Rank 5. new row violates row-level security policy for table

    Saving data fails with "new row violates row-level security policy"? Add an INSERT policy with a WITH CHECK rule and send the right user_id.

  6. Rank 6. Webhook signature verification failed. No signatures found matching the expected signature for payload

    Stripe webhook fails signature check? Usually the wrong whsec_ secret or your framework changed the raw request body. Here's the fix.

  7. Rank 7. Stripe webhook failing: 404, 307/308 redirect, timeout or 500

    Stripe shows webhook deliveries Failed with 3xx, 4xx, 5xx or timed out? Point it at the exact final URL and respond 200 fast.

  8. Rank 8. Blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present

    "Blocked by CORS policy" on your live site? The server you call must allow your domain. How to fix it for APIs you own and ones you don't.

  9. Rank 9. Supabase Edge Function CORS error: Response to preflight request doesn't pass access control check

    Calling a Supabase Edge Function from the browser fails with a CORS/preflight error? Handle OPTIONS and return corsHeaders on every response.

  10. Rank 10. Vercel 404: NOT_FOUND when refreshing a page or opening a direct link

    Home page works on Vercel but refreshing /dashboard gives 404 NOT_FOUND? Add a rewrite to index.html for your single-page app.

  11. Rank 11. Netlify "Page not found" when refreshing or opening a link

    Netlify shows "Page not found" on refresh or deep links? Add the /* /index.html 200 rewrite so your single-page app handles routing.

  12. Rank 12. Module not found: Can't resolve (build works locally, fails on Vercel)

    Vercel build fails with "Module not found: Can't resolve" but works on your Mac/PC? Usually filename casing. How to find and fix it.

  13. Rank 13. Changed an environment variable on Vercel but the live site still uses the old value

    Updated a key in Vercel env vars but nothing changed? Env var changes only apply to new deployments. Redeploy and check the right environment.

  14. Rank 14. Error 400: redirect_uri_mismatch (Sign in with Google)

    Google sign-in shows "Error 400: redirect_uri_mismatch"? The callback URL in Google Cloud must exactly match the one your app or Supabase uses.

  15. Rank 15. email rate limit exceeded (Supabase Auth)

    Supabase says "email rate limit exceeded" or sign-up emails stop? The built-in mailer allows only 2 emails an hour. Set up custom SMTP.

  16. Rank 16. Supabase confirmation or password reset email not arriving

    Users never get the Supabase confirm or reset email? Check the rate limit, set up custom SMTP and fix the link's Site URL.

  17. Rank 17. Supabase service_role or secret key exposed in front-end code

    Is your Supabase service_role or sb_secret key in your browser code? Anyone can read it and bypass all security. How to rotate and fix it.

  18. Rank 18. infinite recursion detected in policy for relation

    Supabase error 42P17 "infinite recursion detected in policy for relation"? Two RLS policies check each other. Break the loop with a function.

  19. Rank 19. permission denied for table (Supabase error 42501)

    Supabase "permission denied for table"? The role lacks a GRANT on the table, which is checked before RLS. Add the grant, then a policy.

  20. Rank 20. Supabase Storage upload fails: new row violates row-level security policy

    Image/file upload to Supabase Storage fails with an RLS error? Add policies on storage.objects for INSERT (plus SELECT/UPDATE for upsert).

  21. Rank 21. Vercel FUNCTION_INVOCATION_TIMEOUT (504) on API routes or AI calls

    Vercel API route times out with 504 FUNCTION_INVOCATION_TIMEOUT? Common with slow AI calls. Raise maxDuration, stream, or move work to background.

  22. Rank 22. 500: INTERNAL_SERVER_ERROR / FUNCTION_INVOCATION_FAILED on Vercel

    Live site shows 500 FUNCTION_INVOCATION_FAILED but works locally? Your server code crashed. Read the runtime logs, then check env vars.

  23. Rank 23. too many connections / remaining connection slots are reserved (Supabase + serverless)

    Database errors like "too many connections" after deploying to Vercel? Use Supabase's transaction pooler (port 6543) for serverless functions.

  24. Rank 24. Hydration failed because the server rendered HTML didn't match the client

    Next.js "Hydration failed" error? The server and browser drew different HTML. Fix nesting, window/localStorage use and dates.

  25. Rank 25. Mixed Content: the page was loaded over HTTPS but requested an insecure resource

    Browser blocks requests with a "Mixed Content" warning on your HTTPS site? Change every http:// URL your app calls to https://.

  26. Rank 26. Vercel custom domain shows "Invalid Configuration"

    Added your domain to Vercel and it says Invalid Configuration? Set the DNS records Vercel shows at your registrar and wait for DNS.

  27. Rank 27. Lovable custom domain not working or stuck pending

    Connected your own domain to Lovable and it won't load or stays pending? Check the DNS records Lovable gives you and remove conflicting ones.

  28. Rank 28. Replit deployment fails or published app won't load (server must listen on 0.0.0.0)

    Replit preview works but publishing fails or the URL won't load? Make your server listen on 0.0.0.0, set production Secrets, check ports.

  29. Rank 29. Stripe error: No such price / No such customer (resource_missing)

    Stripe says "No such price" or "No such customer" in production? You're mixing test and live keys or IDs. Match them.

  30. Rank 30. OpenAI API 429: You exceeded your current quota / rate limit reached

    Your app's AI feature fails with OpenAI 429? Either your credits ran out or you're sending requests too fast. How to tell which and fix it.

  31. Rank 31. Invalid JWT after switching to sb_publishable or sb_secret keys

    The app broke after Supabase's new sb_publishable or sb_secret keys? Legacy keys can stay on until you swap them. Don't send the new keys as a Bearer JWT.

  32. Rank 32. Build failed: npm ERR! ERESOLVE

    Vercel stops on npm ERR! ERESOLVE unable to resolve dependency tree? npm is refusing a peer dependency clash. Fix the versions, or override the install command on purpose.

  33. Rank 33. ReferenceError: window is not defined

    Next.js crashes with window is not defined? The page is rendered on the server, where window does not exist. Read it after the component mounts.

  34. Rank 34. Supabase error: JWT expired

    API calls fail with JWT expired? The Supabase access token is meant to be short-lived. Refresh the session once, and don't refresh it twice at the same time.

  35. Rank 35. Clerk sign-in keeps redirecting in a loop

    The app bounces between the page and Clerk sign-in forever? The redirect target is protected too, or the force-redirect URL points back at the gate.

  36. Rank 36. TypeError: Failed to fetch (only in production)

    The live site says Failed to fetch, but the preview worked? The browser could not open the connection. Check the URL, HTTPS, and the console, not the HTTP status.

  37. Rank 37. Vite env var is undefined because the name has no VITE_ prefix

    import.meta.env.MY_KEY is undefined in a Vite app? Vite only exposes names that start with VITE_. Rename it and rebuild.

  38. Rank 38. Lovable GitHub sync is behind, diverged, or created a new repo

    GitHub and Lovable don't match? Lovable syncs one branch, won't reattach an old repo, and replaces its copy if you rewrite history.

  39. Rank 39. Prisma on Vercel: query engine not found

    Vercel runs the app and Prisma can't find its query engine? The Rust engine file was left out of the serverless bundle, or Prisma Client was generated for the wrong machine.

  40. Rank 40. Supabase error: Email address not authorized

    Sign-up tells the user Email address not authorized? The built-in mailer only sends to your Supabase organization. Custom SMTP sends to everyone else.

Comparisons

No failure-rate scores. These pages compare what Lovable, Bolt, Cursor, Supabase, Firebase, Vercel, and Netlify document.

Can't fix it? Get help.

If the steps didn't clear the error, send what the screen says. A person can take a look. This is a request for a paid fix, not an instant chat.

Request a fix