phacility/phabricator · error · Exception

There are no file data chunks in byte range

Error message

There are no file data chunks in byte range %d - %d.

What it means

Chunk-lookup guard in loadFileChunkForUpload: the chunk query for the requested byte range returned no rows, meaning no chunk is allocated covering that range for this chunked file. The client is attempting to upload a byte range the server never reserved.

Solutions

  1. Restart the chunked upload from the beginning so the server allocates chunks
  2. Query the file's chunk layout first and upload only allocated ranges
  3. Verify the byteStart/byteEnd values match the allocated chunk boundaries
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

    return $this->newChunkQuery($viewer, $file)
      ->execute();
  }

  protected function loadFileChunkForUpload(
    PhabricatorUser $viewer,
    PhabricatorFile $file,
    $start,
    $end) {

    $start = (int)$start;
    $end = (int)$end;

    $chunks = $this->newChunkQuery($viewer, $file)
      ->withByteRange($start, $end)
      ->execute();

    if (!$chunks) {
      throw new Exception(
        pht(
          'There are no file data chunks in byte range %d - %d.',
          $start,
          $end));
    }

    if (count($chunks) !== 1) {
      phlog($chunks);
      throw new Exception(
        pht(
          'There are multiple chunks in byte range %d - %d.',
          $start,
          $end));
    }

    $chunk = head($chunks);
    if ($chunk->getByteStart() != $start) {
      throw new Exception(

View on GitHub (pinned to 5720a38cfe)