BLOG
BlogGuides

Catch the blank white screen after a deploy

The most reported failure of AI-built apps is a page that renders nothing in production. A test that reads one value and records the console catches it on the first run.

Up, and empty#

The server answers. The uptime monitor is green. The page is white.

A developer who deployed a dozen apps built with Lovable, Bolt, Cursor and Claude Code called the blank white screen the most common Lovable and Bolt failure he sees, by a wide margin. The usual cause is a script that throws while the page starts: an environment variable that existed on your machine and not in production, so the code reads "undefined", and a hosting company's guide lists "Cannot read properties of undefined" as the error to look for first.

A health check that asks "did the server return 200" passes all of this.

A check that reads the page#

The smallest useful test reads something only a working page shows:

Open https://app.example.com.
Check the page shows the heading "Your projects" and at least one
project card, or the sign-in form with an Email field.

If the page is white, there is nothing to read, and the check fails with what it expected and what it saw. The result also keeps the browser's Console and Network tabs, so the error that caused it is next to the failure:

  • An error your own scripts throw is reported on the run with its stack.
  • A failed request shows its address and status.
A failed run: the check that failed, what was expected and what was seen, and the steps to reproduce it.
A failed run: the check that failed, what was expected and what was seen, and the steps to reproduce it.

Make script errors fail the run#

By default, an error from your site's scripts is reported, and fails the run only when it breaks a step the test needed. For a smoke test after deploys, you can be stricter: in the test's options set JavaScript errors to fail (jsErrors: "fail" over the API), and any error from your own scripts fails the run, even one that did not stop a step. Errors from ads, analytics and chat widgets are ignored either way. The test options list the rest.

Run it where the bug appears#

The white screen appears on deploy, so the test belongs right after it:

  • Press Run after you publish.
  • From GitHub, the after-deploy workflow runs it and fails the build.
  • Your coding agent can run it over MCP after it deploys, and read the console error from the result.

Then hand the error back with Copy fix prompt: it names the failed check, what was seen and the error, which is what the agent needs. See Turn a failed test into a fix prompt.

Beyond the home page#

Blank screens are often per page: the dashboard works and the settings page throws. Add one line per important page to the same test ("Open Settings and check the Profile section shows the account's email"), so a page that renders nothing fails by name.

This post is part of Testing an app you built with AI.

Filed underWebCrashes and errorsAI-built apps