# The preview does not load

> Fix a preview that stays blank, spins, freezes the browser or shows an error, in a static site or a Cloud app.
> Source: https://playcode.io/docs/help/preview-does-not-load - last reviewed 2026-10-09.
> Ask Playcode's agent: "The preview does not load. Find out why and fix it." In a Cloud app it reads the logs, restarts the app and fixes the code; it cannot see a static site's preview, so tell it what you see.

The preview is the live view of your project beside the chat. A static site's preview runs inside your browser; a Cloud app's preview comes from its development computer. Find what you see below: each case names the cause and the fix.

### A static site: "Preview couldn't start"

The app says: "The preview engine didn't come up in time. This can happen on slow connections." Choose **Try again**. If it happens again, reload the browser tab.

### A static site: "Preview unavailable"

The browser blocks something the preview needs, for example: "This browser blocks Service Workers, which Playcode Preview needs to serve project files." This happens in the built-in browsers of other apps and in some private modes. Open the project in the latest Chrome, Safari, Edge or another full browser: choose **Open in browser**, or **Copy link** and paste it there.

### A static site: the preview is blank or stuck

1. Choose **Stop** in the preview's toolbar, then **Run**. This builds the preview again.
2. If it is still stuck, reload the browser tab. This resets the preview.
3. If the preview shows an error, copy it into the chat and ask the agent to fix it. The agent cannot see a static site's preview, so describe what you see.

### A static site: the browser tab freezes when the project opens

The project's code runs a loop or a recursion that never ends, and the preview runs it as soon as the project opens. Playcode stops `for`, `while` and `do` loops after 1,500 iterations (**Loop protection**), but it cannot stop a recursion that never ends.

1. Close the frozen tab.
2. Open Playcode in a new tab, without that project. From Home, open the menu under your workspace's name and choose **Settings…**.
3. Under **You**, choose **Editor**, and turn off **Run on opening** ("Build the preview as soon as the project opens.").
4. Open the project. The code does not run on its own now. Ask the agent to find and fix the loop, then choose **Run**.
5. Turn **Run on opening** on again.

A game or an animation may need **Loop protection** off. It is in the project's **Settings**, **General**: "Break out of accidental infinite loops. Games may need it off."

### A Cloud app: "Setting up your project" or "Building your cloud computer"

A new Cloud app is still being set up: "Installing dependencies and starting the dev server. Usually takes about a minute." The preview appears by itself when the setup finishes. You can keep chatting meanwhile.

### A Cloud app: "Setup didn't finish"

The setup stopped on an error. The app says: "Something went wrong while preparing your live preview. Click "Try again" to resume - your work is safe." Choose **Try again**. If it fails again, choose **Show details**, copy the error and [get help from a person](/docs/help/get-help-from-a-person).

### A Cloud app: "Waking up your computer…"

The development computer went to sleep because nobody used it, and Playcode is waking it. The preview loads when it is awake. This takes seconds.

### A Cloud app: "Your site is being built here"

The agent is building the first version: "The preview takes over as soon as the first part is ready." While it rebuilds a page, the preview shows "Rebuilding this page - it comes back by itself." Flashes and blank moments are normal while the agent works.

### A Cloud app: the preview shows "Application is still starting" or "Failed to connect to upstream"

The app's development server is starting, or it is not running. Wait a few seconds and choose **Reload preview** in the preview's toolbar. If the message stays, ask the agent to start the app and fix what stops it: it can read the app's logs and restart it.

### A Cloud app: the preview opened in a new tab says "Your computer is asleep"

This page answers when the development computer's address is opened outside Playcode while the computer sleeps: "Open the project in Playcode to wake it up, then come back here." Choose **Open in Playcode**. The development address is for you while you build; to share the app, [publish it](/docs/publish/publish-a-website).

### A Cloud app: the preview never starts

The computers may be stopped. Playcode stops a workspace's Cloud computers 72 hours after its credits reach zero, and when the plan no longer includes Cloud apps. Add credits or renew the plan; computers stopped for credits start again once the balance is above zero. See [When a subscription ends](/docs/publish/when-a-subscription-ends). If the preview still does not start, [get help from a person](/docs/help/get-help-from-a-person).

### The whole app looks stuck

Open the menu under your workspace's name and choose **Help**, then **Clear Cache & Reload**. Your projects are kept on Playcode's servers and load again. Changes you made while offline that have not reached Playcode yet are deleted, so reconnect and wait for them to sync first.
