Foyer Docs

Troubleshooting

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.

Error-code index

SymptomSection
foyer status exits 2Token rejected / missing
MCP -32000 JSON-RPC errorTrailing newline in MCP token
PR has no Foyer commentMissing PR comment
"token rejected" right after foyer loginWrong API URL

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:

--env FOYER_TOKEN="$(jq -r .token ~/.foyer/credentials)"

PR comment is missing on a repo I installed

Check the installation status 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.

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:

echo "$FOYER_API_URL"   # non-empty means an override is set
unset FOYER_API_URL
foyer status