【问题标题】:Getting AppIdentityServiceFailureException getAccessToken while fetch list of BQ tables for a particular dataset在获取特定数据集的 BQ 表列表时获取 AppIdentityServiceFailureException getAccessToken
【发布时间】:2020-03-13 07:21:08
【问题描述】:

当我尝试获取特定数据集中存在的表列表时,我收到此错误。我无法在网上找到任何解决方案。有什么想法吗?

问题是我上个月可以使用这种方法。代码和环境没有变化。我不明白为什么它突然停止工作了。

com.google.appengine.api.appidentity.AppIdentityServiceFailureException
at com.google.appengine.api.appidentity.AppIdentityServiceImpl.getAccessToken(AppIdentityServiceImpl.java:290)
at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.intercept(AppIdentityCredential.java:100)
at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential$AppEngineCredentialWrapper.intercept(AppIdentityCredential.java:245)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:897)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:499)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:432)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:549)```

【问题讨论】:

  • getAccessToken() 方法抛出异常作为 oauth2 身份验证链的一部分。也许您没有在 http 请求中传递访问令牌。
  • 问题是我上个月能用这个方法。代码和环境没有变化。我无法理解为什么它突然停止工作。

标签: java google-app-engine google-bigquery


【解决方案1】:

如文档AppIdentityService (Google App Engine API for Java)中所述:

getAccessToken(java.lang.Iterable scopes) OAuth2 访问令牌,代表应用程序行事。

这说明需要在身份验证中使用方法 getAccessToken(),因为它使用的是 OAuth2,因此需要进一步的身份验证。

在下面的文档中,有更多关于如何在您的应用程序上使用该方法并确认令牌将在您的系统中发送和接收的信息。

如果这些信息对您有帮助,请告诉我!

【讨论】:

  • 问题是我上个月能用这个方法。代码和环境没有变化。我不明白为什么它突然停止工作了。
  • HI @User-8017771 当然,我理解你的意思,这确实很奇怪,因为你没有改变任何东西。看起来,它从一开始就不应该起作用,因此,我建议您联系Google Support。他们应该能够进一步查看您的配置和日志,以验证可能导致此问题的原因。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-04-22
相关资源
最近更新 更多