phacility/phabricator · error · PhutilProxyException
Expected valid JSON response from Google account data…
Error message
Expected valid JSON response from Google account data request.
What it means
Raised in the Google OAuth adapter when the userinfo request returns HTTP success but the body fails phutil_json_decode(). The parse exception is wrapped in a proxy exception, meaning Google returned a non-JSON payload for the user profile request.
Solutions
- Retry the sign-in; transient gateway errors produce non-JSON bodies
- Confirm the Google OAuth client credentials and access token are valid
- Check the raw response in the Phabricator log if it persists
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/applications/auth/adapter/PhutilGoogleAuthAdapter.php:112 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/682056ce6aef4ba3.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/auth/adapter/PhutilGoogleAuthAdapter.php:112
'grant_type' => 'authorization_code',
);
}
protected function loadOAuthAccountData() {
$uri = new PhutilURI('https://www.googleapis.com/userinfo/v2/me');
$uri->replaceQueryParam('access_token', $this->getAccessToken());
$future = new HTTPSFuture($uri);
list($status, $body) = $future->resolve();
if ($status->isError()) {
throw $status;
}
try {
$result = phutil_json_decode($body);
} catch (PhutilJSONParserException $ex) {
throw new PhutilProxyException(
pht('Expected valid JSON response from Google account data request.'),
$ex);
}
return $result;
}
}
View on GitHub (pinned to 5720a38cfe)