android-docs-samples icon indicating copy to clipboard operation
android-docs-samples copied to clipboard

io.grpc.StatusRuntimeException: UNAVAILABLE: Channel in TRANSIENT_FAILURE state/UNAVAILABLE

Open DevDengChao opened this issue 8 years ago • 1 comments

 Caused by: java.lang.IllegalStateException: 
    OAuth2Credentials instance does not support refreshing the access token.
    An instance with a new access token should be used, 
    or a derived type that supports refreshing should be used.
final GoogleCredentials credentials = ServiceAccountCredentials.fromStream(stream)
                        .createScoped(SCOPE);
final AccessToken token = credentials.refreshAccessToken();

Some how I just can't refresh the access token even I generate another credential.json , using an Compute Engine default service account . I see ServiceAccountCredentials does override refreshAccessToken(), so I replaced it , still not work.

DevDengChao avatar Jul 11 '17 10:07 DevDengChao

tim 20170727104233 I got these error recently, sometime it works, or not...=( It says Network is unreachable, but I'm sure I could connect www.google.com/ncr. Is there anything wrong?

DevDengChao avatar Jul 27 '17 02:07 DevDengChao