phacility/phabricator · warning · PhutilArgumentUsageException
Some specified messages do not exist: %s
Error message
Some specified messages do not exist: %s
What it means
show-inbound loaded `id IN (...)` against PhabricatorMetaMTAReceivedMail and got back fewer rows than IDs requested; the missing IDs are listed in the exception. Every ID must correspond to an existing received-mail row in the database this install points at.
Source
Thrown at src/applications/metamta/management/PhabricatorMailManagementShowInboundWorkflow.php:42
$console = PhutilConsole::getConsole();
$ids = $args->getArg('id');
if (!$ids) {
throw new PhutilArgumentUsageException(
pht(
"Use the '%s' flag to specify one or more messages to show.",
'--id'));
}
$messages = id(new PhabricatorMetaMTAReceivedMail())->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) {
$info = array();
$info[] = pht('PROPERTIES');
$info[] = pht('ID: %d', $message->getID());
$info[] = pht('Status: %s', $message->getStatus());
$info[] = pht('Related PHID: %s', $message->getRelatedPHID());
$info[] = pht('Author PHID: %s', $message->getAuthorPHID());
$info[] = pht('Message ID Hash: %s', $message->getMessageIDHash());
if ($message->getMessage()) {View on GitHub (pinned to 5720a38cfe)
Solutions
- Confirm the ID is an inbound (received) mail ID; use `bin/mail show-outbound` for sent mail.
- Browse the received-mail list in the web UI to copy a valid ID.
- Verify the install points at the intended database and the message still exists.
Example fix
// before $ bin/mail show-inbound --id 987 // Exception: Some specified messages do not exist: 987 // after (987 was an outbound mail) $ bin/mail show-outbound --id 987
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the rows exist before invoking show-inbound:
$messages = id(new PhabricatorMetaMTAReceivedMail())->loadAllWhere('id IN (%Ld)', $ids);
$missing = array_diff($ids, mpull($messages, 'getID'));
if ($missing) {
fwrite(STDERR, 'No such received mail: '.implode(', ', $missing)."\n");
exit(1);
} Prevention
- Keep inbound and outbound ID spaces separate in notes and scripts.
- Pre-check existence with a loadAllWhere query in wrappers.
- Copy IDs from the web UI rather than old logs.
When it happens
Trigger: Passing an outbound mail's ID (PhabricatorMetaMTAMail table) to show-inbound; IDs from old logs after the received-mail table was pruned; querying a different environment's database than the one the mail arrived in; simple typo in the number.
Common situations: Confusing inbound vs outbound IDs; stale daemon logs; database switched by configuration or environment variables.
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/b5ebb09a9f3704cf.
Report an issue: GitHub.