首页 > 解决方案 > com.google.api.client.auth.oauth2.TokenResponseException: 400 错误请求 (Eclipse)

问题描述

我一直卡在 Eclipse 的“部署到 APP Engine”,并且总是弹出以下错误消息。我能想到的可能的行动都被采取了,但都失败了。

An error occurred while retrieving projects: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
  "error" : "invalid_grant",
  "error_description" : "Bad Request"
}
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
  "error" : "invalid_grant",
  "error_description" : "Bad Request"
}

这是我现在的情况。

  1. 应用程序(Java Servlet)在调试级别正常运行
  2. Eclipse 的“部署到 App Engine”在 2018 年左右运行良好
  3. 可用的软件是最新的
  4. 我按照 Java 8 部署手册 (Google) 的说明重新启动项目并成功验证了我的帐户 https://cloud.google.com/appengine/docs/standard/java/building-app/environment-setup?hl =ja

有人帮我解决这个问题吗?我想将我的应用程序部署到 Google Cloud Platform。

标签: javaeclipsegoogle-app-enginedeploymentoauth-2.0

解决方案


我通过注销并重新登录 Google Plugin for Eclipse 来解决这个问题。自从我在 2018 年继续登录我的谷歌帐户以来,OAuth 令牌已经过期。


推荐阅读