androidthings / sample-googleassistant

Google Assistant API sample for Android Things
Apache License 2.0
467 stars 147 forks source link

Credentials failed to obtain metadata #81

Closed SEAN-JOU closed 5 years ago

SEAN-JOU commented 6 years ago

assist error: UNAVAILABLE: Credentials failed to obtain metadata

                                                                                      io.grpc.StatusRuntimeException: UNAVAILABLE: Credentials failed to obtain metadata
                                                                                          at io.grpc.Status.asRuntimeException(Status.java:526)
                                                                                          at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419)
                                                                                          at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
                                                                                          at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
                                                                                          at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
                                                                                          at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392)
                                                                                          at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475)
                                                                                          at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
                                                                                          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557)
                                                                                          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478)
                                                                                          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590)
                                                                                          at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
                                                                                          at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
                                                                                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                                                                                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                                                                                          at java.lang.Thread.run(Thread.java:764)
                                                                                       Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
                                                                                      {
                                                                                        "error" : "invalid_grant",
                                                                                        "error_description" : "Bad Request"
                                                                                      }
                                                                                          at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1054)
                                                                                          at com.google.auth.oauth2.UserCredentials.refreshAccessToken(UserCredentials.java:207)
                                                                                          at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:149)
                                                                                          at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:135)
                                                                                          at com.google.auth.Credentials.blockingGetToCallback(Credentials.java:103)
                                                                                          at com.google.auth.Credentials$1.run(Credentials.java:92)
                                                                                            ... 3 more
Fleker commented 6 years ago

It looks like you've got an authorization issue. Can you confirm you're connected to the Internet and that you have a valid credentials.json file?

reemagadhia commented 4 years ago

I am facing the same issue. Did you find a way to resolve it?

shubh261096 commented 4 years ago

@reemagadhia Did you find any way to resolve this issue? It's happening in signed release build. Help me if this issue of yours is resolved.

jyotirmayg commented 3 years ago

Dialogflow issue: Did anyone have any solution to this issue?

It's working fine with debug apk but failing with released apk.