Errors & Troubleshooting
When an AI-built app breaks, the cause is usually at a join: a setting, a key, a permission rule or a deploy step, not the app's own logic. Find which one first, then fix it.
Quick answer
Most problems on an AI-built app fall into a few kinds: a problem between your app and another service (the status code tells you which), the browser blocking a direct call to another site (a CORS error), a setting that exists in preview but not on the live host (the blank screen after deploying), a payment or webhook message that fails its signature check, or a site that works but doesn't show on Google. Name which kind you have before you ask your AI to fix it. If you don't know yet, start with why an AI-built app isn't working. If the problem is the conversation itself, the AI going in circles or forgetting what you said, that's covered in Prompting instead.
Start with the first guide if you don't know what's wrong yet. The other four each cover one failure you can name from its symptom. Five guides; see below for what each covers.
Guides in this hub
Why Is My AI-Built App Not Working?
Start here if you don't yet know what's wrong: a symptom-to-cause table, what error codes like 401, 403 and 500 mean, and a prompt for your AI.
Blank Screen After Deploying
It works in preview and shows a blank page once it's live: the four settings behind it on any host, and which to check first.
AI Website Not Showing on Google
Why "AI-built sites are invisible to Google" is only half true, five checks that show what Google sees on your site, and a prompt for your AI.
CORS Error Calling an API
Why the browser is blocking it on purpose, and the real fix: route it through a backend function that answers the browser's preflight request.
Webhook Signature Verification Failed
The seven causes to check when a signature check fails, on any payment gateway or service, and the prompt that gets your AI to find yours.
How to debug an AI-built app without making it worse
Get the exact error, work out which kind of problem it is, then change one thing at a time. Asking your AI to "fix it" without the error makes it guess, and a guess at a settings problem usually rewrites code that was working. Your job is to give it the evidence; its job is to explain the cause before it changes anything.
- Copy the exact error. Word for word, from the screen, the browser's console or your host's log. A description ("it doesn't load") gives the AI nothing to work with.
- Note what changed. A new feature, a new key, a deploy, a setting you changed. Most breaks follow a change.
- Name the kind of problem. Use the table below. It decides where the fix lives: in the code, in a setting, or with another service.
- Ask for the cause before the fix. The prompt further down does this for you.
- Change one thing, then test. Save a restore point first (Git, or your builder's version history), so a wrong fix can be undone.
Which kind of problem is it?
Start from what you can see. Each row points to the guide that explains the cause and the fix.
| What you see | What it usually means | Start with |
|---|---|---|
| Blank page, live site only | A setting the preview had and the live host doesn't: an environment variable, the output folder, the base path or a redirect rule. | Blank screen after deploying |
| CORS error in the console | "Blocked by CORS policy" in the browser console: your page is calling another site directly, and the browser is refusing on purpose. | CORS error calling an API |
| A 401 or 403 error | A key or login is missing or wrong (401), or it's valid but not allowed to do this (403). | Why is my AI-built app not working? |
| Empty list, no error | Often a permission rule in the database hiding the rows: the rule is doing what it was set up to do. | Why is my AI-built app not working? |
| A 500, 502 or 503 error | Something failed on the server: your own backend function, or the service it called. | Why is my AI-built app not working? |
| "Signature invalid" | A payment or webhook message failed its check: the message your app received doesn't match the one the service signed, or the wrong secret is being used. | Webhook signature verification failed |
| Works, but not on Google | A visibility question, not a broken feature: what a crawler sees, and whether the page has been found yet. | AI website not showing on Google |
| Fix-break-fix loop | The AI fixes one thing and breaks another, again and again. The conversation has gone in circles; the app may be fine. | Breaking a vibe-code loop |
Why AI-built apps break at the joins
AI coding agents are good at writing an app's own logic. Most of what breaks later sits where that logic meets something else: a service your app calls, a database with permission rules, a host with its own settings, or a search engine reading the result. Each of those has settings that live outside the code the AI wrote, and the AI can't see them unless you show it. That's why "the code looks fine" and "it doesn't work" are so often both true at once.
It's also why re-prompting in different words rarely helps with this kind of fault. If a key is missing on your live host, no change to the code will put it there. The fix is to find which join failed and check that setting, then change the code only if the setting turns out to be right.
When the problem is the conversation, not the app
Some failures feel like bugs but aren't. If your AI fixes one thing, breaks another, then brings the first bug back, or starts forgetting what you told it earlier, the app may be fine and the conversation is the problem. Breaking a vibe-code loop and knowing when to start a new chat cover the way out, and describing a bug to your AI covers how to write the report in the first place.
What your AI can't do for you
- It can't see your host, your services or your logs unless you paste what's there. If the fix depends on a setting outside the chat, you'll be the one who checks it.
- It can't fix another service being down. A 502 or 503 from a service you call can be their problem, not yours. Check the service's status page before you change anything.
- It doesn't know that its answer worked. It will often say "this should fix it". Only a test on the same page, in the same place the error happened (preview or live), tells you it did.
- A fix written for someone else's setup may not fit yours. Advice from a forum post was written for a different project, tool or host. Give your AI your error and your setup, not someone else's fix.
A prompt to start any debugging session
Fill in the brackets and paste it into your AI coding agent's chat. It asks for the cause first, so nothing changes until you both agree what's wrong.
I'm not a coder. Something in my app is broken.
What I did: [the steps, e.g. "clicked Pay on the
checkout page"]
What I expected: [what should have happened]
What happened instead: [what you saw]
The exact error: [paste it word for word, from the
screen, the browser console or the host's log]
Where it happens: [preview only / live site only /
both]
What changed since it last worked: [anything you
remember, or "not sure"]
Don't change any code yet. First:
1. Tell me which kind of problem you think this is:
a setting or key, a permission rule, a deploy
setting, a problem with another service, or the
app's own logic.
2. Tell me why, based on the error.
3. Tell me what you'd check first to confirm it, and
anything I need to look at myself that you can't
see (a host setting, a service's dashboard, a log).
Only once we agree on the cause, suggest one change.What to check in the AI's answer
- The kind of problem matches your error. A 401 blamed on a layout bug, or a blank live site blamed on code that works in preview, is worth questioning.
- It names something you can check. A specific setting, file, key name or log, not "there may be a configuration issue".
- It asks you for what it can't see. If the cause could be on your host or with another service, it should say so and tell you what to look at.
- It proposes one change. A plan that rewrites several files at once to fix one error is a sign it's guessing. Ask it to narrow down first.
Not affiliated with the platforms we write about
AI Build South Africa is an independent resource. We're not endorsed by, or an official partner of, Google or any other platform or service named in these guides. We do participate in affiliate and referral programmes with some providers, including Hostinger and Base44. See our Disclaimer for the full disclosure and our Terms of Service for the wider terms.
Frequently asked questions
Why does my vibe-coded app keep breaking?
Usually because the fault sits where the app meets something else: a key or setting on the live host, a database permission rule, another service, or a deploy setting. The AI can't see those unless you show it, so re-prompting the same request in different words tends to move the problem around instead of fixing it.
How do I debug a vibe-coded app?
Copy the exact error, note what changed since it last worked, and decide which kind of problem it is: a setting, a permission rule, a deploy setting, another service, or the app's own logic. Then ask your AI to explain the cause before it changes anything, and test one change at a time.
Why does my site work in preview but not once it's deployed?
Because the preview supplies things the live host doesn't get automatically: environment variables, the right output folder, the right base path and a redirect rule for pages that load inside the app. Check those four settings on your host before looking for a bug in the code. Our guide to a blank screen after deploying walks through each one.
Why is my website not showing up on Google?
Usually one of three things: Google hasn't found the page yet, the page tells search engines not to index it, or the content only appears after scripts run and the crawler didn't see it. It's a visibility question, not a broken feature. Our guide to an AI-built website not showing on Google shows how to check which.
Is the bug in the code my AI wrote?
Sometimes, but check the settings first. Many errors in AI-built apps come from a missing key, a permission rule, a deploy setting or another service, not from the app's logic. Asking the AI to name which kind of problem it is, before it changes any code, stops it rewriting code that was working.
Related reading
- Prompting: when the AI conversation is the problem, from describing a bug to breaking a fix-break-fix loop.
- Payment & API Integrations: connecting your app to payments, email and other services safely, so fewer of these errors happen.
- Deploy & Hosting: your own domain, POPIA and a checklist before launch.