phacility/phabricator · error · Exception

Failed to load file object for Git LFS ref

Error message

Failed to load file object for Git LFS ref "%s"!

What it means

Data-integrity failure in DiffusionBrowseController::loadGitLFSFile: the Git LFS ref row exists, but the file object recorded on the ref (ref->getFilePHID()) cannot be loaded by PhabricatorFileQuery. The stored LFS blob for the ref's object hash is missing from file storage — typically because the file expired, was garbage-collected, or never finished uploading — so the LFS-backed content cannot be displayed.

Solutions

  1. Re-push the LFS object so the ref's file is recreated in storage
  2. Check the Files application for the file PHID on the LFS ref to confirm whether it was deleted or expired
  3. If LFS files expire too quickly, adjust the file TTL policy for LFS blobs in configuration
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/applications/diffusion/controller/DiffusionBrowseController.php:1045 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/bc8c8816f231f8a3. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/diffusion/controller/DiffusionBrowseController.php:1045

    if ($messages) {
      $corpus->setInfoView(
        id(new PHUIInfoView())
          ->setSeverity($severity)
          ->setErrors($messages));
    }

    return $corpus;
  }

  private function loadGitLFSFile(PhabricatorRepositoryGitLFSRef $ref) {
    $viewer = $this->getViewer();

    $file = id(new PhabricatorFileQuery())
      ->setViewer($viewer)
      ->withPHIDs(array($ref->getFilePHID()))
      ->executeOne();
    if (!$file) {
      throw new Exception(
        pht(
          'Failed to load file object for Git LFS ref "%s"!',
          $ref->getObjectHash()));
    }

    return $file;
  }

}

View on GitHub (pinned to 5720a38cfe)