White screen after publishing: causes and fixes
A blank page after publishing means the app crashed before drawing anything. The browser console tells you why; here is how to read it and what each error means.

Key takeaways
- A white screen is a JavaScript crash at startup. The browser console on the live site shows the real error in red.
- The top causes are a missing setting at build time, a call to a localhost address, and a file or route that only existed in development.
- Roll back to the last good release first if real users are affected, then fix calmly.
A white screen after publishing almost always means your app's JavaScript crashed before it could draw anything. The page loaded, the code started, something threw an error, and React (or whatever renders the app) gave up, leaving an empty page. The most likely culprit is a value the app needs at startup, such as a backend URL or key, that existed in development and is missing or different in the published build. The browser console will tell you which.
If people are using it, roll back first
If the blank site is one real visitors depend on, restore service before you debug. In Startbase, open the Publish panel and its Deploy history, which lists every release with its status. Click Rollback on the last release that worked and that version goes live again. Your workspace is untouched, so you can fix the problem there and republish when it is ready.
Read the real error in 30 seconds
- 01Open the live address on a desktop browser.
- 02Open the developer tools (right-click, Inspect, or F12) and pick the Console tab.
- 03Reload the page. The first red error is the one that matters; the rest usually follow from it.
- 04Also check the Network tab for requests shown in red (404 or failed). A missing JavaScript or CSS file means the page never got the app at all.
Copy the first error exactly. "Something went wrong" helps nobody; `TypeError: Cannot read properties of undefined (reading 'map')` at a named file points straight at the line.
The causes, most likely first
1. A setting the build did not get
Vite apps bake variables that start with `VITE_` into the code at build time. If a value such as the backend URL is undefined when the published build runs, the first line that uses it crashes. With a Supabase client, the console error is typically "supabaseUrl is required."
How to check: search the console error for "required", "undefined" or a variable name. The fix: have the agent confirm where the app reads its configuration and that the published build receives it. Remember the split: public values (URLs, the anon key) belong in the app's environment, while secret keys belong in Backend → Secrets, which only server functions can read. Names starting with `VITE_` are rejected there on purpose. The glossary entry on environment variables explains the difference.
2. Code that points at localhost
A line like `fetch('http://localhost:3000/api')` works on the machine where that server runs and nowhere else. On the live site the request fails, and if the app needs that response to render its first screen, you get a blank page. How to check: the Network tab shows a failed request to `localhost` or `127.0.0.1`. The security check that runs when you open Publish also looks for localhost URLs that would break the live app, so check its findings. The fix: send the finding to the agent with the scan's Fix button, or ask it to replace the address with the real backend.
3. An error that only the production build reveals
Development and production builds differ: code is minified, unused parts are removed, and some checks behave differently. Typical examples are a component that assumes data is already loaded (`items.map` on `undefined`), a browser-only API such as `window` used in the wrong place, or a circular import that happens to work in development. How to check: the console error names a function or file; the agent can map a minified name back. The fix: guard against missing data, and ask the agent to add an error boundary so a crash in one widget shows a friendly message instead of blanking the whole app.
4. Files that 404
If the Network tab shows the main JavaScript file failing with 404, the page HTML refers to assets that are not where it expects. This happens when the app is configured to live under a sub-path, or when a file name differs only in letter case (`Logo.png` vs `logo.png`), which some development setups forgive and web hosts do not. The fix: ask the agent to check the build's base path and the exact case of every imported file name.
5. An old version cached in the browser
Occasionally a browser holds onto an old `index.html` that refers to files from a previous release. How to check: open the site in a private window or on your phone. If it works there, it is caching on your machine. The fix: hard refresh (Shift and reload). If it happens to many visitors after each release, ask the agent to review how the app registers a service worker, the usual source of stubborn caches.
6. The backend is not running
Some apps wait for a database response before drawing anything. If Cloud is disabled, or a hosted database paused because the Cloud Credits balance ran out, that first request fails. How to check: the Backend tab's Overview shows whether the backend is running, paused or waking. The fix: re-enable or top up, then ask the agent to show a proper error state when data fails to load, so an outage never looks like a blank page again.
Make sure the publish actually finished
A publish moves through Queued, Building, Deploying and Live. While a republish builds, the previous version stays live, so if you look too early you may be judging the old release. If a step failed, the panel says so. Also remember that publishing takes a snapshot: changes you made after clicking Publish are not live until you click Republish.
Make the next blank page impossible
- An error boundary at the top of the app, so any crash shows "Something broke, reload" with a button instead of nothing.
- Loading and error states on the first data request, so a slow or failed backend shows a message.
- A quick check of the live address after every republish, in a private window, before you share the link. Thirty seconds, every time.
- Read the security check findings before publishing. It never blocks a publish, so a localhost URL flagged as High can still ship if nobody looks.
What to send the agent
The agent tests what it builds in a real browser and reads runtime errors, but it works in your workspace, not on the live site. So bring it the evidence from the live page:
The published site at https://myapp.startbase.app shows a blank white page. The workspace preview works. Console on the live site, first error: "Uncaught Error: supabaseUrl is required." at index-8f2a.js. The Network tab shows no failed asset requests. Please find why the production build is missing the backend URL, fix it so the published build gets the right public configuration, add an error boundary around the app so a crash shows a message instead of a blank page, and run a production build locally to confirm it renders before I republish.
If the site works when published but breaks only on certain pages or after a refresh, read works in preview but not when published, which covers the subtler differences. For the full publish flow, see the publishing docs, and for general debugging habits, how to fix bugs with AI.
Frequently asked questions
Why is my React app blank only after deploying?
Because the production build crashed at startup. The usual reasons are a missing build-time variable, a request to localhost, an asset path that 404s, or code that assumed data would exist. The browser console on the live site shows which.
Do I lose anything if I roll back?
No. Rollback only changes which release is live. Your workspace keeps your latest code, and you can republish once it is fixed.
The site is blank on my phone but fine on my laptop. Why?
Either your phone has an old cached version, or the code uses a browser feature that older mobile browsers lack. Try a private tab on the phone first; if it is still blank, check the error with remote debugging or ask the agent to test at phone size.

