phacility/phabricator · error · PhabricatorWorkerPermanentFailureException
No "%s" in task data.
Error message
No "%s" in task data.
What it means
FileDeletionWorker (the PhabricatorWorker that actually removes file data from storage engines) requires 'objectPHID' in its task data; idx($this->getTaskData(), 'objectPHID') came back empty. It throws PhabricatorWorkerPermanentFailureException, which tells the queue the task can never succeed, so it is discarded rather than retried — the producer of the task passed malformed data.
Source
Thrown at src/applications/files/worker/FileDeletionWorker.php:8
<?php
final class FileDeletionWorker extends PhabricatorWorker {
private function loadFile() {
$phid = idx($this->getTaskData(), 'objectPHID');
if (!$phid) {
throw new PhabricatorWorkerPermanentFailureException(
pht('No "%s" in task data.', 'objectPHID'));
}
$file = id(new PhabricatorFileQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs(array($phid))
->executeOne();
if (!$file) {
throw new PhabricatorWorkerPermanentFailureException(
pht('File "%s" does not exist.', $phid));
}
return $file;
}
protected function doWork() {
$file = $this->loadFile();View on GitHub (pinned to 5720a38cfe)
Solutions
- Queue the task with the required key: PhabricatorWorker::scheduleTask('FileDeletionWorker', array('objectPHID' => $file->getPHID()));
- Prefer calling $file->delete() (or PhabricatorFileQuery + delete) and let it build correct task data for you.
- Audit custom producers for the exact 'objectPHID' key; note tasks already failed permanently will not retry — re-queue them after fixing.
Example fix
// before
PhabricatorWorker::scheduleTask(
'FileDeletionWorker',
array('filePHID' => $file->getPHID()), // wrong key
);
// after
PhabricatorWorker::scheduleTask(
'FileDeletionWorker',
array('objectPHID' => $file->getPHID()),
); Defensive patterns
Strategy: validation
Validate before calling
$data = array('objectPHID' => $file->getPHID());
if (idx($data, 'objectPHID') === null) {
throw new Exception('Refusing to queue FileDeletionWorker without objectPHID.');
}
PhabricatorWorker::scheduleTask('FileDeletionWorker', $data); Type guard
function isValidDeletionTaskData(array $data): bool {
return idx($data, 'objectPHID') !== null;
} Prevention
- Prefer $file->delete() over scheduling FileDeletionWorker by hand — it builds correct task data.
- When scheduling workers directly, assert required task-data keys before scheduleTask().
- Remember PhabricatorWorkerPermanentFailureException means no retry: fix the producer, then re-queue.
When it happens
Trigger: Queueing FileDeletionWorker with task data missing the key: PhabricatorWorker::scheduleTask('FileDeletionWorker', array(), ...) or with a typo'd key like 'filePHID'/'phid'; also code paths that build task data dynamically and silently drop the key.
Common situations: Custom scripts that schedule deletion workers directly instead of using PhabricatorFile::delete() (which sets objectPHID correctly); refactors renaming the task-data key; serialization bugs that empty the array.
Related errors
- Expected task data to be a dictionary.
- Task data has no "commitPHID".
- Commit "%s" does not exist.
- Commit "%s" (with PHID "%s") is no longer reachable from any
- Failed to reload commit "%s".
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/a750d2cdda30bff6.
Report an issue: GitHub.