phacility/phabricator · error · Exception

This diff (" ") is associated with a repository (" ") which…

Error message

This diff ("%s") is associated with a repository ("%s") which could not be loaded.

What it means

Data-integrity failure in DifferentialDiff::getCircleCIGitHubRepositoryURI: the diff does carry a repository PHID, but the omnipotent PhabricatorRepositoryQuery lookup for that PHID returned no row. The referenced repository record is missing or unloadable (deleted, unreachable storage), so the staging URI needed for CircleCI cannot be resolved.

Solutions

  1. Check whether the repository still exists in Phabricator (Repositories application) and was not deleted
  2. Repair the diff's repository PHID if it is stale or points at a nonexistent object
  3. If the repository was recreated with a new PHID, re-create the diff/revision against the new repository
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/applications/differential/storage/DifferentialDiff.php:591 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/cd3e01f3bf6017d1. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/differential/storage/DifferentialDiff.php:591


  public function getCircleCIGitHubRepositoryURI() {
    $diff_phid = $this->getPHID();
    $repository_phid = $this->getRepositoryPHID();
    if (!$repository_phid) {
      throw new Exception(
        pht(
          'This diff ("%s") is not associated with a repository. A diff '.
          'must belong to a tracked repository to be built by CircleCI.',
          $diff_phid));
    }

    $repository = id(new PhabricatorRepositoryQuery())
      ->setViewer(PhabricatorUser::getOmnipotentUser())
      ->withPHIDs(array($repository_phid))
      ->executeOne();
    if (!$repository) {
      throw new Exception(
        pht(
          'This diff ("%s") is associated with a repository ("%s") which '.
          'could not be loaded.',
          $diff_phid,
          $repository_phid));
    }

    $staging_uri = $repository->getStagingURI();
    if (!$staging_uri) {
      throw new Exception(
        pht(
          'This diff ("%s") is associated with a repository ("%s") that '.
          'does not have a Staging Area configured. You must configure a '.
          'Staging Area to use CircleCI integration.',
          $diff_phid,
          $repository_phid));
    }

View on GitHub (pinned to 5720a38cfe)