{"record":{"id":"09de497b3de7db52","repo":"phacility/phabricator","slug":"unable-to-load-cluster-service","errorCode":null,"errorMessage":"Unable to load cluster service.","messagePattern":"Unable to load cluster service\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php","lineNumber":97,"sourceCode":"  private function buildClusterStatusPanel() {\n    $repository = $this->getRepository();\n    $viewer = $this->getViewer();\n\n    $service_phid = $repository->getAlmanacServicePHID();\n    if ($service_phid) {\n      $service = id(new AlmanacServiceQuery())\n        ->setViewer($viewer)\n        ->withServiceTypes(\n          array(\n            AlmanacClusterRepositoryServiceType::SERVICETYPE,\n          ))\n        ->withPHIDs(array($service_phid))\n        ->needActiveBindings(true)\n        ->executeOne();\n      if (!$service) {\n        // TODO: Viewer may not have permission to see the service, or it may\n        // be invalid? Raise some more useful error here?\n        throw new Exception(pht('Unable to load cluster service.'));\n      }\n    } else {\n      $service = null;\n    }\n\n    Javelin::initBehavior('phabricator-tooltips');\n\n    $rows = array();\n    if ($service) {\n      $bindings = $service->getActiveBindings();\n      $bindings = mgroup($bindings, 'getDevicePHID');\n\n      // This is an unusual read which always comes from the master.\n      if (PhabricatorEnv::isReadOnly()) {\n        $versions = array();\n      } else {\n        $versions = PhabricatorRepositoryWorkingCopyVersion::loadVersions(\n          $repository->getPHID());","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php#L79-L115","documentation":"A lookup-failure guard in buildClusterStatusPanel: the AlmanacServiceQuery for the repository's allocated cluster service PHID returned no row. Per the adjacent TODO, this typically means the viewing user lacks permission to see the Almanac service, though the service could also have been deleted; the panel cannot render cluster status without it.","triggerScenarios":"Thrown at src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Grant the viewer permission to view the Almanac cluster service","Verify the Almanac service still exists and has not been deleted","Have an administrator check the repository's allocated service PHID"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}