Note that there are some explanatory texts on larger screens.

plurals
  1. POTimeouts refreshing Google oauth token in GAE app
    text
    copied!<p>I have a GAE app that periodically requests a user's activities from G+. I'm using the <a href="https://code.google.com/p/google-oauth-java-client/" rel="nofollow noreferrer">google oauth client api for java</a>.</p> <p>This has been working fine for months with literally no code changes (I'll post the code if required, it's all taken straight from the oauth client project examples, using GoogleAuthorizationCodeFlow).</p> <p>However, a couple of days ago this changed. Now, without fail from the GAE instance, I get this exception during token refresh:</p> <pre><code>java.net.SocketTimeoutException: Timeout while fetching 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:77) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1009) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:299) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323) at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:586) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:505) at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:266) </code></pre> <p>Now this still works fine from my local machine. There are no reported quota issues on the GAE dashboard or on the Google APIS console for this app. Billing is enabled for the Google APIs console project, but not the GAE app.</p> <p>I note there's a similar looking issue in a python app reported <a href="https://stackoverflow.com/questions/16987683/deadlineexceedederrors-with-gae-google-api-refreshing-access-token">here</a>, but that has no responses so far.</p> <p>This has been happening continuously for a couple of days - the app tries once an hour for a hundred or so different users. If I limit the app to only perform this for a single user it still occurs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload