phacility/phabricator · warning · PhutilArgumentUsageException
No source exists with PHID "%s".
Error message
No source exists with PHID "%s".
What it means
Same empty-result branch of loadSource() as 937, but the selector was recognized as a PHID (a PHID-NUAN-… string), so the query filtered by PHIDs and matched nothing. The selector-type switch (id / phid / name) picks this message, giving the operator a precise hint about what kind of lookup failed.
Source
Thrown at src/applications/nuance/management/NuanceManagementWorkflow.php:53
switch ($kind) {
case 'id':
$message = pht(
'No source exists with ID "%s".',
$source);
break;
case 'phid':
$message = pht(
'No source exists with PHID "%s".',
$source);
break;
default:
$message = pht(
'No source exists with a name matching "%s".',
$source);
break;
}
throw new PhutilArgumentUsageException($message);
} else if (count($sources) > 1) {
$message = pht(
'More than one source matches "%s". Choose a narrower query, or '.
'use an ID or PHID to select a source. Matching sources: %s.',
$source,
implode(', ', mpull($sources, 'getName')));
throw new PhutilArgumentUsageException($message);
}
return head($sources);
}
protected function loadITem(PhutilArgumentParser $argv, $key) {
$item = $argv->getArg($key);
if (!strlen($item)) {
throw new PhutilArgumentUsageException(
pht(View on GitHub (pinned to 5720a38cfe)
Solutions
- Find the source's current PHID in the Nuance UI (or a list query) and rerun with the exact string.
- If the source was deleted, recreate it or pick a live one — deleted PHIDs never resolve again.
- Copy PHIDs whole; watch for line-wrapping/truncation when pasting into terminals or tickets.
- Confirm the PHID type prefix is NUAN (a different prefix means you grabbed some other object's PHID).
Example fix
# before: # bin/nuance import --source PHID-NUAN-xyz9999 # stale/deleted PHID # -> err: 'No source exists with PHID "PHID-NUAN-xyz9999".' # after: # bin/nuance import --source PHID-NUAN-4b3q2c current live source PHID
Defensive patterns
Strategy: validation
Validate before calling
if (preg_match('/^PHID-NUAN-/', $source_selector)) {
$exists = id(new NuanceSourceQuery())
->setViewer($viewer)
->withPHIDs(array($source_selector))
->execute();
if (!$exists) {
// stale or foreign PHID: resolve the current PHID before running
}
} Type guard
// PHP: narrow a selector to a Nuance source PHID before use
function is_nuance_source_phid(string $s): bool {
return (bool)preg_match('/^PHID-NUAN-[a-z0-9]{4,}$/i', $s);
} Prevention
- Confirm the PHID prefix is PHID-NUAN (NUAN = Nuance source) before pasting.
- Copy PHIDs in full; watch for terminal wrapping and truncation.
- After deleting sources, sweep runbooks and scripts for their PHIDs.
When it happens
Trigger: Running a nuance command with --source PHID-NUAN-xxxx where no nuance_source row carries that PHID: deleted source, PHID copied from another install, transcription typo in the PHID, or a PHID prefix that is not a Nuance source (the code special-cases PHID_TYPE_UNKNOWN handling earlier for junk prefixes).
Common situations: Cross-install copy-paste; sources deleted during cleanup while old runbooks keep the PHID; scripts templated with a PHID literal; truncation of the long PHID string by terminals or ticket fields.
Related errors
- No source exists with ID "%s".
- No source exists with a name matching "%s".
- Build plan "%s" does not exist.
- This source ("%s") does not expose import cursors.
- This source ("%s") does not have any import cursors.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/b86b6d4f8967fc4c.
Report an issue: GitHub.