phacility/phabricator · error · PhutilArgumentUsageException

Repository "%s" has versions on inactive devices. Demote (or

Error message

Repository "%s" has versions on inactive devices. Demote (or reactivate) these devices before promoting a new leader: %s.

What it means

Error "Repository "%s" has versions on inactive devices. Demote (or reactivate) these devices before promoting a new leader: %s." thrown in phacility/phabricator.

Source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:253

            // Before we promote, make sure there are no outstanding versions
            // on devices with inactive bindings. If there are, you need to
            // demote these first.
            $inactive = array();
            foreach ($versions as $device_phid => $version) {
              if (isset($bindings[$device_phid])) {
                continue;
              }
              $inactive[$device_phid] = $version;
            }

            if ($inactive) {
              $handles = $viewer->loadHandles(array_keys($inactive));

              $handle_list = iterator_to_array($handles);
              $handle_list = mpull($handle_list, 'getName');
              $handle_list = implode(', ', $handle_list);

              throw new PhutilArgumentUsageException(
                pht(
                  'Repository "%s" has versions on inactive devices. Demote '.
                  '(or reactivate) these devices before promoting a new '.
                  'leader: %s.',
                  $repository->getDisplayName(),
                  $handle_list));
            }

            // Now, make sure there are no outstanding versions on devices with
            // active bindings. These also need to be demoted (or promoting is
            // a mistake or already happened).
            $active = array_select_keys($versions, array_keys($bindings));
            if ($active) {
              $handles = $viewer->loadHandles(array_keys($active));

              $handle_list = iterator_to_array($handles);
              $handle_list = mpull($handle_list, 'getName');
              $handle_list = implode(', ', $handle_list);

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:253 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/171d046872c774e1. Report an issue: GitHub.