{"record":{"id":"9cc9f8a8c5273e82","repo":"musistudio/claude-code-router","slug":"ccr-gateway-is-not-running-at-profilegatewayendp-9cc9f8","errorCode":null,"errorMessage":"CCR gateway is not running at ${profileGatewayEndpoint(config)}. Start CCR Desktop or run ccr start before opening ${appName}.","messagePattern":"CCR gateway is not running at (.+?)\\. Start CCR Desktop or run ccr start before opening (.+?)\\.","errorType":"exception","errorClass":"ProfileGatewayUnavailableError","httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-service.ts","lineNumber":420,"sourceCode":"): Promise<EnsureGatewayConfigRunningResult> {\n  const startIfMissing = options.startIfMissing !== false;\n  if (options.reuseExisting) {\n    const existingGateway = await probeExistingProfileGateway(config, profile, candidateConfig);\n    if (existingGateway.state === \"usable\") {\n      return { acceptedApiKey: existingGateway.apiKey, config };\n    }\n    if (existingGateway.state === \"unavailable\") {\n      if (!startIfMissing) {\n        const reason = existingGateway.reason ? `: ${existingGateway.reason}` : \"\";\n        throw new ProfileGatewayUnavailableError(`CCR gateway is not running at ${profileGatewayEndpoint(config)}${reason}. Start CCR Desktop or run ccr start before opening ${appName}.`);\n      }\n    } else {\n      throw new Error(existingGatewayConflictMessage(existingGateway, appName));\n    }\n  }\n\n  if (!startIfMissing) {\n    throw new ProfileGatewayUnavailableError(`CCR gateway is not running at ${profileGatewayEndpoint(config)}. Start CCR Desktop or run ccr start before opening ${appName}.`);\n  }\n\n  const startedStatus = await gatewayService.start(config);\n  if (startedStatus.state === \"running\") {\n    return { config };\n  }\n\n  if (options.reuseExisting && isAddressInUseError(startedStatus.lastError)) {\n    const existingGateway = await probeExistingProfileGateway(config, profile, candidateConfig);\n    if (existingGateway.state === \"usable\") {\n      return { acceptedApiKey: existingGateway.apiKey, config };\n    }\n    throw new Error(existingGatewayConflictMessage(existingGateway, appName));\n  }\n\n  throw new Error(startedStatus.lastError || `CCR gateway did not start for ${appName}.`);\n}\n","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-service.ts#L402-L438","documentation":"Error \"CCR gateway is not running at ${profileGatewayEndpoint(config)}. Start CCR Desktop or run ccr start before opening ${appName}.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-service.ts:420 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":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}