phacility/phabricator · error · Exception

File " " does not have chunks!

Error message

File "%s" does not have chunks!

What it means

Engine-type guard in newChunkQuery: the file's instantiated storage engine is not a chunk engine, yet a chunk operation was requested. The file was stored as a single object, so it has no chunk rows to query — the caller used a chunked-upload API against a non-chunked file.

Solutions

  1. Use the non-chunked upload path for this file
  2. Verify you are passing the PHID returned by the chunked file creation endpoint
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src/applications/files/conduit/FileConduitAPIMethod.php:107 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/7bdf3381e3d935f8. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/files/conduit/FileConduitAPIMethod.php:107

  }

  protected function loadAnyMissingChunk(
    PhabricatorUser $viewer,
    PhabricatorFile $file) {

    return $this->newChunkQuery($viewer, $file)
      ->withIsComplete(false)
      ->setLimit(1)
      ->execute();
  }

  private function newChunkQuery(
    PhabricatorUser $viewer,
    PhabricatorFile $file) {

    $engine = $file->instantiateStorageEngine();
    if (!$engine->isChunkEngine()) {
      throw new Exception(
        pht(
          'File "%s" does not have chunks!',
          $file->getPHID()));
    }

    return id(new PhabricatorFileChunkQuery())
      ->setViewer($viewer)
      ->withChunkHandles(array($file->getStorageHandle()));
  }


}

View on GitHub (pinned to 5720a38cfe)