{"record":{"id":"bee79e2d95ed14e2","repo":"phacility/phabricator","slug":"err-invalid-user","errorCode":"ERR-INVALID-USER","errorMessage":"ERR-INVALID-USER","messagePattern":"ERR-INVALID-USER","errorType":"error_code","errorClass":"ConduitException","httpStatus":null,"severity":"error","filePath":"src/applications/conduit/method/ConduitConnectConduitAPIMethod.php","lineNumber":110,"sourceCode":"                'to connect to this server (you are running version '.\n                '%d, the server is running version %d).',\n                $client_version,\n                $server_version));\n          }\n          throw $ex;\n        }\n        break;\n      default:\n        // Allow new clients by default.\n        break;\n    }\n\n    $token = $request->getValue('authToken');\n    $signature = $request->getValue('authSignature');\n\n    $user = id(new PhabricatorUser())->loadOneWhere('username = %s', $username);\n    if (!$user) {\n      throw new ConduitException('ERR-INVALID-USER');\n    }\n\n    $session_key = null;\n    if ($token && $signature) {\n      $threshold = 60 * 15;\n      $now = time();\n      if (abs($token - $now) > $threshold) {\n        throw id(new ConduitException('ERR-INVALID-TOKEN'))\n          ->setErrorDescription(\n            pht(\n              'The request you submitted is signed with a timestamp, but that '.\n              'timestamp is not within %s of the current time. The '.\n              'signed timestamp is %s (%s), and the current server time is '.\n              '%s (%s). This is a difference of %s seconds, but the '.\n              'timestamp must differ from the server time by no more than '.\n              '%s seconds. Your client or server clock may not be set '.\n              'correctly.',\n              phutil_format_relative_time($threshold),","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php#L92-L128","documentation":"In the legacy conduit.connect handshake, the submitted 'user' parameter is looked up with an exact username match (loadOneWhere('username = %s')). No matching PhabricatorUser row yields ConduitException 'ERR-INVALID-USER'. Note conduit.connect is a deprecated old-style auth mechanism; modern clients authenticate with API tokens instead.","triggerScenarios":"Calling conduit.connect with a misspelled or nonexistent username; using the user's display name or email instead of the username; the account having been renamed or deleted.","commonSituations":"Very old arc versions or custom clients still speaking the certificate protocol; scripts written against ancient Phabricator instances reused on new ones where the account was never migrated.","solutions":["Confirm and resend the exact username as stored in Phabricator.","Prefer modern authentication: install an API token with 'arc install-certificate' (or send it as a Conduit token) instead of conduit.connect.","Upgrade the client tooling so the legacy handshake is no longer used."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Old-style client: handle the error code returned in the Conduit response.\ntry {\n  $result = $call->execute();\n} catch (ConduitException $ex) {\n  if ($ex->getMessage() === 'ERR-INVALID-USER') {\n    // Username does not exist: surface a clear message, do not blind-retry.\n  }\n  throw $ex;\n}","preventionTips":["Validate usernames against user.search before attempting the handshake.","Migrate off conduit.connect to API-token authentication (arc install-certificate); it is the deprecated path."],"tags":["conduit","auth","phabricator","php","legacy"],"backgroundTag":"conduit-auth-failed","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}