Guide
App shows a blank page after publishing, but works in the preview
You press Publish, open the live link, and get a white screen. No error, no content. The preview still works, which makes it worse.
Why it happens
A blank page almost always means the app crashed while starting, before it could draw anything. The preview and the published site are two different environments, so something the preview had, the live site doesn't. The three usual suspects:
- A missing setting (environment variable). The preview knows your database address or API key; the published build doesn't. The app reads an empty value on startup and crashes.
- An error that only happens with real data or a real address, like code that expects a logged-in user, or a link to the preview domain.
- An old cached version. Your browser shows the previous build, which no longer matches the files on the server.
Confirm it in 2 minutes
- Open the live site in Chrome, press F12 (or right-click → Inspect) and open the Console tab.
- Reload the page. Look for the first red error.
undefined,is not a function, or "supabaseUrl is required": a missing setting (cause 1).- A
404on a.jsfile: a cached or broken build (cause 3).
- Try a private/incognito window. If it works there, it was cache.
Fix it
- Missing setting: in your builder's or host's settings, check every key the preview uses is also set for the published site. On most hosts, variables used in the browser must start with
VITE_. Publish again after changing them; old builds don't pick them up. - Error with real data: copy the first red error into your builder's chat: "The published site is blank. The first console error is: [paste]. Find the cause and fix only that."
- Cache: hard-refresh (Ctrl+Shift+R) and publish once more.
Still blank?
If the console is empty and the page is still white, the crash may be happening before any error is printed. That needs someone to open the live app, not the preview.
Paste your app's link at vibe-fixer.com: an AI agent goes through it like a first customer and tells you how many problems it finds. Free, no account.
Still stuck?
Paste your app’s link for a free test — no account. Your AI agent goes through it like a first customer, shows you what breaks, then fixes it while you watch.