Android Mobile Backend Starter crash 404 not found ... several times

Last day I created a project and deployed a mobile server. I edited the client code and successfully performed some data insertion.

After some time (hours), I changed the cliend code again, and the insert failed with an error:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found 

Since I did not make significant changes to the code, I came to the conclusion that the error was on the application side, so I redistributed the project and solved the problem. The inserts are back in.

This morning I returned with error 404. This time, the redistribution did not help.

The error log that I get in the application engine:

 Uncaught exception from servlet javax.servlet.UnavailableException: com.google.api.server.spi.config.ApiConfigException: <Entity [GoogleCloudEndpointConfiguration("EndpointV1")]: clientIds = null audiences = null > .audiences was not of type String or List<String>. at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:451) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:57) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:439) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487) at com.google.tracing.TraceContext.runInContext(TraceContext.java:774) at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251) at java.lang.Thread.run(Thread.java:722) 

Any idea what is going on and what can I do to solve it?

+8
android google-app-engine backend
source share
4 answers

I do not quite understand what is happening, but I found a way to get rid of 404 errors on the client side, which are caused by the fact that the App Engine side is not responding. The errors reported in the application engine logs indicate the audience and client identifiers for the application. These are the values ​​that you set when authenticating for "Provided by client identifiers."

Mobile Backend Settings page

I found that if I put some string values ​​into it, saved them, and then returned to β€œOpen (for development use only)” and saved again, the application engine will no longer have configuration errors and there will be a reaction to the client application for Android

At the moment, I am only in the place where the entries are made in the guestbook data. But it definitely made me start again. I hope that if I fully configure authentication, the problem will not return.

+8
source share

I was getting the same error, the error disappeared after redeploying the backend application on the cloud console.

+1
source share

I found that after redeployment, a new version is created, instead of reinstalling it by default. When choosing this new version as the "default" everything worked as expected.

Select the default instance in (Main / Version):

 https://appengine.google.com/adminlogs?&app_id=<project_id> 

Check:

 https://<project_id>.appspot.com/_ah/api/explorer 
+1
source share

Here is the perfect solution.

Log in to the application system. Click "Instances" on the left side. In the lower right corner you will see the option "Shutdown"

Click Shut Down. (Shutdown is not just shutdown, but restart).

The instance starts after 10-12 seconds. Note. During these 10-12 seconds, the application engine is unavailable. So, if your application is live, your cloud will not work during these 10-12 seconds.

Refresh the page after 10 seconds and make sure that you see the β€œShut Down” option. This means that your instance is rebooted.

Now try again and it will work. Send me an email at jscript12@gmail.com if you have any questions.

0
source share

All Articles