Android Mobile Backend Starter 失败,找不到 404... 有时 [英] Android Mobile Backend Starter fail with 404 not found... some times

查看:18
本文介绍了Android Mobile Backend Starter 失败,找不到 404... 有时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天下午我创建了一个项目并开始部署移动后端.我编辑了客户端代码并成功插入了一些数据.

Last afternoon I created a project and deployed the mobile backend started. I edited the client code and sucessfully did some data insertion.

一段时间(小时)后,我再次更改了客户端代码,插入失败并显示错误:

Some time (hours) after, I changed the cliend code again and the insertion failed with the error:

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

由于我没有对代码进行任何实质性更改,因此我得出的结论是错误出在应用引擎方面,因此我重新部署了该项目并解决了问题.插入再次通过.

As I didn't did any substantial change in the code I concluded that the error was on the app engine side so I redeployed the project and that solved the problem. The insertions came through again.

今天早上我回来了 404 错误.这次重新部署不起作用.

This morning I was back with the 404 error. This time redeploying didn't work.

我在应用引擎中得到的错误日志是:

The error log I get in the app engine is:

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 happening and what can I do to solve it?

推荐答案

我不完全明白这是怎么回事,但我找到了摆脱客户端 404 错误的方法,这些错误是由 App 引起的发动机侧无响应.应用引擎日志中报告的错误涉及应用的受众和客户端 ID.这些是您在为由客户端 ID 保护"配置身份验证时设置的值.

I do not completely understand what is going on, but I found a way to get rid of the 404 errors on the client side, which are caused by the App Engine side not responding. The errors reported in the app engine logs are talking about audience and client ids for the app. Those are the values you set when you configure authentication for "Secured by Client Ids".

我发现如果我在那里放入一些占位符字符串值,保存,然后回到打开(仅供开发使用)"并再次保存,应用引擎将不再有配置错误,并且会响应客户端 Android 应用.

I found that if I put in some placeholder string values in there, saved, and then went back to "Open (for development use only)" and saved again, the app engine would no longer have config errors and would response to the client Android app.

目前我只到在留言簿数据中进行输入的地方.但这绝对让我重新开始.我希望如果我完全设置身份验证,问题就不会再出现.

At the moment I am only to the place where entries are made in the Guestbook data. But this definitely got me started again. I am hoping that if I set up authentication completely that the problem will not come back.

这篇关于Android Mobile Backend Starter 失败,找不到 404... 有时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆