# Troubleshooting common errors

Fixes for the errors you're most likely to hit running `bunx percher publish`. Error names match what the CLI and dashboard show, so you can search them verbatim. `percher doctor` diagnoses most of these and prints the next action.

Configuration:
- **name already taken**: app names are global (they become `name.percher.run`); pick a unique `app.name`.
- **unknown runtime**: `runtime` must be node | bun | python | static | docker.
- **port out of range**: `web.port` must be 1024–65535 (containers don't run as root).
- **repo size exceeded**: tarball over 500 MB, usually node_modules/.next/dist/.git. Check with `bunx percher publish --dry-run`; the CLI honors .gitignore and .percherignore plus a default exclude list (node_modules, .git, dist, .next, .svelte-kit, build, coverage, .env*, .bun, *.log, .DS_Store). Add a path to .percherignore to drop it from the upload only; re-include one with `!` (for example `!/dist`). .env files can never be re-included.
- **Git encoding conversion failed**: Percher does not support Git `working-tree-encoding` values `SHIFT_JISX0213` (including `ShiftJISX0213`) or `EUC-JISX0213` during source import or deploy snapshots. If Git reports an unsupported encoding, review the affected files and `.gitattributes` in your own repository. Convert the files to UTF-8 locally, update the matching attribute, verify your app, then commit and retry. Do not merely relabel unchanged bytes. Percher does not rewrite these files for you. Ordinary `SHIFT_JIS` remains supported.

Build and startup:
- **build failed**: build command exited non-zero. See the log with `bunx percher logs --build`. Common causes: missing dev dependency, prod-only TS error, undeclared build env.
- **health check failed**: Percher gives the container 30 seconds to report healthy (after a 5-second grace period), probing whatever you set as `[web].health` — or `/` if you never set it. If your app needs longer to boot (migrations, a model load, a cold cache), raise the window with a `[checks.health]` block — `path` is required, then `initial_delay = 20` (seconds before failures count, max 120) and `timeout = 90` (seconds to become healthy, max 300). Otherwise open that health path in a browser: if it returns 200, the probe hit a transient error and the old version is still live — re-deploy on a current CLI. If it's also down, verify the app listens on `[web].port` and the endpoint returns 200.
- **missing API key**: set the runtime env var (use `--from-file`/`--from-stdin`/interactive for secrets), then re-publish.

Publication security:
- **SECURITY_GATE_BLOCKED**: the image has a reported critical or known-exploited vulnerability. Review the findings, update affected app dependencies or wait for the indicated Percher platform fix before publishing again.
- **SECURITY_SCAN_UNAVAILABLE**: verification could not complete with current, saved evidence. Retry when verification is available; this does not establish whether the image is safe. See [security scanning](https://percher.app/docs/security-scanning).

Rate limits and quotas:
- **DAILY_QUOTA_EXCEEDED (429)**: per-day cap (Free 50 live + 25 preview, Starter 100/50, Maker 200/100, Max 1000/500), resets 00:00 UTC (`resetAt` in the response). Live and preview counters are independent, so `--preview` still works.
- **DEPLOY_RATE_LIMITED (429)**: per-app 60s burst limit; retryable after `retryAfterSec`.
- **RETRY_LIMIT_REACHED**: transient infra retries exhausted; try again in a few minutes or open a dashboard support case at https://percher.app/support/new.
- **already_in_progress**: not an error — a deploy for this app is already running, so Percher returns HTTP 200 with that deploy's `deployId` instead of queueing a duplicate. Wait for it. Deploys can't be cancelled once queued.
- **DEPLOY_RATE_LIMIT (429)**: note the missing "ED" — this is the per-hour cap, not the per-minute burst above. Free 12/hour, Starter 30, Maker 60, Max 120.

Env contract (catches missing env at upload time): declare `[env].required`/`optional`/`ignore`. **REQUIRED_ENV_MISSING** = a required key isn't set (set it, re-publish). **ENV_KEY_UNDECLARED** = source references a key not in any list (add it to one).

Performance and freshness:
- **Slow first paint (7+ s)**: almost always third-party fonts (fonts.googleapis.com) hanging the first paint; the request goes browser to Google, not through Percher, so self-host fonts (next/font, @fontsource, or @font-face). A stale service worker can cache the slow state; hard-reload twice.
- **Changes aren't showing**: the build cache hit (keyed on a content hash of toml + package.json + lockfile + Dockerfile + build env + every source file). Force a fresh build with `bunx percher publish --no-cache`. If still stale, run publish from the project root and check .gitignore isn't excluding the changed files.

Per-framework `percher.toml` and known gotchas: https://percher.app/deploy

Still stuck? Put the deploy id and build log in a dashboard support case: https://percher.app/support/new. During the beta, please share App Data (logs, files, database content, diagnostics) for ordinary support through a dashboard support case; describe it or attach screenshots there. General questions may be emailed to support@percher.app; the abuse@, security@ and legal@ reporting channels are unchanged.

Full guide: https://percher.app/docs/troubleshooting
