{"record":{"id":"cfc9ae6887217cda","repo":"phacility/phabricator","slug":"the-almanac-service-for-this-repository-does-not-h","errorCode":null,"errorMessage":"The Almanac service for this repository does not have the correct service type.","messagePattern":"The Almanac service for this repository does not have the correct service type\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/repository/storage/PhabricatorRepository.php","lineNumber":2550,"sourceCode":"      return null;\n    }\n\n    $service = id(new AlmanacServiceQuery())\n      ->setViewer(PhabricatorUser::getOmnipotentUser())\n      ->withPHIDs(array($service_phid))\n      ->needActiveBindings(true)\n      ->needProperties(true)\n      ->executeOne();\n    if (!$service) {\n      throw new Exception(\n        pht(\n          'The Almanac service for this repository is invalid or could not '.\n          'be loaded.'));\n    }\n\n    $service_type = $service->getServiceImplementation();\n    if (!($service_type instanceof AlmanacClusterRepositoryServiceType)) {\n      throw new Exception(\n        pht(\n          'The Almanac service for this repository does not have the correct '.\n          'service type.'));\n    }\n\n    return $service;\n  }\n\n  public function markImporting() {\n    $this->openTransaction();\n      $this->beginReadLocking();\n        $repository = $this->reload();\n        $repository->setDetail('importing', true);\n        $repository->save();\n      $this->endReadLocking();\n    $this->saveTransaction();\n\n    return $repository;","sourceCodeStart":2532,"sourceCodeEnd":2568,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/storage/PhabricatorRepository.php#L2532-L2568","documentation":"Error \"The Almanac service for this repository does not have the correct service type.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/repository/storage/PhabricatorRepository.php:2550 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":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}