phacility/phabricator · error · PhutilArgumentUsageException

No search engines match "%s". Available engines which suppor

Error message

No search engines match "%s". Available engines which support data export are: %s.

What it means

The --class argument is matched case-insensitively by substring (stripos) against all PhabricatorApplicationSearchEngine subclasses that support export. If no class name contains the given substring, this usage exception is thrown and its message lists the engines that do support data export. That list is the authoritative set of usable --class values.

Source

Thrown at src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php:195

      }

      sort($class_list);
      $class_list = implode(', ', $class_list);

      $matches = array();
      foreach ($engine_classes as $class_name => $engine_object) {
        if (stripos($class_name, $class) !== false) {
          if (strtolower($class_name) == strtolower($class)) {
            $matches = array($class_name);
            break;
          } else {
            $matches[] = $class_name;
          }
        }
      }

      if (!$matches) {
        throw new PhutilArgumentUsageException(
          pht(
            'No search engines match "%s". Available engines which support '.
            'data export are: %s.',
            $class,
            $class_list));
      } else if (count($matches) > 1) {
        throw new PhutilArgumentUsageException(
          pht(
            'Multiple search engines match "%s": %s.',
            $class,
            implode(', ', $matches)));
      } else {
        $class = head($matches);
      }

      $engine = newv($class, array())
        ->setViewer($viewer);
    } else {

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Read the engine list from the error message and pass one of those exact class names.
  2. Fix typos and casing: matching is a case-insensitive substring, so 'Maniphest' matches ManiphestTaskSearchEngine.
  3. If your target application is missing from the list, its engine does not support export — export a different object type instead.

Example fix

# before
bin/bulk export --class ManiphestTypoEngine --query all --output -
# after
bin/bulk export --class ManiphestTaskSearchEngine --query all --output -
Defensive patterns

Strategy: validation

Validate before calling

# discover export-capable engines once, then pin the exact class
bin/bulk export --class __nonexistent__ --query all --output - 2>&1 | tr ',' '\n'
# (the usage error enumerates every engine that supports export)

Try / catch

Catch PhutilArgumentUsageException in wrapper tooling, detect 'No search engines match' in the message, and fail fast with the engine list attached for the operator.

Prevention

When it happens

Trigger: Passing --class with a typo or unrelated string; passing the name of an engine that exists but whose canExport() is false, so it never entered the candidate list (candidates come from PhutilClassMapQuery over the engine ancestor class).

Common situations: Assuming an application has export support when its engine never implemented it; engine class renames or new applications after a Phabricator upgrade breaking old scripts.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/0f5270ffcd73fd0b. Report an issue: GitHub.