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

# When publishing fails

> Use the returned error code to fix a build in one pass.

export const StatusBadge = ({state = "available", children}) => {
  const labels = {
    available: "Available",
    "early-access": "Early access",
    planned: "Planned",
    internal: "Internal draft"
  };
  return <span className={`totem-status totem-status--${state}`}>
      {children || labels[state] || state}
    </span>;
};

<StatusBadge state="available" />

Start with the error code returned by `publish`. Totem reports every violation it found. Each violation includes a `code`, a path when a file caused the problem, and a plain remediation sentence.

## Complete validation code table

| Code                   | Meaning                                                                                                      | Fix                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| `NO_UPLOAD`            | No archive was uploaded for this build.                                                                      | Request a new upload URL, upload the archive, then call `publish`.                |
| `UNSAFE_PATH`          | A path is empty, absolute, contains a backslash or traversal, starts with a dot, or includes `node_modules`. | Rebuild the archive with relative, normal web paths only.                         |
| `SYMLINK`              | The archive contains a symlink, hardlink, or non-regular file.                                               | Replace links with regular files.                                                 |
| `DISALLOWED_EXTENSION` | A file extension is not on the 79-extension allowlist.                                                       | Remove or convert the file. Read `totem://allowed-extensions` for the exact list. |
| `NO_INDEX_HTML`        | `index.html` is not at the archive root.                                                                     | Archive the contents of the build directory, not its parent directory.            |
| `TOO_LARGE_COMPRESSED` | The archive is over 25 MiB compressed.                                                                       | Remove unused assets or compress them further.                                    |
| `TOO_LARGE_UNPACKED`   | Extracted files exceed 50 MiB.                                                                               | Reduce the built game size.                                                       |
| `TOO_MANY_FILES`       | The archive contains more than 2,000 files.                                                                  | Bundle small assets or remove unused files.                                       |
| `ARCHIVE_CORRUPT`      | The gzip or tar stream cannot be read.                                                                       | Create a new gzip-compressed tar archive and upload it again.                     |

For `UNSAFE_PATH`, the detail can be `empty`, `backslash`, `absolute`, `traversal`, `dotfile`, or `node_modules`.

For `DISALLOWED_EXTENSION`, a large failure response lists at most 50 offending paths and adds a summary.

## My upload link expired

Upload URLs last 900 seconds. Call `request_upload` for a fresh URL. Do not retry the expired URL.

## My game opens but stays blank

1. Open the browser console and look for a missing file or JavaScript error.
2. Confirm asset URLs are relative to the published page.
3. Match the exact letter case of every archived filename.
4. Build the production export again.
5. Archive the contents of the output folder and republish.

## My game needs its own backend

Totem does not start server files from a game archive. Keep the published game static and operate any separate network service outside the archive.

## My analytics show nothing

Confirm that you opened the current Totem game link, the requested UTC window includes the play, and the API key owns the game.

## I lost my API key

Create a replacement, update the MCP client, confirm that the five tools appear, then revoke the lost key. Totem cannot show a key again.

## A game is “not found”

Totem returns the same not-found result for a missing game and a game owned by another account. Confirm the `game_id` and API-key account. This behavior is deliberate.
