{"record":{"id":"7bdf3381e3d935f8","repo":"phacility/phabricator","slug":"file-s-does-not-have-chunks","errorCode":null,"errorMessage":"File \"%s\" does not have chunks!","messagePattern":"File \"(.+?)\" does not have chunks!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/files/conduit/FileConduitAPIMethod.php","lineNumber":107,"sourceCode":"  }\n\n  protected function loadAnyMissingChunk(\n    PhabricatorUser $viewer,\n    PhabricatorFile $file) {\n\n    return $this->newChunkQuery($viewer, $file)\n      ->withIsComplete(false)\n      ->setLimit(1)\n      ->execute();\n  }\n\n  private function newChunkQuery(\n    PhabricatorUser $viewer,\n    PhabricatorFile $file) {\n\n    $engine = $file->instantiateStorageEngine();\n    if (!$engine->isChunkEngine()) {\n      throw new Exception(\n        pht(\n          'File \"%s\" does not have chunks!',\n          $file->getPHID()));\n    }\n\n    return id(new PhabricatorFileChunkQuery())\n      ->setViewer($viewer)\n      ->withChunkHandles(array($file->getStorageHandle()));\n  }\n\n\n}\n","sourceCodeStart":89,"sourceCodeEnd":120,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/conduit/FileConduitAPIMethod.php#L89-L120","documentation":"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.","triggerScenarios":"Thrown at src/applications/files/conduit/FileConduitAPIMethod.php:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the non-chunked upload path for this file","Verify you are passing the PHID returned by the chunked file creation endpoint"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}