{"record":{"id":"8634037043b98488","repo":"NousResearch/hermes-agent","slug":"started-error-oauth-failed-to-start","errorCode":null,"errorMessage":"started.error || 'OAuth failed to start'","messagePattern":"started\\.error \\|\\| 'OAuth failed to start'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/mcp-dashboard-oauth.ts","lineNumber":50,"sourceCode":"  }\n}\n\nconst defaultSleep = (milliseconds: number) => new Promise<void>(resolve => window.setTimeout(resolve, milliseconds))\n\nexport async function completeMcpDesktopOAuth({\n  serverName,\n  start,\n  status,\n  openExternal,\n  cancelled,\n  cancel,\n  sleep = defaultSleep,\n  maxPollFailures = 3\n}: CompleteOptions): Promise<McpOAuthFlow> {\n  const started = await start(serverName)\n\n  if (started.status === 'error') {\n    throw new Error(started.error || 'OAuth failed to start')\n  }\n\n  if (!started.authorization_url) {\n    throw new Error('OAuth server did not provide an authorization URL')\n  }\n\n  await openExternal(started.authorization_url)\n\n  let pollFailures = 0\n\n  for (;;) {\n    if (cancelled?.()) {\n      // Free the backend slot before rejecting; best-effort — the flow also\n      // dies on its own timeout if this request is lost.\n      await cancel?.(started.flow_id).catch(() => {})\n      throw new McpOAuthCancelled()\n    }\n","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/lib/mcp-dashboard-oauth.ts#L32-L68","documentation":"Error \"started.error || 'OAuth failed to start'\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/lib/mcp-dashboard-oauth.ts:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry starting the OAuth flow; the gateway reported a startup error.","Check the OAuth provider configuration (client id, redirect URL) on the gateway.","Review gateway logs for the underlying OAuth start failure."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}