{"record":{"id":"0789b8dde244f505","repo":"BloopAI/vibe-kanban","slug":"this-host-pairing-is-outdated-re-pair-it-in-relay","errorCode":null,"errorMessage":"This host pairing is outdated. Re-pair it in Relay settings.","messagePattern":"This host pairing is outdated\\. Re-pair it in Relay settings\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/remote-web/src/shared/lib/relay/context.ts","lineNumber":32,"sourceCode":"\nconst remoteSessionIdCache = new Map<string, string>();\n\nsubscribeRelayPairingChanges(({ hostId }) => {\n  remoteSessionIdCache.delete(hostId);\n});\n\nexport async function resolveRemoteHostContext(\n  hostId: string,\n): Promise<RelayHostContext> {\n  const pairedHost = await findPairedHost(hostId);\n  if (!pairedHost) {\n    throw new Error(\n      \"This host is not paired with your browser. Pair it in Relay settings.\",\n    );\n  }\n\n  if (!pairedHost.signing_session_id) {\n    throw new Error(\n      \"This host pairing is outdated. Re-pair it in Relay settings.\",\n    );\n  }\n\n  const browserSessionId = await getRemoteSessionId(hostId);\n  return {\n    pairedHost,\n    sessionId: browserSessionId,\n  };\n}\n\nexport function invalidateRemoteSessionId(hostId: string): void {\n  remoteSessionIdCache.delete(hostId);\n}\n\nexport async function tryRefreshRelayHostSigningSession(\n  context: RelayHostContext,\n): Promise<RelayHostContext | null> {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/packages/remote-web/src/shared/lib/relay/context.ts#L14-L50","documentation":"The host is paired, but its pairing record has no signing_session_id, meaning the pairing predates the signing-session requirement or was created incompletely. The record exists but is not usable for secure relay communication, so resolveRemoteHostContext rejects it and asks for a re-pair.","triggerScenarios":"resolveRemoteHostContext(hostId) finds pairedHost but pairedHost.signing_session_id is null/undefined — typically a pairing created by an older Relay version before signing sessions were introduced, or a partially completed pairing.","commonSituations":"Upgraded Relay server/client where old pairings were not migrated; pairing interrupted mid-handshake leaving the record without a signing session; storage partially cleared or corrupted.","solutions":["Remove the host in Relay settings and re-pair it to generate a signing session.","Check whether a recent Relay version upgrade requires re-pairing (migration notes).","If many hosts show this, verify the pairing endpoint completed successfully and persist signing_session_id.","Clear the stale pairing record from storage programmatically and re-run setup."],"exampleFix":"// before\nconst ctx = await resolveRemoteHostContext(hostId); // throws on stale pairing\n// after\ntry {\n  return await resolveRemoteHostContext(hostId);\n} catch (e) {\n  if (e.message.includes('outdated')) await rePairHost(hostId);\n  return await resolveRemoteHostContext(hostId);\n}","handlingStrategy":"validation","validationCode":"const host = await findPairedHost(hostId);\nif (host && !host.signing_session_id) await rePairHost(hostId); // refresh stale pairing first","typeGuard":"function hasSigningSession(h: { signing_session_id?: string | null }): h is { signing_session_id: string } {\n  return typeof h.signing_session_id === 'string' && h.signing_session_id.length > 0;\n}","tryCatchPattern":"try {\n  return await resolveRemoteHostContext(hostId);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('outdated')) {\n    await rePairHost(hostId);\n    return await resolveRemoteHostContext(hostId);\n  }\n  throw e;\n}","preventionTips":["Re-pair hosts after upgrading Relay versions that change the pairing schema.","Treat interrupted pairing as invalid: delete and redo rather than retrying on a partial record.","Validate pairing records (including signing_session_id) at app startup and prompt re-pairing."],"tags":["relay","pairing","signing-session","migration"],"backgroundTag":"stale-host-pairing","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}