Every Lovable build breaks the same way, and it is almost never the interesting way.
You spend a weekend making something real: a marketplace for dog walkers, a booking tool for a barbershop, an internal dashboard for a small factory. The demo is good. Then a real user arrives and something in the plumbing gives out, and because the whole thing was assembled by a model in an afternoon, the failure is not in a function you can read. It is in a chain of ten decisions, none of which look wrong on their own.
Here is the order I would work through them, because it saves the most time.
1. The database is not actually in production
The most common failure by a distance. The app writes to a local SQLite file, or to a Postgres that only exists inside the Lovable preview, or to a mock that the model invented and never wired up.
The tell is simple: nothing breaks for the builder, and everything breaks for everyone else. If your app works when you run it locally and fails the moment a real browser hits the deployed URL, the database is your first suspect.
What it looks like in practice: "Table not found" on a page that renders fine in the preview, or new rows vanishing when you refresh, or a deployment that succeeds and then serves 500s on every request that touches the database.
Fix: point the app at a managed Postgres, put the connection string in environment variables, run the migrations against that database from the deploy step rather than from a machine, and then delete the local database and deploy again. If it still works, the local database was the problem.
2. Auth that works in preview and fails everywhere else
Lovable's preview environment handles auth generously. In production, the callback URL is wrong, the session cookie is flagged secure on a non-HTTPS domain, or the OAuth provider has the wrong redirect URI registered. The user signs in, gets bounced, and lands on a blank page with no error.
Three things to check, in order: the exact redirect URI including the trailing slash, the session cookie flags (secure, httpOnly, sameSite), and whether the user table has a unique constraint on the email - because a second sign-in with a slightly different email silently creates a second row and half your app now sees two users.
3. Secrets in the repo and in the client bundle
AI-generated code loves to put a key in a component. The giveaway is a string starting with sk_ or a long token sitting in a file that gets bundled into the frontend.
This is the one that turns a slow afternoon into an incident, because a key committed to a public repository is a key you have to rotate, not just delete. Move everything to environment variables, check what the production bundle actually contains, and rotate anything that was ever in the client.
4. The data model is a sketch
The model gave you one table for a thing that needs three, or a JSON column holding an array of objects that everything else has to parse by hand. It works, and then the first time you need to filter, sort or join, you find yourself writing application code that a schema should have been doing.
If the app has any concept that repeats - a booking, a message, a line item - it wants to be a table. Fixing this before launch is much cheaper than fixing it with live data.
5. Error handling that swallows everything
Try/catch blocks that log nothing and return an empty object are everywhere in generated code. The user sees a blank card, the server logs a 200, and you have no idea it happened.
Make failure loud. Return the actual error to the user, log it server-side with a request id, and give every list and every form a visible empty and error state. The moment a user reports "the page is empty", you want a log line, not a guessing game.
6. Nobody can deploy it, so it never ships
No CI, no staging, no environment separation, no rollback. The app exists as a Lovable project, a GitHub repo and a feeling.
Deploy it properly before you call it finished: a real hosting target, environment variables set in the host rather than in a local file, a build that runs from a clean checkout, and a way back if the deploy is wrong. Most "launches" that fail do so here, not in the code.
The checklist worth keeping
You can deploy this today to a URL somebody else can open. If the database disappears, the user sees a message and not a stack trace. No secret is in the client bundle. Every list and form has a real empty state and a real error state. A user can delete their account and their data. Every write route checks who is allowed to make it.
If those seven answers are yes, the app is finished in the sense that matters. The remaining work - the polish, the animations, the extra settings - is what makes people say the product feels good, and it is the part you should do last.
If you would rather hand this list to someone who does it every day, https://www.appstuck.com/platforms/lovable covers exactly this platform, and there is a page per builder for the others - Bolt, Replit, Cursor, Base44 and v0 - each with the same kind of troubleshooting content. Either way, the work is the same; it is the last 10%, and it is the part that decides whether the app is a demo or a product.
Disclosure: I work with the team behind AppStuck.
Top comments (0)