Java Glass Quickstart项目无法在App Engine上运行

时间:2013-06-07 19:38:18

标签: google-app-engine google-mirror-api google-glass

快速启动应用程序开始对我来说很奇怪。我无法授权任何用户。我收到以下错误。这虽然在本地工作正常。任何人都知道如何解决这个问题或绕过它?

这是代码中发生的地方(AuthServlet:55)

 LOG.info("Got a code. Attempting to exchange for access token.");

 AuthorizationCodeFlow flow = AuthUtil.newAuthorizationCodeFlow();
  TokenResponse tokenResponse =
      flow.newTokenRequest(req.getParameter("code"))
          .setRedirectUri(WebUtil.buildUrl(req, "/oauth2callback")).execute();

来自servlet的未捕获异常 java.net.SocketTimeoutException:获取URL时超时:

https://accounts.google.com/o/oauth2/token
    at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:141)
    at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:43)
    at com.google.api.client.extensions.appengine.http.UrlFetchRequest.execute(UrlFetchRequest.java:75)
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:980)
    at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:299)
    at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:175)
    at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:78)
    at com.google.glassware.AuthServlet.doGet(AuthServlet.java:55)

提前致谢

2 个答案:

答案 0 :(得分:1)

这看起来像App Engine和Google OAuth端点中的错误。它正在Glass issue tracker中被跟踪。随着调查的进行,您可以将该问题加注星标以接收更新。

同时,请查看.NETPHP快速入门。他们工作得很好。

答案 1 :(得分:1)

Google在过去两天内出现了一些间歇性的连接问题。现在似乎工作正常。

查看有关Google App Engine停机时间通知组的报告

https://groups.google.com/forum/?fromgroups#!topic/google-appengine-downtime-notify/TqKVL9TNq2A