coleam00/Archon · error · AppPrivateKeyError

createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_

Error message

createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_ID to the numeric App ID.

What it means

Error "createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_ID to the numeric App ID." thrown in coleam00/Archon.

Source

Thrown at packages/core/src/github-auth/auth.ts:61

  if (!cachedLog) cachedLog = createLogger('github-auth');
  return cachedLog;
}

interface RepoLookup {
  installationId: number;
  cachedAt: number;
}

function lookupKey(owner: string, repo: string): string {
  return `${owner.toLowerCase()}/${repo.toLowerCase()}`;
}

export function createGitHubAppAuthProvider(config: GitHubAppConfig): IGitHubAppAuthProvider {
  // Validate config at the boundary so misconfiguration surfaces at server
  // bootstrap, not at the first webhook. loadAppPrivateKey already enforces
  // the same "fail at start" contract for the PEM.
  if (!config.appId.trim()) {
    throw new AppPrivateKeyError(
      'createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_ID to the numeric App ID.'
    );
  }
  if (!config.slug.trim()) {
    throw new AppPrivateKeyError(
      'createGitHubAppAuthProvider: slug is empty. Set GITHUB_APP_SLUG to the App slug.'
    );
  }

  // App-level Octokit (uses JWT). Used for `/repos/{owner}/{repo}/installation`
  // lookups and for issuing installation access tokens.
  const appOctokit = new Octokit({
    authStrategy: createAppAuth,
    auth: { appId: config.appId, privateKey: config.privateKey },
  });

  const tokenCache = new Map<number, CachedInstallationToken>();
  const lookupCache = new Map<string, RepoLookup>();

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/core/src/github-auth/auth.ts:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/3fd35fa23f812781. Report an issue: GitHub.