Platform

Bolt fixes

Deploy problems that show up once a Bolt project leaves the preview.

28 fixes, most common 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 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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.

  14. 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.

  15. 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.

  16. 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.

  17. 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.

  18. 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.

  19. 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).

  20. 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://.

  21. 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.

  22. 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.

  23. 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.

  24. 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.

  25. 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.

  26. 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.

  27. 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.

  28. 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.

All platforms

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