{"record":{"id":"97dd945bdfb79f40","repo":"phacility/phabricator","slug":"this-server-is-configured-as-s-but-you-are-usi","errorCode":null,"errorMessage":"This server is configured as \"%s\", but you are using the domain name \"%s\" to access a page which is trying to set a cookie. Access this service on the configured primary domain or a configured alternate domain. Cookies will not be set on other domains for security reasons.","messagePattern":"This server is configured as \"(.+?)\", but you are using the domain name \"(.+?)\" to access a page which is trying to set a cookie\\. Access this service on the configured primary domain or a configured alternate domain\\. Cookies will not be set on other domains for security reasons\\.","errorType":"exception","errorClass":"AphrontMalformedRequestException","httpStatus":500,"severity":"error","filePath":"src/aphront/AphrontRequest.php","lineNumber":586,"sourceCode":"   * @param string  Cookie name.\n   * @param string  Cookie value.\n   * @param int     Epoch timestamp for cookie expiration.\n   * @return this\n   * @task cookie\n   */\n  private function setCookieWithExpiration(\n    $name,\n    $value,\n    $expire) {\n\n    $is_secure = false;\n\n    $base_domain_uri = $this->getCookieDomainURI();\n    if (!$base_domain_uri) {\n      $configured_as = PhabricatorEnv::getEnvConfig('phabricator.base-uri');\n      $accessed_as = $this->getHost();\n\n      throw new AphrontMalformedRequestException(\n        pht('Bad Host Header'),\n        pht(\n          'This server is configured as \"%s\", but you are using the domain '.\n          'name \"%s\" to access a page which is trying to set a cookie. '.\n          'Access this service on the configured primary domain or a '.\n          'configured alternate domain. Cookies will not be set on other '.\n          'domains for security reasons.',\n          $configured_as,\n          $accessed_as),\n        true);\n    }\n\n    $base_domain = $base_domain_uri->getDomain();\n    $is_secure = ($base_domain_uri->getProtocol() == 'https');\n\n    $name = $this->getPrefixedCookieName($name);\n\n    if (php_sapi_name() == 'cli') {","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/AphrontRequest.php#L568-L604","documentation":"Thrown by 'bin/repository thaw --all-repositories' when no repositories can be found on the device or service being promoted/demoted. In the '--all-repositories' branch the workflow resolves the target's Almanac services, then queries repositories bound to those services; if that chain yields nothing, there is nothing to thaw and the command stops. This usually points at an Almanac configuration issue rather than a typo, since a completely unknown device/service name fails earlier with a different error.","triggerScenarios":"Running 'bin/repository thaw --demote dev-002 --all-repositories' where dev-002 exists but belongs to no service that hosts repositories: $services is empty (or the service query returns repositories => none), so $repositories stays empty and the guard at PhabricatorRepositoryManagementThawWorkflow.php:148 throws.","commonSituations":"Devices used only for other cluster roles (db, cache, web) mistakenly passed to thaw; repositories migrated off a service but the old device kept in runbooks; Almanac bindings deleted or disabled during a reconfiguration; wrong cluster/instance (dev vs prod Almanac) targeted.","solutions":["Confirm in Almanac (or via the web UI) that the device has bindings to a repository service and that repositories are bound to that service.","Name the repositories explicitly instead of using '--all-repositories' to bypass the device-based lookup.","Verify you are operating on the correct Phabricator instance and device names (check AlmanacDevices in the web UI)."],"exampleFix":"# before\nbin/repository thaw --demote dev-002 --all-repositories\n\n# after (target the repositories explicitly)\nbin/repository thaw --demote dev-002 R1 R2 R3","handlingStrategy":"validation","validationCode":"// Confirm the device actually hosts repositories before thaw:\n$devices = id(new AlmanacDeviceQuery())->setViewer($viewer)->withNames(array($name))->execute();\n$services = id(new AlmanacServiceQuery())->setViewer($viewer)\n  ->withDevicePHIDs(mpull($devices, 'getPHID'))->execute();\n$repos = id(new PhabricatorRepositoryQuery())->setViewer($viewer)\n  ->withAlmanacServicePHIDs(mpull($services, 'getPHID'))->execute();\nif (!$repos) { /* fix Almanac config or pick repos explicitly */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep device/service/repository Almanac bindings in sync when reconfiguring the cluster.","Verify the target device hosts repositories before choosing '--all-repositories'."],"tags":["phabricator","cli","almanac","cluster-repositories","empty-result"],"backgroundTag":"empty-query-result","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}