App Finishers

Fix guide · updated 2026-11-11

Replit app not working: blank Preview, failed publish, or broken live app

Application failed to respond · 502 Bad Gateway · The endpoint has been disabled · publishing failed

Your Replit app won't load. Maybe the Preview stays blank, publishing fails at the last step, or the public .replit.app link shows an error while Preview looked fine. Replit's own troubleshooting starts with one question: does the app work in Preview? The answer tells you which half of the problem you're in. Find your symptom below.

First: does it work in Preview?

Press Run at the top of the editor and open Preview. It should show your app at a replit.dev address. If it doesn't, the problem is in the app itself, and publishing will not fix it. Ask Agent to check the basics in this order: the run command, missing packages, errors in the app, the port, and missing Secrets. Ask it to fix the smallest problem first and tell you how to check that Preview works.

If Preview works, the problem is in the published copy. Keep reading.

Publishing fails during the build

Open the Publishing pane and the failed deployment's Logs. Scroll up to the first real error, not the final "build failed" line: a missing package, a wrong file path, a typo in the build command, a missing environment variable. Fix that one thing and publish again. Republishing an unchanged build gives the same failure.

Publishing fails at the last step, or "Application failed to respond"

Before it marks your app as live, Replit sends a request to it. It fails when your server isn't listening where Replit looks:

For a Node.js server, the start of the fix looks like this:

const PORT = process.env.PORT || 3000;
app.listen(PORT, "0.0.0.0", () => console.log(`listening on ${PORT}`));

And for Python with Flask:

import os
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 3000)))

"Application failed to respond" can also mean the app crashed before it started listening: look for an error at startup in the deployment logs. On an Autoscale deployment, the first request after a quiet period can take a few seconds while a server starts. That's normal.

502 Bad Gateway on the live app

A 502 usually means your app crashed or sent back something the server couldn't use. Note the time of one failing request, then read the runtime logs around that time. In Node.js, an unhandled error can kill the process without a clear message. This line makes it show up in the logs:

process.on("uncaughtException", (err) => console.error("Uncaught:", err));

Once you see the real error, paste it into a new Agent chat.

Preview works, the live app doesn't

This is the most common case, and it's almost always a difference between the two environments:

"The endpoint has been disabled" (database)

Your database is paused. Check for an unpaid bill or a usage limit first. Then open the Database pane, select the affected environment (development or production) and click Unpause database if it's there. If that button is missing, check whether a DATABASE_URL you set by hand points to a different database. Don't paste the full connection string anywhere public.

403 Forbidden

Three usual causes: too many cookies make the request too large (clear cookies for the site and retry), the request is missing a required login, or the deployment is set to private.

The link won't open on some networks

If the app loads on your phone's mobile data but not on a work or school network, a web filter is probably blocking replit.app or replit.dev addresses. Replit suggests trying a public DNS resolver (1.1.1.1 or 8.8.8.8). For your users, a custom domain is the lasting answer. It also keeps the same address across republishes, which a .replit.app name doesn't guarantee, especially after a rename.

Before you change anything

Still stuck after all this? Send us the project and we'll find it.

Sources: Replit docs, Troubleshoot publishing, Troubleshoot deployments, Networking and app errors, Troubleshoot databases, Troubleshooting guides, Deployment types and Secrets.

Other Replit app problems? See Fix a Replit app.