{"record":{"id":"1b03b8ec3b7f42b0","repo":"diegosouzapw/OmniRoute","slug":"no-active-clerk-session-found-your-client-cook","errorCode":null,"errorMessage":"No active Clerk session found — your __client cookie may be expired or invalid","messagePattern":"No active Clerk session found — your __client cookie may be expired or invalid","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/adapta-web.ts","lineNumber":112,"sourceCode":"): Promise<string> {\n  const resp = await fetch(`${ADAPTA_CLERK_URL}/v1/client`, {\n    headers: {\n      Cookie: `__client=${clientJwt}`,\n      \"User-Agent\": USER_AGENT,\n      Origin: ADAPTA_APP_URL,\n    },\n    signal: signal ?? undefined,\n  });\n\n  if (!resp.ok) {\n    throw new Error(`Clerk /v1/client returned HTTP ${resp.status} — check your __client cookie`);\n  }\n\n  const body = await resp.json();\n  const sessions: Array<{ id: string; status: string }> = body?.response?.sessions ?? [];\n  const active = sessions.find((s) => s.status === \"active\");\n  if (!active?.id) {\n    throw new Error(\n      \"No active Clerk session found — your __client cookie may be expired or invalid\"\n    );\n  }\n\n  log?.info?.(\"ADAPTA-WEB\", `Got session ID: ${active.id}`);\n  return active.id;\n}\n\n/** Step 2: POST /v1/client/sessions/{id}/tokens → fresh short-lived JWT. */\nasync function refreshSessionJwt(\n  clientJwt: string,\n  sessionId: string,\n  signal?: AbortSignal | null,\n  log?: ExecuteInput[\"log\"]\n): Promise<string> {\n  const resp = await fetch(`${ADAPTA_CLERK_URL}/v1/client/sessions/${sessionId}/tokens`, {\n    method: \"POST\",\n    headers: {","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/adapta-web.ts#L94-L130","documentation":"Clerk /v1/client responded 2xx but the sessions array contains no entry with status 'active'. The __client cookie authenticates but its session is suspended/ended, meaning the account side has no usable session — the credential must be refreshed by signing in again.","triggerScenarios":"Thrown at open-sse/executors/adapta-web.ts:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sign in to Adapta in a browser to reactivate the session, then update the connection's __client cookie","If the account was logged out everywhere, create a new session and re-configure the connection credential"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}