GoogleCloudPlatform / android-docs-samples

Apache License 2.0
375 stars 596 forks source link

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

Open DevDengChao opened 6 years ago

DevDengChao commented 6 years ago
 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 commented 6 years ago

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?