> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aicodezero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Find the message or symptom you're seeing in AI Code Zero and fix it: installing, saving projects, running it yourself, the preview, voice input and AI errors.

Look for the message or symptom you see. If nothing here helps, [find the error details](#find-the-error-details) and [report a bug](https://github.com/TechMitten/aicodezero/issues/new).

## Windows installer is blocked

**Windows blocks an AI Code Zero installer from GitHub.** Old versions offered an unsigned `.exe` on GitHub, which Windows 11's Smart App Control can block. It no longer gets updates.

1. In the old copy, open **Settings → Data** and click **Export** to back up your projects.
2. Install [AI Code Zero from the Microsoft Store](https://apps.microsoft.com/detail/9nk9ss4v2n1k). It's signed by Microsoft and the Store keeps it updated.
3. In the new copy, open **Settings → Data** and click **Import…**.

Linux doesn't use Smart App Control, so the AppImage and `.deb` aren't blocked this way.

***

## Saving and finding projects

> [accordion] My projects disappeared (browser version)
>
> The browser version saves projects in your browser, separately for each address. Check that you:
>
> * Opened the same address as before, including the port. `localhost` and `127.0.0.1` count as different addresses.
> * Used the same browser, not a private window.
>
> Clearing your browser's data for that address deletes the projects. Back up now and then with **Settings → Data → Export**.

> [accordion] "This project could not be saved: the browser's storage for AI Code Zero is full"
>
> Your browser has run out of room. Your latest change isn't saved yet.
>
> 1. Open **Settings → Data** and click **Export** to back up.
> 2. Delete apps you don't need.
> 3. Try again.
>
> The [desktop app](https://docs.aicodezero.com/quickstart-desktop.md) saves to folders on your computer and doesn't have this limit. The same fix applies to `Browser storage is full. Delete some apps or use the desktop app.` when you import a backup.

> [accordion] "… failed: … Your latest changes may not be saved to disk" (desktop app)
>
> AI Code Zero couldn't write to your projects folder.
>
> 1. Open **Settings → Data** and look at **Projects folder**.
> 2. Make sure that folder exists and you can save files in it. If it's on a removable drive, plug the drive in.
> 3. Or click **Change…** to pick another folder.
>
> On the Snap version, `EACCES: permission denied` for a path like `~/snap/aicodezero/1/.config/appblips/Projects` can mean it's using an older Snap revision's folder. Update AI Code Zero in App Center, then close and reopen it. Export unsaved work from **Settings → Data** first.

***

## Running from source or Docker

> [accordion] "Port 3000 is already in use"
>
> Another program is using port 3000. Start AI Code Zero on another port.
>
> * **From source** (macOS or Linux): `PORT=3001 npm start`. On Windows PowerShell: `$env:PORT=3001; npm start`. Then open `http://localhost:3001`.
> * **Docker:** add `AICODEZERO_PORT=3001` to a `.env` file and run `docker compose up -d` again. See [Use another port](https://docs.aicodezero.com/self-hosting/docker.md#use-another-port).
>
> A new port is a new address, so it starts with no projects. Export them from the old address first (**Settings → Data**).

> [accordion] "This address isn't allowed"
>
> AI Code Zero only answers on `localhost` and `127.0.0.1`. Open [http://localhost:3000](http://localhost:3000). To use another name, such as behind a reverse proxy, add it to `AICODEZERO_ALLOWED_HOSTS` in `.env` and restart. See the [Configuration reference](https://docs.aicodezero.com/self-hosting/configuration.md#server).

> [accordion] "Requests from other sites are not allowed."
>
> AI Code Zero thinks the request came from another website. This usually happens behind a reverse proxy. Add the exact address you open AI Code Zero at to `AICODEZERO_CHAT_ALLOWED_ORIGINS` in `.env` and restart. See the [Configuration reference](https://docs.aicodezero.com/self-hosting/configuration.md#server).

> [accordion] "Choose an AI provider and add your API key in Settings → AI."
>
> No AI provider is set up. Open **Settings → AI**, choose a provider, paste your API key, pick a model and click **Save**. See [Choose an AI provider](https://docs.aicodezero.com/ai-providers.md).

> [accordion] npm install or npm start fails
>
> Run `node --version`. AI Code Zero needs Node.js 22.12 or newer. Install the **LTS** version from [nodejs.org](https://nodejs.org/), delete the `node_modules` folder and run `npm install` again.

> [accordion] npm run desktop on Linux fails with a chrome-sandbox error
>
> Some systems, such as Ubuntu 24.04, need Electron's sandbox helper to belong to root. In the AI Code Zero folder, run:
>
> ```bash theme={null}
> sudo chown root:root node_modules/electron/dist/chrome-sandbox
> sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
> ```
>
> Then run `npm run desktop` again. Don't use `--no-sandbox`: it turns off a safety feature.

> [accordion] docker-compose fails with "No module named 'distutils'"
>
> Type `docker compose` with a space, not `docker-compose`. The hyphenated tool is old and retired. If `docker compose` is an unknown command, install the Compose plugin (on Ubuntu: `sudo apt install docker-compose-v2`).

***

## Preview problems

> [accordion] The preview is blank after a build
>
> The app's code probably has an error. AI Code Zero fixes most of these by itself. If it stays blank:
>
> 1. Send a follow-up, such as `The preview is blank. Fix any JavaScript errors`.
>
> 2. Click the camera button next to the prompt box to attach a screenshot, so the AI sees what you see.
>
> 3. Still blank? Click **Previous version** and try your prompt again with more detail.
>
> > [!TIP]
> >
> > The **Code** tab shows the code, and **Edit** lets you fix it yourself. No tab? Turn on **Code view** in **Settings → Workspace**.

> [accordion] A link in the preview doesn't go anywhere
>
> The preview keeps links inside your project. A link to another page of your website opens that page, links to other websites open in a new tab, and a link to a page that doesn't exist does nothing.
>
> Ask for the fix in the chat, for example `The "Pricing" link should open the pricing page`. In the App and Game studios, ask for screens inside the app instead of links.

***

## Voice input

> [accordion] "The voice model could not be downloaded. Check your internet connection and try again."
>
> The first time you use voice input, AI Code Zero asks to download a speech model (about 76 MB) from Hugging Face. It's saved on your device afterwards. Check your internet connection and try again. Once the model is saved, your recordings stay on your device.

> [accordion] "Microphone access is blocked"
>
> AI Code Zero needs permission to use the microphone.
>
> * **Windows:** open **Start → Settings → Privacy & security → Microphone**. Turn on **Microphone access**, **Let apps access your microphone** and the switch next to **AI Code Zero**. Then close and reopen AI Code Zero.
> * **Browser version:** click the icon to the left of the address bar, set **Microphone** to **Allow** and reload the page.

> [accordion] "No microphone was found."
>
> Plug in a microphone and set it as the default input in your system's sound settings.

> [accordion] "The microphone is in use by another app."
>
> Close the other app that's recording, such as a video call, and try again.

> [accordion] "Voice input could not understand that recording. Try again."
>
> 1. Check that the right microphone is the default input in your system's sound settings.
> 2. Speak closer to the microphone, for at least a second or two.
> 3. Click the microphone button and try again.
>
> Still failing? Close and reopen AI Code Zero, then [find the error details](#find-the-error-details).

***

## AI and build errors

> [accordion] "rejected the API key in Settings → AI"
>
> Your AI provider didn't accept your key. The message starts with the provider's name, such as `Anthropic rejected the API key in Settings → AI.`
>
> 1. Open **Settings → AI**.
> 2. Check that the key is for the provider you chose and is still active in the provider's dashboard.
> 3. Check that your key can use the model you picked, and that your account has credit.
> 4. Click **Test connection**.

> [accordion] "Couldn't reach …. Check your internet connection, then check your API key and credit"
>
> AI Code Zero couldn't get an answer from your AI provider.
>
> 1. Check that your computer is online and that no firewall, VPN, ad blocker or proxy blocks the provider.
> 2. In **Settings → AI**, click **Refresh models**. If the models load, your key works. If you see "rejected the API key", enter a new key.
> 3. Check that your provider account has credit left.
>
> In the browser version this message can also mean the provider turned the request down, because some providers (OpenAI) don't let the browser read their error replies.

> [accordion] The build hangs, or "Stream stalled: no data received for 180s"
>
> The provider stopped sending data for 3 minutes.
>
> 1. Click **Cancel** next to the prompt box and send the prompt again.
> 2. Check your provider's status page.
> 3. Choose a lower **Reasoning** level in **Settings → AI**. Higher levels take longer.

> [accordion] The app was cut off or is incomplete
>
> Every AI reply has a length limit, and the reply hit it.
>
> 1. Open **Settings → AI**. If **Output tokens: building** has a number in it, click **Use default** to go back to 64,000.
> 2. Ask for the rest, for example `Finish the parts that are missing`.
> 3. For a very large app, build in steps: the main screen first, then one feature per prompt.
> 4. Some models have a low limit of their own. Try another model.

> [accordion] "turned the request down" or a rate limit error
>
> A message such as `OpenRouter turned the request down: …` comes from your AI provider, and the text after the colon is its reason. Common causes:
>
> * **No credit left** on your provider account. Many providers report this as a rate limit.
> * **Too many requests** for your provider's limits. Wait a minute and try again.

> [accordion] "Claude declined this request"
>
> Claude's safety checks turned the request down, sometimes by mistake. Reword your prompt, or choose another model in **Settings → AI**.

***

## Find the error details

When something fails without a clear message, AI Code Zero writes details to its log. Include them when you report a problem.

> [accordion] Desktop app
>
> 1. Press `Ctrl+Alt+Shift+I` to open the developer tools.
> 2. Click the **Console** tab.
> 3. Repeat the action that failed.
> 4. Copy the yellow and red lines that start with `[AI Code Zero]`.

> [accordion] Browser version
>
> 1. Press `F12` (on a Mac, `Cmd+Option+J`).
> 2. Click the **Console** tab.
> 3. Repeat the action that failed.
> 4. Copy the yellow and red lines that start with `[AI Code Zero]`.
>
> If you run AI Code Zero yourself, AI connection messages also appear where it runs: the terminal for `npm start`, or `docker compose logs -f` for Docker. Lines starting with `[anthropic]` show each Claude request. In `[anthropic] done:` lines, `cache_read` is how many tokens came from Anthropic's prompt cache at a lower price, and `cache_write` is how many were stored for the next step.

The logs never contain your API key. They can include the start of an AI reply, so check what you copy before sharing it publicly.

For general questions, see the [FAQ](https://docs.aicodezero.com/reference/faq.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.