phacility/phabricator · error · Exception
Chunk end byte is , not .
Error message
Chunk end byte is %d, not %d.
What it means
Boundary guard in loadFileChunkForUpload: the matched chunk's end byte differs from the client's requested end, so the client is uploading a range whose size/extent does not match the allocated chunk. The data would not fill the chunk exactly.
Solutions
- Use the server-allocated byteEnd for the chunk upload
- Restart the chunked upload to resynchronize client and server ranges
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/files/conduit/FileConduitAPIMethod.php:68 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/d7138419eae1208e.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/files/conduit/FileConduitAPIMethod.php:68
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.'));
}
return $chunk;
}
protected function decodeBase64($data) {
$data = base64_decode($data, $strict = true);
if ($data === false) {
throw new Exception(pht('Unable to decode base64 data!'));View on GitHub (pinned to 5720a38cfe)