Java Glass Quickstart Project not working on App Engine - google-app-engine

The quickstart app started acting strangely for me. I can't auth any users. I'm getting the below error. This works fine locally though. Anyone know how to fix this or get around it?
Here's where it's happening in the code (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();
Uncaught exception from servlet
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: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)
Thanks in advance

This looks like a bug in App Engine and the Google OAuth endpoints. It's being tracked in the Glass issue tracker. You can star that issue to receive updates as the investigation proceeds.
In the mean time, check out the .NET and PHP quick starts. They're working great.

Google has had some intermittent connectivity issues over the last two days. It appears to be working fine now.
See reports on the Google App Engine downtime notification group
https://groups.google.com/forum/?fromgroups#!topic/google-appengine-downtime-notify/TqKVL9TNq2A

Related

google app engine Error reporting does not work

the last week my php flex app on app-engine has been causing error 500, sometimes. I dont have changed nothing in my code. But the strangest is that nothing is shown in the error reporting panel. Someone knows if there are new updates or something like that for App Engine?.
Regards.
The last change on December 9, 2019 is about:
App Engine is changing the URLs that you use to send requests to your apps. You can now include a region ID to help Google route your requests more efficiently and reliably. For example, an app can receive requests at https://PROJECT_ID.REGION_ID.r.appspot.com. This new URL is optional for existing apps, and will soon be required for all new apps
https://cloud.google.com/appengine/docs/flexible/php/release-notes
Maybe this could be causing some internal erros. It would be nice more details bout the 500s errors.
Finally, I found the error logs of my app, they are in Stackdriver Logs Viewer. And not in the Error Reporting Panel
Blessings.

Java IOException during API request to Stripe (APIConnectionException)

The specific action we are trying to performe is to create a charge request with Stripe:
Charge charge = Charge.create(params);
Using Stripe's Java implementation (version 5.35.1) we encounter a APIConnectionException when running the application on the deployed App Engine server. Interestingly, the issue does not occur using App Engine's local dev server.
We contacted Stripe and they said everything is fine on their side. They explained that "this error indicates that your server is not able to contact our API and that it ends up timing out waiting for an answer. Usually, this is due to something misconfigured on your server such as a DNS not redirecting to Stripe properly."
We were wondering if there are some configuration settings on App Engine which cause the problem. However, since there is no specific error message we cound not figure out what might cause the connection problem.
Similar problems which did not provide enough help to resolve this issue: https://issuetracker.google.com/35901039
Thanks for your help!
The problem seems to have solved itself. It occured for a couple of days and since a few hours the exact same code is working fine. Just like in https://issuetracker.google.com/issues/35901039 the problem is suddenly gone for some reason.

Google Cloud Endpoint : Request params not delivered to Cloud Endpoints when using Google APIs Client Library for JavaScript

Suddenly my gapi client stopped sending request params to endpoint.
This is how my code looks like
Load the gapi JS
https://apis.google.com/js/client.js?onload=initGoogleApis
in initGoogleApis
function initGoogleApis() {
var ROOT = HOST + "/_ah/api";
gapi.client.load("userendpoint", "v1", function() {
userendpoint = gapi.client.userendpoint;
}, ROOT); }
Now when I query userendpoint.<some function>, then it is not passing the request params to endpoint
NOTE: it was working fine till today morning.
Anyone else facing the same issue? (this might be due to some update in the gapi library)
This issue has been resolved as of yesterday 2014-09-23 08:00 (US Pacific Time).
Details about this issue can be found in the Google App Engine Downtime Notify Group
However 'Google APIs Client Library for JavaScript' is still in Beta and breaking changes have been rolled out more than once. Clound Endpoints themselves are out of beta and can be used for production use.
Now, to properly answer this questions:
The simple advice here is: Don't use beta products for production applications.
To avoid problems with Google APIs Client Library for JavaScript, just don't use it. You can write your own REST API client that will not be affected by changes to the JavaScript library from Google. I have done this for testing purposes a couple of times and it is not hard, just a lot of work depending on how many endpoints you have and how complex they are.
We have the same problem on two projects.
I think that Google has deoployed a new version of the "https://apis.google.com/js/client.js" and it dosen't works as expected...
We need to open a ticket to Google support. If I have any news I will report them to you.
Google reports (https://groups.google.com/forum/#!topic/google-appengine-downtime-notify/t9GElAJwj8U):
We are currently experiencing an issue with Google Cloud Endpoints where the GAPI Javascript client is unable to pass request parameters. For everyone who is affected, we apologize for any inconvenience you may be experiencing. We will provide an update by Tuesday, 2014-09-23 05:00 (all times are in US/Pacific) with current details, and if available an estimated time for resolution.
Update:
We have fixed the issue affecting Google Cloud Endpoints JavaScript client and are gradually rolling-out a fixed version. We estimate full resolution of the issue by 06:30 US/Pacific Pacific. We will provide an update by 06:00 AM.
Update:
Now it works for me.
Marco

Cloud Integration: An error occurred when creating the project. Please retry

I created a new GAE app, but the Cloud Integration section on the Settings page tells me that "An error occurred when creating the project. Please retry."
I have pressed the Retry button multiple times over a period of many hours, but it's just not working. I found this thread, which repeatedly says that the issue is solved, but it's not resolved for me.
Is anyone from Google monitoring this forum? Can you help?
The only solution seems to be to create a new app, and hope for the best (it worked for me). Sadly, if you delete the problem app, the app-id is lost forever.
This is a bit late, but in case someone else stumbles on this question.
In the google cloud console, activate billing from the Storage>Cloud Storage > Browser tab, then activate / retry under Cloud Integration from appengine.google.com.
I didn't need to create a new app id, when I went that route.

Google App Engine + Jersey + IntelliJ Idea

Okay so I'm having some annoying issue here. I am clearly missing something, and already been frustrating myself with this for the last 4-5 hours.
I cannot seem to be able to create a simple GAE+Jersey up and running with IntelliJ.
The frustrating part is that I do not get any errors, just that the REST service is not present after deployment.
I've tried out a few basic stuff, basically everything you can find on Google (and here).
After some frustration I've downloaded this project: https://github.com/BluerockInteractive/GAE-Jersey-Guice-Sample
Just cause this will list out the available servers, plus the deeper logging level.
Now here's the output of the AppEngine startup:
https://docs.google.com/open?id=0B42XvjSlpDCtTTdwQl9MSTBlQ0U
So my problem: The AppEngine is up and running. If I create a basic servlet everyting works fine. However, I cannot get Jersey to work. In every form I could try it always throws an
HTTP ERROR 404
Problem accessing /jerseyguicesample. Reason:
NOT_FOUND
Powered by Jetty://
Any ideas, what I could be missing here?
Here's an image of the IDE and the artifact settings: http://img51.imageshack.us/img51/7913/20120428124133.png
Thanks, :D
This example has REST handlers mapped to /rest/test, /rest/players/{name}/xml, /rest/players/{name}/json and /rest/hello.
What (and where) did you map /jerseyguicesample to?

Resources