phacility/phabricator · error · Exception

Chunk start byte is , not .

Error message

Chunk start byte is %d, not %d.

What it means

Boundary guard in loadFileChunkForUpload: the single chunk found for the range starts at a byte different from the client's requested start. The client and server disagree about where this chunk begins, so the data would land at the wrong offset.

Solutions

  1. Re-query the chunk layout and use the server-provided byteStart
  2. Restart the upload from scratch to resynchronize chunk boundaries
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

      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(
        pht(
          'Chunk start byte is %d, not %d.',
          $chunk->getByteStart(),
          $start));
    }

    if ($chunk->getByteEnd() != $end) {
      throw new Exception(
        pht(
          'Chunk end byte is %d, not %d.',
          $chunk->getByteEnd(),
          $end));
    }

    if ($chunk->getDataFilePHID()) {
      throw new Exception(
        pht('Chunk has already been uploaded.'));
    }

View on GitHub (pinned to 5720a38cfe)