# Troubleshooting

> Common problems and how to fix them.

Common problems, what causes them, and how to fix them. If you're building with an AI coding tool, give it the error or what you see:

> My Ghost app isn't working. Here's what I see: [the error or what happens]. Use <https://tryghost.github.io/Apps/troubleshooting.md> to find the cause and fix it.

## I don't see Apps in Ghost Admin

- Apps aren't turned on for your site yet. Follow [Get your site ready for apps](./getting-started.md#get-your-site-ready-for-apps).
- Only the site's Owner and Administrators see Apps.

## The install link says "404 Page not found"

Apps aren't turned on for the site. Follow [I don't see Apps in Ghost Admin](#i-dont-see-apps-in-ghost-admin), then open the link again.

## Ghost says apps aren't available on this site

When you open an app, Ghost Admin says why it's unavailable, with a way back to the list of apps. Trying again shows the same message until you fix the cause:

- **Apps need Ghost's new auth engine:** The site runs the `legacy` auth engine, where apps install and uninstall but never open. Switch the site to `better-auth` (see [Get your site ready for apps](./getting-started.md#get-your-site-ready-for-apps)). It needs MySQL: On SQLite, Ghost stays on `legacy`.
- **Apps open once Ghost restarts:** **Apps** was turned on while Ghost was running. Restart Ghost.

If the **Apps** toggle under **Settings → Labs** saves but nothing changes, Ghost's config or environment sets `apps`, which overrides the toggle. Change it there, or remove it to use the toggle, and restart Ghost.

## Ghost won't install my app

- Ghost shows what's wrong with the manifest. Check the field it names. Every manifest needs `scopes`, even if it's `[]` (see [Access](./access.md#declare-scopes)).
- The app's URL must start with `https`, unless Ghost runs in development mode on your computer.
- Your app needs its own domain, separate from your Ghost site's. Another port on your site's domain counts as the same domain. On your own computer, where Ghost runs on `localhost`, install the app from a name of its own, such as `http://my-app.localhost:8787/ghost-app.json`. Your computer sends any name ending in `.localhost` to itself.
- Ghost says the app's details aren't signed: See `APP_MANIFEST_UNSIGNED` under [Ghost can't confirm the app comes from you](#ghost-cant-confirm-the-app-comes-from-you).

## Ghost can't confirm the app comes from you

Ghost Admin says it couldn't confirm the app comes from its developer, or that the app doesn't come from the same developer as the installed one. Ghost Admin shows what was wrong under the message. For the code, look at the response to the failed request in your browser's developer tools, under Network, then find it below. [App identity](./app-identity.md) explains the keys and the challenge behind them.

`APP_IDENTITY_MISMATCH` and `APP_BACKEND_KEY_RETIRED` depend on what a particular site has installed, so an app that installs on one site can still be refused on another. Ghost Admin shows the first as "doesn't come from the same developer as the installed one".

- `APP_MANIFEST_UNSIGNED`: The app serves `ghost-app.json` as you wrote it. Serve the signed one, with the app SDK's Vite plugin listed before your other plugins (see [Signing](./manifest.md#signing)).
- `APP_MANIFEST_URL_MISMATCH`: The manifest is signed for another address than the one in the install link. Each address needs its own signed manifest. For a tunnel, restart `pnpm dev` with `GHOST_APP_TUNNEL_URL` set to the tunnel's current URL. For a deployed app, build again with `GHOST_APP_URL` set to the app's address, without `/ghost-app.json`, exactly as the install link has it, such as your custom domain rather than `workers.dev`.
- `APP_MANIFEST_SIGNATURE_INVALID`: The manifest changed after it was signed, or wasn't signed with the identity key it names. Sign it again by building, rather than editing the signed file, and check that a build service's `GHOST_APP_IDENTITY_KEY` is the whole private key.
- `APP_IDENTITY_MISMATCH`: The site installed the app with another identity key. That happens when you go from the app on your computer to the deployed one, or after creating new keys. Uninstall the app in Ghost Admin and install it again from the link. If you created new keys by mistake, put the old `.ghost-app/` back instead.
- `APP_BACKEND_KEY_RETIRED`: The manifest names a backend key that a newer manifest replaced, such as after rolling back to an older deployment, or when two people share a development identity key but not its backend key. Deploy with the current backend key. If it's lost, create a new one: A site never accepts a retired backend key again for that App ID and identity key, even after you uninstall and install the app again. Development and production keys are separate, so retiring one doesn't affect the other (see [Replacing the backend key](./app-identity.md#replacing-the-backend-key)).
- `APP_CHALLENGE_FAILED`: The app's server answered the challenge, but not with the backend key the manifest names. Give the server the matching key: With Ghost's examples on Cloudflare, run `pnpm run production:secret`, which stores the key from `.ghost-app/production/backend.json`. On your computer, remove `GHOST_APP_BACKEND_KEY` from `.dev.vars` and restart `pnpm dev`, which puts the right one back.
- `APP_CHALLENGE_UNREACHABLE`: Ghost couldn't reach `/.well-known/ghost-app/challenge` on the app's address, or got an error. Check the app is online, and that its server answers the challenge with `handleChallenge()` from `@tryghost/app-sdk/backend`. A server error usually means the backend key secret is missing. Ghost doesn't follow a redirect here, so serve it at the manifest's own address.


## My app says it needs approval

You changed something that needs your OK, such as the name, the app's URL, or a new scope. Open the app in Ghost Admin and approve the change. Only the Owner and Administrators can approve it. If you undo the change instead, the app starts working again on its own.

## My app is unavailable

Ghost couldn't load your app's manifest. Check the app is online. It opens again as soon as Ghost can reach it.

A deployed app built without `GHOST_APP_URL` has no manifest at all. Set it in `.env.production`, then build and deploy again (see [Deployment](./deployment.md#cloudflare-workers)).

## The page is blank or says it isn't in Ghost

You opened the app's URL directly, so `connect()` rejects with `not_framed`. Open the app from **Apps** in Ghost Admin instead.

## A request is refused

Check the error's `code`:

- `blocked`: Apps can't make that request, or the site didn't approve the scope it needs. If the message names a scope, add it to `scopes` in your manifest (see [Which scope a call needs](./access.md#which-scope-a-call-needs)), and approve the change in Ghost Admin. Otherwise, see [what apps can reach](./sdk.md#what-apps-can-reach).
- `invalid_path`: Give `fetch` a path like `/posts/`, with a trailing `/`, not a full address.
- `invalid_argument`: The app sent something Ghost can't take, such as a body on a `GET`. Send a body only with a write, such as `POST` or `PUT`.
- `rejected`: Ghost refused for another reason. The error's message says why.
- `network_error`: Ghost Admin couldn't reach its own API. Check the site is online, then try again.
- `unsupported`: The site's version of Ghost doesn't have that call yet. Update Ghost, or leave the feature out on older sites.

## The SDK won't connect, or stops working

Check the error's `code`:

- `not_connected`: Ghost didn't start the app in time. Call `connect()` as soon as the page loads.
- `duplicate_sdk`: The page loads the SDK more than once. Load one copy for the whole page.
- `invalid_context`: The SDK can't read what Ghost sent. Update `@tryghost/app-sdk`.
- `session_ended`: The connection to Ghost closed, usually because the page reloaded or followed a link, or the app was updated. Every call fails after that. Reload the page, and it connects again when it calls `connect()`.

## I'm signed out of my own service inside Ghost

Browsers block or partition third-party cookies, and inside Ghost your app's cookies count as third-party. See [Signing people in](./deployment.md#signing-people-in).

## Ghost says my app isn't responding

- Your app may be blocking its page from being embedded in an iframe. Some frameworks and hosts do this by default, with an `X-Frame-Options` header or `frame-ancestors 'self'`. Ghost's examples don't send it.
- The page keeps reloading or moving away on its own. Check for redirects or reload loops.

## My tunnel address changed

Quick tunnels get a new URL each time. Restart `pnpm dev` with `GHOST_APP_TUNNEL_URL` set to the new URL, so the manifest is signed for it, then install the app again from the new URL.

## My dev server refuses the tunnel

Some dev servers only answer to `localhost`, and show an error like "Blocked request. This host is not allowed." Add the tunnel's address to the server's allowed hosts. With Vite, that's `server: {allowedHosts: ['.trycloudflare.com']}` in `vite.config.js`. Ghost's examples already allow it. Vite allows names ending in `.localhost` on its own, but other dev servers may need them added too.

If the manifest's address answers with a `421` and "The dev server signs ghost-app.json only for…", the app SDK's Vite plugin doesn't know the tunnel's address. Restart `pnpm dev` with `GHOST_APP_TUNNEL_URL` set to it.
