phacility/phabricator · error · Exception
Failed to load file.
Error message
Failed to load file.
What it means
Generic lookup-miss guard in the controller's private loadFile helper: a PhabricatorFileQuery by PHID (visibility-filtered by the acting viewer) returned no row for the file PHID handed to it. Either the PHID is wrong, the file was deleted, or the viewer lacks permission to see it — the message does not distinguish these cases.
Solutions
- Verify the file PHID passed to the uploader actually exists (e.g. via file.search or the /F monogram URI)
- Check the acting viewer's view policy on the file; the query is policy-filtered so invisible files look identical to missing ones
- If the file was deleted or expired from temporary storage, re-upload the file and retry with the new PHID
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/applications/files/controller/PhabricatorFileDropUploadController.php:114 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/b3abbc46d4db290f.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/files/controller/PhabricatorFileDropUploadController.php:114
'name' => $request->getStr('name'),
'authorPHID' => $viewer->getPHID(),
'viewPolicy' => $view_policy,
'isExplicitUpload' => true,
));
$result = $file->getDragAndDropDictionary();
return id(new AphrontAjaxResponse())->setContent($result);
}
private function loadFile($file_phid) {
$viewer = $this->getViewer();
$file = id(new PhabricatorFileQuery())
->setViewer($viewer)
->withPHIDs(array($file_phid))
->executeOne();
if (!$file) {
throw new Exception(pht('Failed to load file.'));
}
return $file;
}
}
View on GitHub (pinned to 5720a38cfe)