Symptoms / Fix guide

Why is my app a white screen after a Vercel deploy?

Matt Turley, Continuum. Updated November 5, 2026.

For founders whose app works on a laptop and on a preview URL, then shows nothing at all on the real domain.

The short answer

Why is my app a white screen after a Vercel deploy?

A white screen means the browser got HTML but the JavaScript threw before anything rendered, or its files failed to load. Open the browser console and the Network tab first. A red error names the cause, and a 404 on a /_next/static file points to a deploy or cache mismatch. The most common cause is a missing Production environment variable.

What is really going on

A white page is not an error message; it is the absence of one. The server returned a document, and then the client-side code either crashed while starting, or never started. Both leave the same blank screen, and both leave evidence in the browser console and, for server-side failures, in the Vercel runtime logs.

The reason it works locally is that a local machine quietly supplies things production does not: a .env.local file, a different Node version, a case-insensitive file system and a database that already has your tables. Production gets only what you configured for it.

AI builders make this worse by writing code that reads an environment variable at the top of a file and assumes it exists. When it does not, the whole page fails at import time instead of showing a useful error.

The usual causes, most common first

  1. An environment variable is missing in the Production scope

    How to tell Console errors such as "supabaseUrl is required", "Invalid URL" or "Cannot read properties of undefined". Vercel keeps separate Production, Preview and Development values, so a variable you added once may exist for Preview only.

    The fix Add the variable under the Production environment in the project settings, then redeploy. Variables prefixed NEXT_PUBLIC_ are inlined at build time, so changing one requires a new build, not just a restart.

  2. A server-side exception in a layout or page

    How to tell The page says "Application error: a server-side exception has occurred" and shows a digest value. The real message is not shown to visitors on purpose.

    The fix Search the Vercel runtime logs for the digest to find the actual stack trace. Typical causes are a failed database query in a server component or a missing secret read on the server.

  3. The browser code runs where it cannot

    How to tell Console messages such as "window is not defined" or "Hydration failed because the initial UI does not match". Code reads window, localStorage or the current time while rendering, so the server HTML and the client disagree.

    The fix Move browser-only reads into an effect, or into a client component loaded without server rendering, and make values that differ between server and client (dates, random ids) stable.

  4. Static files 404 or fail to load after a new deploy

    How to tell Network tab shows 404 on a file under /_next/static, or the console shows "ChunkLoadError". An open tab from the previous deploy asks for chunks that no longer exist, or a service worker is serving an old shell.

    The fix A hard refresh confirms it. Remove any stale service worker, and look at your host's skew protection setting so old tabs keep their matching assets during a rollout.

  5. The build passed, but only because errors were switched off

    How to tell The project config sets ignoreBuildErrors or ignores lint during builds, so a type error or a bad import shipped. Build logs show warnings that nobody read.

    The fix Run next build and next start locally with the production environment variables. Treat build errors as errors again, and fix what they reveal.

  6. A redirect loop between middleware and a login page

    How to tell The tab spins, then the browser reports too many redirects, or the page is blank. Often only the production domain loops because a cookie is set for a different host (www versus apex) than the one being checked.

    The fix Use one canonical host, make sure the middleware matcher excludes the login and callback routes, and check that the session cookie domain matches the live domain.

How we diagnose it

  1. Read the console before anything else. Open the browser developer tools on the live URL. The first red error is nearly always the real cause; everything after it is fallout.
  2. Read the Network tab. Look for the document request status, any 404 on static files, and any request to your API that returns an error or never completes.
  3. Read the Vercel runtime logs for the same request. If the page shows a digest, find it in the logs. Server-side failures only appear there. Note which environment the deployment ran in.
  4. Diff the environment. We list the variables the code reads and compare them with what each Vercel scope defines, without printing any secret value. A name missing from Production is the answer more often than not.
  5. Reproduce the production build locally. Run the production build with production values. If it fails there, the bug is in the code, not the host, and a fix can be tested before it is deployed.

What fixing it changes

  • Every variable the code reads is defined in the scope that needs it, and a missing one fails with a clear message instead of a blank page.
  • Browser-only code no longer runs during server rendering.
  • Build errors fail the build again, so a broken deploy cannot go live.
  • There is a route-level error page, so a future failure shows a message and a way back instead of white.
  • Error tracking is connected, so the next failure reaches you before a customer does.

When you do not need us

If the console shows a single clear error and it names a variable or a file, you can fix it yourself in a few minutes, and an AI assistant given the exact error is a good first try. Come to us when the page is still blank after the environment is correct, or when the app is live and every minute of the outage costs you users.

Your next step

The Leak Check is free and tells you in under a minute whether the live site is reachable, loads over SSL and exposes anything it should not. If the page is up but the app is unstable, a Ship Check reads the code for what will break next.

free Leak Check: Paste your live URL. It runs seven surface checks (reachability, SSL, auth flow, payment path, exposed secrets in the client bundle, Supabase exposure, broken links and performance) and returns a green, yellow or red for each. It is a surface scan, not a full security audit. Or: Get a Ship Check, $299.

Run the free Leak Check →See all services and prices →
FAQ

Straight answers

Why does it work on the preview URL but not on my domain?
Preview and Production use separate environment variable scopes, and the domain may add redirects, cookies or middleware behaviour the preview URL does not. Compare the variables per scope first, then check redirects and cookie domains.
Can I roll back instead of debugging?
Yes, and if customers are affected you should. Vercel can promote a previous deployment back to production quickly. Roll back first to stop the damage, then debug the failed build in a preview deployment.
Do I need to redeploy after changing an environment variable?
Yes. A new value applies to deployments created after the change. Variables that start with NEXT_PUBLIC_ are baked into the JavaScript at build time, so the app must be rebuilt for them to take effect.
Keep reading
Why does my app work locally but break in production?By symptom. Production differs from your laptop in environment variables, database, file system, Node version and network rules. The usual causes and how to check each.Why is my OAuth callback not working?By symptom. Sign in with Google or GitHub fails after the provider screen. The redirect URI, Site URL, client secret and cookie causes, and how to check each.My app broke right after launch. What do I do first?By stage. The first hours after a launch goes wrong: stop the damage, find the failure, protect users and data, then make it stable. What usually breaks, in order.What should I check before launching my AI-built app?By stage. A launch-week checklist for apps built with AI tools: who can see whose data, secrets, the real payment path, email, backups, monitoring and a rollback plan.Why is my Vercel cron job not running?By symptom. A scheduled job that never fires or fails quietly: the production-only rule, the config file, the secret header, plan limits and function timeouts, with checks.Why is my Stripe webhook not firing?By symptom. Stripe is usually sending the event and your server is refusing it. How to read the delivery log, the six usual causes, and the fix for each.
Sources
  1. 1. Vercel: Environment variables, Vercel: Production, Preview and Development scopes, and when a changed value takes effect.
  2. 2. Next.js: Environment variables, Next.js: Which variables reach the browser and when they are inlined.
  3. 3. Next.js: Text content does not match server-rendered HTML, Next.js: Causes and fixes for hydration mismatches.
Why is my app a white screen after a Vercel deploy?