prestodb/presto · error · ClientException
Google credential refreshing error
Error message
Google credential refreshing error
What it means
getCredentials calls refreshIfExpired on the GoogleCredentials used to sign GCS requests; an IOException during the OAuth token refresh (network failure or revoked/expired credential) is wrapped in this ClientException, so requests to GCS cannot be authenticated.
Source
Thrown at presto-client/src/main/java/com/facebook/presto/client/GCSOAuthInterceptor.java:80
private Request attachGCSAccessToken(Request request)
{
AccessToken token = getCredentials().getAccessToken();
return request.newBuilder()
.addHeader(PRESTO_EXTRA_CREDENTIAL, GCS_CREDENTIALS_OAUTH_TOKEN_KEY + "=" + token.getTokenValue())
.build();
}
private synchronized GoogleCredentials getCredentials()
{
if (credentials == null) {
credentials = createCredentials();
}
try {
credentials.refreshIfExpired();
}
catch (IOException e) {
throw new ClientException("Google credential refreshing error", e);
}
return credentials;
}
private GoogleCredentials createCredentials()
{
try (InputStream is = newInputStream(Paths.get(credentialsFilePath))) {
return GoogleCredentials.fromStream(is).createScoped(gcsOAuthScopeURLs);
}
catch (IOException e) {
throw new ClientException("Google credential loading error", e);
}
}
private Collection<String> mapScopeStringToURLs(String gcsOAuthScopesString)
{
return StreamSupport
.stream(SCOPE_SPLITTER.split(gcsOAuthScopesString).spliterator(), false)View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the service-account key file is valid and not revoked
- Check network access and system time (clock skew breaks token refresh)
- Re-create the credentials file if the refresh token expired
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-client/src/main/java/com/facebook/presto/client/GCSOAuthInterceptor.java:80 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/fcdebaf4cc3b0a4f.
Report an issue: GitHub.