Your Lovable app shows a blank screen
Your app worked while you were building it, and now the published page is white. Nothing to click, nothing to read, no error anywhere.
Here is the thing the blank page hides: the error is real, specific, and already written down — in the browser console. Lovable builds React apps, and when a React component throws while rendering, React unmounts the whole tree. The screen goes empty precisely because there was an error, and the message went to the console instead of the page.
So the fix is never "make the screen not blank". It is: read the real error, hand it to the AI that wrote the code, and check the fix took. In that order.
Step 1 — read the actual error
- Open the published site — the
*.lovable.appURL or your custom domain, not the editor preview. - Open the browser console: press F12 (or right-click → Inspect), then the Console tab.
- Reload the page with the console open.
- Look for the first red line. Later errors are usually fallout from the first one.
Copy that first red line exactly, including the file name and line number after it. That string is worth more than any description of the symptom.
The five causes, in the order they actually happen
1. A Supabase environment variable did not make it into the build
If the console says something like:
Uncaught Error: supabaseUrl is required.
then VITE_SUPABASE_URL (or the anon key) was undefined when the app started.
This is the classic preview-works-published-doesn't failure: the value exists
in your workspace, but the published build — or a remix of somebody else's
project — did not get it. The mechanics of why (build-time inlining) are in
the env variables guide; the
short version is that setting the variable is not enough, the app must be
republished afterwards.
2. The code reads a field that is not there yet
Uncaught TypeError: Cannot read properties of undefined (reading 'map')
The page rendered before its data arrived, or the data does not have the shape the code expects — a field the AI referenced that the database never had. This one error accounts for a remarkable share of all blank screens; it has its own guide.
3. The data never arrived because Supabase refused it
If the console shows failed requests to *.supabase.co (status 401,
403, or a 42501 code in the response), the app is fine and the database
said no — usually a row-level security policy that allows nobody to read. See
the Supabase RLS guide. The page can end up blank
when the code treats "no data" as something to crash on.
4. A crash only on some routes, or only after clicking
The home page works, /dashboard is white. Same diagnosis: open the console
before navigating, click your way there, and copy the first red line. If the
route is blank only when opened directly (pasting the URL, refreshing), that is
a different failure — routing and refresh 404s.
5. The build configuration was edited into a corner
Lovable's AI edits vite.config.ts like any other file. A changed base path
or plugin can make the built page request its own JavaScript from the wrong
place: the console then shows the .js file itself failing to load (404) and
nothing else at all, because no code ever ran. The generic version of this —
base paths, routers, minified React errors — is covered in the React blank
page guide.
Step 2 — hand the AI the real error
Do not paraphrase. Paste the message, say where it happens, and ask for the cause rather than a bandage:
Paste this to the AI that built your app
My published app shows a blank page. The first console error on load is: [paste the exact red line here, including the file and line number] It happens on [the published site / only on /dashboard]. Find the root cause and fix it — do not wrap it in a try/catch or add optional chaining to hide it. If an environment variable is missing, tell me its exact name and where to set it. Also add a React error boundary so a future crash shows a message instead of a blank page.
The last sentence matters beyond today's bug: an error boundary means the next failure shows a readable message instead of a white page, which turns this whole class of mystery into a normal bug report.
Step 3 — prove it is fixed
Republish, then check the published URL — not the preview — in a private window (so no cached files or logged-in state help it along). Open the console again: fixed means no red lines, not just pixels on screen. A page can render and still be logging errors that will bite the next visitor.
Questions people also ask
Why does the page show nothing at all instead of an error?
Lovable apps are React apps, and React's default reaction to an error thrown during rendering is to unmount everything. The error is real and specific — it just went to the browser console instead of the screen.
It works in the Lovable preview but not on the published site. Why?
The preview and the published build are different environments. The usual difference is an environment variable (most often the Supabase URL or key) that exists in the editor but was not carried into the published build, or a path that only resolves in the preview.
Will telling Lovable to 'fix the blank screen' work?
Usually not on its own — a blank screen is a symptom, not an error. Paste the exact console error along with the request. With the real message, the AI fixes it in one round instead of guessing.