{"record":{"id":"3fd35fa23f812781","repo":"coleam00/Archon","slug":"creategithubappauthprovider-appid-is-empty-set-g","errorCode":null,"errorMessage":"createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_ID to the numeric App ID.","messagePattern":"createGitHubAppAuthProvider: appId is empty\\. Set GITHUB_APP_ID to the numeric App ID\\.","errorType":"exception","errorClass":"AppPrivateKeyError","httpStatus":null,"severity":"error","filePath":"packages/core/src/github-auth/auth.ts","lineNumber":61,"sourceCode":"  if (!cachedLog) cachedLog = createLogger('github-auth');\n  return cachedLog;\n}\n\ninterface RepoLookup {\n  installationId: number;\n  cachedAt: number;\n}\n\nfunction lookupKey(owner: string, repo: string): string {\n  return `${owner.toLowerCase()}/${repo.toLowerCase()}`;\n}\n\nexport function createGitHubAppAuthProvider(config: GitHubAppConfig): IGitHubAppAuthProvider {\n  // Validate config at the boundary so misconfiguration surfaces at server\n  // bootstrap, not at the first webhook. loadAppPrivateKey already enforces\n  // the same \"fail at start\" contract for the PEM.\n  if (!config.appId.trim()) {\n    throw new AppPrivateKeyError(\n      'createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_ID to the numeric App ID.'\n    );\n  }\n  if (!config.slug.trim()) {\n    throw new AppPrivateKeyError(\n      'createGitHubAppAuthProvider: slug is empty. Set GITHUB_APP_SLUG to the App slug.'\n    );\n  }\n\n  // App-level Octokit (uses JWT). Used for `/repos/{owner}/{repo}/installation`\n  // lookups and for issuing installation access tokens.\n  const appOctokit = new Octokit({\n    authStrategy: createAppAuth,\n    auth: { appId: config.appId, privateKey: config.privateKey },\n  });\n\n  const tokenCache = new Map<number, CachedInstallationToken>();\n  const lookupCache = new Map<string, RepoLookup>();","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/github-auth/auth.ts#L43-L79","documentation":"Error \"createGitHubAppAuthProvider: appId is empty. Set GITHUB_APP_ID to the numeric App ID.\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/core/src/github-auth/auth.ts:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}