phacility/phabricator · error · Exception

Unable to load cluster service.

Error message

Unable to load cluster service.

What it means

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.

Solutions

  1. Grant the viewer permission to view the Almanac cluster service
  2. Verify the Almanac service still exists and has not been deleted
  3. Have an administrator check the repository's allocated service PHID
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php:97 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/09de497b3de7db52. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php:97

  private function buildClusterStatusPanel() {
    $repository = $this->getRepository();
    $viewer = $this->getViewer();

    $service_phid = $repository->getAlmanacServicePHID();
    if ($service_phid) {
      $service = id(new AlmanacServiceQuery())
        ->setViewer($viewer)
        ->withServiceTypes(
          array(
            AlmanacClusterRepositoryServiceType::SERVICETYPE,
          ))
        ->withPHIDs(array($service_phid))
        ->needActiveBindings(true)
        ->executeOne();
      if (!$service) {
        // TODO: Viewer may not have permission to see the service, or it may
        // be invalid? Raise some more useful error here?
        throw new Exception(pht('Unable to load cluster service.'));
      }
    } else {
      $service = null;
    }

    Javelin::initBehavior('phabricator-tooltips');

    $rows = array();
    if ($service) {
      $bindings = $service->getActiveBindings();
      $bindings = mgroup($bindings, 'getDevicePHID');

      // This is an unusual read which always comes from the master.
      if (PhabricatorEnv::isReadOnly()) {
        $versions = array();
      } else {
        $versions = PhabricatorRepositoryWorkingCopyVersion::loadVersions(
          $repository->getPHID());

View on GitHub (pinned to 5720a38cfe)