{"record":{"id":"17376185e7d9a1f3","repo":"phacility/phabricator","slug":"unable-to-load-any-of-the-members-of-the-account","errorCode":null,"errorMessage":"Unable to load any of the members of the account (\"%s\") for this subscription (\"%s\").","messagePattern":"Unable to load any of the members of the account \\(\"(.+?)\"\\) for this subscription \\(\"(.+?)\"\\)\\.","errorType":"exception","errorClass":"PhabricatorWorkerPermanentFailureException","httpStatus":null,"severity":"error","filePath":"src/applications/phortune/worker/PhortuneSubscriptionWorker.php","lineNumber":89,"sourceCode":"        $message = pht(\n          'All members of the account (\"%s\") for this subscription (\"%s\") '.\n          'are disabled.',\n          $account->getPHID(),\n          $subscription->getPHID());\n      } else if ($account->getMemberPHIDs()) {\n        $message = pht(\n          'Unable to load any of the members of the account (\"%s\") for this '.\n          'subscription (\"%s\").',\n          $account->getPHID(),\n          $subscription->getPHID());\n      } else {\n        $message = pht(\n          'The account (\"%s\") for this subscription (\"%s\") has no '.\n          'members.',\n          $account->getPHID(),\n          $subscription->getPHID());\n      }\n      throw new PhabricatorWorkerPermanentFailureException($message);\n    }\n\n    $cart = $account->newCart($actor, $cart_implementation, $merchant);\n\n    $purchase = $cart->newPurchase($actor, $product);\n\n    $purchase\n      ->setBasePriceAsCurrency($currency)\n      ->setMetadataValue('subscriptionPHID', $subscription->getPHID())\n      ->setMetadataValue('epoch.start', $last_epoch)\n      ->setMetadataValue('epoch.end', $next_epoch)\n      ->save();\n\n    $cart\n      ->setSubscriptionPHID($subscription->getPHID())\n      ->setIsInvoice(1)\n      ->save();\n","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/phortune/worker/PhortuneSubscriptionWorker.php#L71-L107","documentation":"Phortune (Phabricator's billing application) renews subscriptions from the queue: PhortuneSubscriptionWorker wakes on each billing trigger and must create the renewal cart on behalf of some member of the payment account (the actor). This error means membership records exist, but none of those member users could actually be loaded, so no actor is available for $account->newCart($actor, ...). It is thrown as PhabricatorWorkerPermanentFailureException, so the task fails permanently and will not be retried.","triggerScenarios":"A subscription trigger fires; the worker loads the account's member PHIDs, but every member user fails to load afterwards (all were deleted or disabled), so the actor selection loop ends empty and the permanent failure is raised before cart creation.","commonSituations":"All members of a Phortune account were deleted after the subscription was configured (typical when cleaning up test accounts while test subscriptions still fire); user records removed by a migration while phortune account membership data survived in a partially inconsistent state.","solutions":["Add an active administrator as a member of the Phortune account (Phortune account Members UI) so the next trigger has a valid actor","If the subscription is obsolete, delete or cancel it so its trigger stops queueing permanent failures","Open the daemon task console (Daemons, failed/archived tasks) and inspect the permanent failure to confirm the account and subscription PHIDs involved","Verify the member users still exist and are not disabled before the next billing epoch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before enabling automatic renewals, make sure the Phortune account\n// has at least one member who can act as the billing actor.\n$account = id(new PhortuneAccountQuery())\n  ->setViewer(PhabricatorUser::getOmnipotentUser())\n  ->withPHIDs(array($account_phid))\n  ->executeOne();\nif (!$account || !$account->getMemberPHIDs()) {\n  throw new Exception(pht('Add a member to the account before subscribing.'));\n}","typeGuard":null,"tryCatchPattern":"try {\n  // custom code that re-fires PhortuneSubscriptionWorker tasks manually\n} catch (PhabricatorWorkerPermanentFailureException $ex) {\n  // Terminal: alert operations; fix account membership before the next epoch.\n}","preventionTips":["Keep at least one active administrator on every Phortune account that owns subscriptions","Check Phortune account membership before deleting users who are members","Monitor permanent worker task failures in the daemon console so billing stops do not go unnoticed"],"tags":["phabricator","phortune","subscription","billing","queue-worker","permanent-failure"],"backgroundTag":"dangling-reference","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}