coleam00/Archon · error · AppPrivateKeyError

createGitHubAppAuthProvider: slug is empty. Set GITHUB_APP_S

Error message

createGitHubAppAuthProvider: slug is empty. Set GITHUB_APP_SLUG to the App slug.

What it means

Error "createGitHubAppAuthProvider: slug is empty. Set GITHUB_APP_SLUG to the App slug." thrown in coleam00/Archon.

Source

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

  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>();
  const octokitCache = new Map<number, Octokit>();

  async function resolveInstallationId(owner: string, repo: string): Promise<number> {
    if (config.defaultInstallationId) return config.defaultInstallationId;
    const key = lookupKey(owner, repo);

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/core/src/github-auth/auth.ts:66 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/da0851e35c64b216. Report an issue: GitHub.