Lovable preview works but the published site doesn't. Why?
Last updated
Symptom
The app works in the Lovable preview, but the published link, ending in lovable.app, shows a blank screen, an error, an empty list or a login that doesn't work.
Cause
When something works in the preview and fails on the published link, the difference is almost always in what each one has, not in your idea. These are the usual suspects, from the simplest to check:
- The published version is older. In Lovable, the official documentation explains that the published site is a copy from the moment you published, and changes only go live when you publish again. If that’s the case, see The published link doesn’t show my latest changes.
- Your browser is showing a saved copy. Reload the page or open it in a private (incognito) window.
- The preview has something a visitor doesn’t. While you test in the preview, you may be logged in to your app and have test data you created yourself. A visitor opening the link for the first time has neither. If the app assumes there’s always a logged-in person or existing data, it can break for them.
- Access rules are blocking visitors. If the app’s database only lets certain people read the data, the public page may show up empty. The opposite problem, data open to everyone, is covered in Could my app be exposing personal data?.
You don’t need to know which one it is. The prompt below asks the AI to list the differences and wait for you before changing anything.
Prompt to paste
Copy the text below, replace what’s in brackets and send it in the chat of the tool you’re using.
My app works in the Lovable preview, but the published version doesn't.
What happens on the published link: [for example "blank screen", "the list is empty" or "login doesn't work"]
Error message, if any: [paste the whole message]
I published again after my last change: [yes / no / not sure]
Don't change anything yet. First list what is different between the preview and the published version that could explain this, from most likely to least likely, and tell me how I can check each one without coding. Wait for my confirmation before making any change.How not to burn credits
- Do the free checks first. Publish again, then open the link in a private (incognito) window. If that solves it, you didn't need to send any message to the AI.
- Ask for a diagnosis before a fix, as the prompt does. In Lovable, Plan Mode costs 1 credit per message, so you know the price of that conversation in advance.
- After each attempt, check what the message cost in the message history, through the three-dot menu.
- If two or three fixes don't work, stop. Go back to the last version that worked on the published link and ask for the change again in smaller parts.
How Lovable counts credits, and what the free plan includes: Lovable credits explained.
Frequently asked questions
Why does the published link show an older version of my app?
In Lovable, the published site is a copy from the moment you published. Changes you make afterward only go live when you publish again.
If the preview works, is the app ready to share?
Not always. The preview is where you test as yourself. Before sharing, open the published link in a private window, without logging in, and on your phone, the way a visitor would.
How do I see what visitors see?
Open the published link in a private (incognito) window, without logging in. It's even better on another device, such as your phone.