--- title: Troubleshooting description: Common issues and fixes. --- Each section below is keyed to a specific error code, message, or symptom — search this page (`⌘K`) for the exact string you saw. If the issue isn't here, file it at [github.com/getfoyer/foyer/issues](https://github.com/getfoyer/foyer/issues). ## Error-code index | Symptom | Section | |---|---| | `foyer status` exits `2` | [Token rejected / missing](#foyer-status-exits-with-code-2) | | MCP `-32000` JSON-RPC error | [Trailing newline in MCP token](#mcp-server-shows--32000-json-rpc-error) | | PR has no Foyer comment | [Missing PR comment](#pr-comment-is-missing-on-a-repo-i-installed) | | "token rejected" right after `foyer login` | [Wrong API URL](#cli-says-token-rejected-right-after-foyer-login) | ## `foyer status` exits with code 2 The CLI couldn't validate your token. Re-run `foyer login` to refresh the device-code flow. If `~/.foyer/credentials` exists but is rejected, the token has likely expired or been revoked from the admin console. ## MCP server shows `-32000` JSON-RPC error The token wired into the MCP server has a trailing newline. This happens when the token is piped from a shell variable or copy-pasted. Re-install the MCP server using the `jq` pattern from the [MCP install page](/agents/mcp): ```bash --env FOYER_TOKEN="$(jq -r .token ~/.foyer/credentials)" ``` ## PR comment is missing on a repo I installed Check the [installation status](https://app.getfoyer.dev/installations) page in the Foyer app. The most common causes: - The GitHub App was installed on the org but the specific repo wasn't included in the repo allowlist. - The PR's head SHA is older than the install — Foyer only verifies SHAs created after the install completed. Push a new commit to retrigger. - The Foyer App lost its installation token. Reinstall from [api.getfoyer.dev/auth/github/install](https://api.getfoyer.dev/auth/github/install). ## CLI says "token rejected" right after `foyer login` You're probably pointed at the wrong API. The CLI defaults to Foyer's hosted API, but `FOYER_API_URL` in your shell environment will override it. Unset it and retry: ```bash echo "$FOYER_API_URL" # non-empty means an override is set unset FOYER_API_URL foyer status ``` --- [agent navigation] - prev: https://docs.getfoyer.dev/agents/signals - index: https://docs.getfoyer.dev/llms.txt - human: https://docs.getfoyer.dev/troubleshooting