{"record":{"id":"f5c8155409602716","repo":"garrytan/gstack","slug":"keychain-denied","errorCode":"keychain_denied","errorMessage":"Keychain access denied. Click \"Allow\" in the macOS dialog for \"${service}\".","messagePattern":"Keychain access denied\\. Click \"Allow\" in the macOS dialog for \"(.+?)\"\\.","errorType":"exception","errorClass":"CookieImportError","httpStatus":null,"severity":"error","filePath":"browse/src/cookie-import-browser.ts","lineNumber":589,"sourceCode":"      proc.kill();\n      reject(new CookieImportError(\n        `macOS is waiting for Keychain permission. Look for a dialog asking to allow access to \"${service}\".`,\n        'keychain_timeout',\n        'retry',\n      ));\n    }, 10_000),\n  );\n\n  try {\n    const exitCode = await Promise.race([proc.exited, timeout]);\n    const stdout = await new Response(proc.stdout).text();\n    const stderr = await new Response(proc.stderr).text();\n\n    if (exitCode !== 0) {\n      // Distinguish denied vs not found vs other\n      const errText = stderr.trim().toLowerCase();\n      if (errText.includes('user canceled') || errText.includes('denied') || errText.includes('interaction not allowed')) {\n        throw new CookieImportError(\n          `Keychain access denied. Click \"Allow\" in the macOS dialog for \"${service}\".`,\n          'keychain_denied',\n          'retry',\n        );\n      }\n      if (errText.includes('could not be found') || errText.includes('not found')) {\n        throw new CookieImportError(\n          `No Keychain entry for \"${service}\". Is this a Chromium-based browser?`,\n          'keychain_not_found',\n        );\n      }\n      throw new CookieImportError(\n        `Could not read Keychain: ${stderr.trim()}`,\n        'keychain_error',\n        'retry',\n      );\n    }\n","sourceCodeStart":571,"sourceCodeEnd":607,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/cookie-import-browser.ts#L571-L607","documentation":"Error \"Keychain access denied. Click \"Allow\" in the macOS dialog for \"${service}\".\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at browse/src/cookie-import-browser.ts:589 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":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}