Guide Deploys

My Lovable or Bolt app worked, then broke after a deploy

Short answer

Your app was working. You changed something, deployed again, and now it shows a blank page, a 404, a login loop or no data. Often the code you just wrote isn't the problem. A setting outside the code didn't come along: an env var, a sign-in address, or a database permission. Here's what to check, in the order we'd check it.

1. Env vars missing or out of date on your host

What you see: a blank page, or the app loads but can't reach Supabase.

Why: with Vite, only env vars that start with VITE_ reach the browser, and they're baked in when the app is built. If you added or changed one in the editor, your host doesn't have it yet. If you changed a VITE_ value in your host's settings, the live app keeps the old value until you build and deploy again.

What to check: open your host's env var settings. Make sure every VITE_ value your app uses is there and current. Then redeploy.

2. Supabase still points at the old address

What you see: login sends people to the preview, to localhost, or back to the login page.

Why: Supabase's Site URL and Redirect URLs tell it where to send people after sign-in. If you moved to a new domain or a new deploy address, they may still point at the old one.

What to check: in Supabase, open Authentication, then URL Configuration. Set the Site URL to your live address and add your live domain to Redirect URLs. Our login guide goes step by step: Login works in preview but breaks after deploy.

3. Google sign-in stopped working

What you see: Google sign-in ends on an error page about the redirect.

Why: Google Cloud is missing your Supabase callback address (https://<project-ref>.supabase.co/auth/v1/callback) under Authorized redirect URIs.

What to check: add that callback address under Authorized redirect URIs, and add your live domain under Authorized JavaScript origins too.

4. Refreshing a page gives a 404

What you see: the home page works, but refreshing any other page shows "404 Not Found".

Why: the host often needs a rewrite that sends every route to index.html. If that rule isn't in a file in your project (for example vercel.json on Vercel, or _redirects or netlify.toml on Netlify), or you moved to a different host, the new deploy may not have it.

What to check: add the rewrite in your host's settings and redeploy. One note: Lovable projects started from May 13, 2026 use TanStack Start. There, a 404 usually means the host isn't running the server part of the app, not a missing rewrite. More in Lovable or Bolt app won't deploy.

5. Data stopped loading once real users signed in

What you see: pages load, but lists are empty, or you see a permission error.

Why: this is often your RLS policies, the rules that decide who can read each row. If you see error 42501 on a select, though, it's likely a missing grant rather than a policy.

What to check: note the exact error. Empty lists with no error point at policies: RLS is on and my app shows no data. A 42501 points at grants: Supabase 42501 after Oct 30.

Symptom to check first

What you seeCheck first
Blank page after the new deployVITE_ env vars on your host, then redeploy (section 1)
Login goes to preview or localhostSite URL and Redirect URLs in Supabase (section 2)
Google sign-in error about the redirectSupabase callback in Google's Authorized redirect URIs (section 3)
404 when you refresh a pageRewrite to index.html, or server setup on TanStack Start (section 4)
Empty data or error 42501RLS policies, or a missing grant for 42501 (section 5)

Still stuck?

App Rescue is $149 to fix one stuck issue like this one. Tell us what broke and how to see it happen. We find the cause, fix it, and send you a short note on what was wrong and what we changed. See App Rescue

Want to know if your live app is exposing keys? Our free instant check scans your homepage and its JavaScript for leaked keys and checks your security headers. It can't see your database. Free quick check

FAQ

My app worked yesterday. Why did one deploy break it?

A deploy rebuilds the app with whatever settings the host has right now. If an env var, a sign-in address or a database permission changed, or didn't come along, the new build picks that up even when your code is fine.

Why does my Bolt app work locally but not live?

Your computer has your env vars and serves every page for you. The live host needs its own copy of the VITE_ env vars, set before the build, and often a rewrite so refreshing a page doesn't give a 404.

I changed an env var. Why does the live app still use the old one?

VITE_ values are baked in when the app is built. Change them on your host, then redeploy.

What does error 42501 mean after a deploy?

On a select, it's likely a missing grant rather than an RLS policy. See Supabase 42501 after Oct 30.

Is a broken deploy one App Rescue issue?

Usually, yes. A failing deploy counts as one issue even if the fix touches a few files. If it turns out to be several separate problems, we'll tell you before we start.

Sources