phacility/phabricator · warning · PhutilArgumentUsageException
Some specified messages do not exist: %s
Error message
Some specified messages do not exist: %s
What it means
show-outbound loaded `id IN (...)` against PhabricatorMetaMTAMail (the sent-mail table) and at least one requested ID has no row; the missing IDs are enumerated. The ID passed validation, so this is purely a data-availability mismatch.
Source
Thrown at src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php:57
foreach ($ids as $id) {
if (!ctype_digit($id)) {
throw new PhutilArgumentUsageException(
pht(
'Argument "%s" is not a valid message ID.',
$id));
}
}
$messages = id(new PhabricatorMetaMTAMail())->loadAllWhere(
'id IN (%Ld)',
$ids);
if ($ids) {
$ids = array_fuse($ids);
$missing = array_diff_key($ids, $messages);
if ($missing) {
throw new PhutilArgumentUsageException(
pht(
'Some specified messages do not exist: %s',
implode(', ', array_keys($missing))));
}
}
$last_key = last_key($messages);
foreach ($messages as $message_key => $message) {
if ($args->getArg('dump-html')) {
$html_body = $message->getHTMLBody();
if (strlen($html_body)) {
$template =
"<!doctype html><html><body>{$html_body}</body></html>";
$console->writeOut("%s\n", $html_body);
} else {
$console->writeErr(
"%s\n",
pht('(This message has no HTML body.)'));View on GitHub (pinned to 5720a38cfe)
Solutions
- Confirm the ID belongs to sent (outbound) mail; use show-inbound for received mail.
- Copy a valid ID from the web UI's outbound mail list.
- Verify database/environment selection if the ID should exist.
Example fix
// before $ bin/mail show-outbound --id 123 // Exception: Some specified messages do not exist: 123 // after (123 was a received mail) $ bin/mail show-inbound --id 123
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the rows exist in the outbound table before invoking:
$messages = id(new PhabricatorMetaMTAMail())->loadAllWhere('id IN (%Ld)', $ids);
$missing = array_diff($ids, mpull($messages, 'getID'));
if ($missing) {
fwrite(STDERR, 'No such outbound mail: '.implode(', ', $missing)."\n");
exit(1);
} Prevention
- Do not reuse IDs between show-inbound and show-outbound.
- Pre-check existence in wrapper scripts.
- Confirm the environment/database when an ID should exist.
When it happens
Trigger: Passing a received-mail ID to show-outbound; the outbound mail was deleted or the table pruned; wrong environment/database; plain typo.
Common situations: Mixing up inbound and outbound ID spaces; IDs copied from stale logs or another install; archived databases.
Related errors
- Some specified messages do not exist: %s
- Message type "%s" is unknown, supported message types are: %
- No such user '%s' exists.
- Specify one or more users to send a message to with "--to" a
- No configured mailers support outbound messages of type "%s"
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/be144d28c743b640.
Report an issue: GitHub.