{"record":{"id":"171d046872c774e1","repo":"phacility/phabricator","slug":"repository-s-has-versions-on-inactive-devices","errorCode":null,"errorMessage":"Repository \"%s\" has versions on inactive devices. Demote (or reactivate) these devices before promoting a new leader: %s.","messagePattern":"Repository \"(.+?)\" has versions on inactive devices\\. Demote \\(or reactivate\\) these devices before promoting a new leader: (.+?)\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php","lineNumber":253,"sourceCode":"            // Before we promote, make sure there are no outstanding versions\n            // on devices with inactive bindings. If there are, you need to\n            // demote these first.\n            $inactive = array();\n            foreach ($versions as $device_phid => $version) {\n              if (isset($bindings[$device_phid])) {\n                continue;\n              }\n              $inactive[$device_phid] = $version;\n            }\n\n            if ($inactive) {\n              $handles = $viewer->loadHandles(array_keys($inactive));\n\n              $handle_list = iterator_to_array($handles);\n              $handle_list = mpull($handle_list, 'getName');\n              $handle_list = implode(', ', $handle_list);\n\n              throw new PhutilArgumentUsageException(\n                pht(\n                  'Repository \"%s\" has versions on inactive devices. Demote '.\n                  '(or reactivate) these devices before promoting a new '.\n                  'leader: %s.',\n                  $repository->getDisplayName(),\n                  $handle_list));\n            }\n\n            // Now, make sure there are no outstanding versions on devices with\n            // active bindings. These also need to be demoted (or promoting is\n            // a mistake or already happened).\n            $active = array_select_keys($versions, array_keys($bindings));\n            if ($active) {\n              $handles = $viewer->loadHandles(array_keys($active));\n\n              $handle_list = iterator_to_array($handles);\n              $handle_list = mpull($handle_list, 'getName');\n              $handle_list = implode(', ', $handle_list);","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php#L235-L271","documentation":"Error \"Repository \"%s\" has versions on inactive devices. Demote (or reactivate) these devices before promoting a new leader: %s.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}