phacility/phabricator · error · Exception
The Almanac service for this repository does not have the…
Error message
The Almanac service for this repository does not have the correct service type.
What it means
Service-type check in loadAlmanacService: the bound Almanac service loaded successfully, but its implementation is not an AlmanacClusterRepositoryServiceType, i.e. the repository points at a non-repository service.
Solutions
- Bind the repository to a service of the cluster-repository service type.
- Recreate or reconfigure the Almanac service with the correct type.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/repository/storage/PhabricatorRepository.php:2550 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/cfc9ae6887217cda.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/repository/storage/PhabricatorRepository.php:2550
return null;
}
$service = id(new AlmanacServiceQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs(array($service_phid))
->needActiveBindings(true)
->needProperties(true)
->executeOne();
if (!$service) {
throw new Exception(
pht(
'The Almanac service for this repository is invalid or could not '.
'be loaded.'));
}
$service_type = $service->getServiceImplementation();
if (!($service_type instanceof AlmanacClusterRepositoryServiceType)) {
throw new Exception(
pht(
'The Almanac service for this repository does not have the correct '.
'service type.'));
}
return $service;
}
public function markImporting() {
$this->openTransaction();
$this->beginReadLocking();
$repository = $this->reload();
$repository->setDetail('importing', true);
$repository->save();
$this->endReadLocking();
$this->saveTransaction();
return $repository;View on GitHub (pinned to 5720a38cfe)