phacility/phabricator · error · PhutilProxyException
Expected valid JSON response from Facebook account data…
Error message
Expected valid JSON response from Facebook account data request.
What it means
Raised in the Facebook OAuth adapter when graph.facebook.com/me responds with a body that phutil_json_decode() cannot parse. The parse exception is wrapped in a PhutilProxyException, indicating Facebook returned HTML or an error payload instead of the expected JSON profile object.
Solutions
- Retry the OAuth handshake; rate limits or transient errors often return non-JSON
- Verify the Facebook app credentials and access token are valid
- Check the adapter logs for the raw response body
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/applications/auth/adapter/PhutilFacebookAuthAdapter.php:83 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/f2dc57aedd7a92d8.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/auth/adapter/PhutilFacebookAuthAdapter.php:83
protected function loadOAuthAccountData() {
$fields = array(
'id',
'name',
'email',
'link',
'picture',
);
$uri = new PhutilURI('https://graph.facebook.com/me');
$uri->replaceQueryParam('access_token', $this->getAccessToken());
$uri->replaceQueryParam('fields', implode(',', $fields));
list($body) = id(new HTTPSFuture($uri))->resolvex();
$data = null;
try {
$data = phutil_json_decode($body);
} catch (PhutilJSONParserException $ex) {
throw new PhutilProxyException(
pht('Expected valid JSON response from Facebook account data request.'),
$ex);
}
return $data;
}
}
View on GitHub (pinned to 5720a38cfe)