phacility/phabricator · error · PhutilArgumentUsageException

Specify a daemon unambiguously. Multiple daemons match

Error message

Specify a daemon unambiguously. Multiple daemons match '%s': %s.

What it means

Ambiguity guard in findDaemonClass(): the shorthand substring matched more than one daemon class with no exact case-insensitive match, so the intended daemon cannot be determined. The message lists the matching classes.

Solutions

  1. Use the full, exact daemon class name
  2. Lengthen the substring until only one daemon matches
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php:61 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/7ccd8de43a1c194a. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php:61

    foreach ($symbols as $symbol) {
      if (stripos($symbol, $substring) !== false) {
        if (strtolower($symbol) == strtolower($substring)) {
          $match = array($symbol);
          break;
        } else {
          $match[] = $symbol;
        }
      }
    }

    if (count($match) == 0) {
      throw new PhutilArgumentUsageException(
        pht(
          "No daemons match '%s'! Use '%s' for a list of available daemons.",
          $substring,
          'phd list'));
    } else if (count($match) > 1) {
      throw new PhutilArgumentUsageException(
        pht(
          "Specify a daemon unambiguously. Multiple daemons match '%s': %s.",
          $substring,
          implode(', ', $match)));
    }

    return head($match);
  }

  final protected function launchDaemons(
    array $daemons,
    $debug,
    $run_as_current_user = false) {

    // Convert any shorthand classnames like "taskmaster" into proper class
    // names.
    foreach ($daemons as $key => $daemon) {
      $class = $this->findDaemonClass($daemon['class']);

View on GitHub (pinned to 5720a38cfe)