当我尝试部署到 App Engine 时错误发布到 URL 400 Bad Request
Error posting to URL 400 Bad Request when I try deploy to app engine
几个月前,我的应用程序可以完美地部署到 appengine,但我今天尝试部署它,但我在日志中收到以下错误:
Beginning interaction for module default...
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #0
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #1
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #2
May 07, 2016 3:46:09 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #3
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
Please see the logs [/var/folders/dg/1d63fk7n5r9c05hnbn7z2nx80000gp/T/appcfg6594780979158835679.log] for further information.
我认为问题出在url中指定的app_id
; https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
那个url里面的app_id
是%24%7Bapp.id%7D
其实是ornate-woodland-130423
这是我的appengine_web.xml:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>${app.id}</application>
<version>${app.version}</version>
<threadsafe>true</threadsafe>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
</appengine-web-app>
摘自我的pom.xml:
<properties>
<app.id>ornate-woodland-130423</app.id>
<app.version>1</app.version>
<appengine.version>1.9.37</appengine.version>
<gcloud.plugin.version>2.0.9.89.v20151202</gcloud.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
</properties>
我有办法解决这个问题吗?
这不起作用的原因是因为 app.id
需要在 appengine_web.xml
中明确指定。因此,为什么在 URL 中它说 app.id
是 %24%7Bapp.id%7D
。正如上面有人指出的那样,这实际上是 ${app.id}。
所以不要像这样隐式设置它;
<application>${app.id}</application>
我把它改成了这个,它起作用了
<application>ornate-woodland-130423</application>
几个月前,我的应用程序可以完美地部署到 appengine,但我今天尝试部署它,但我在日志中收到以下错误:
Beginning interaction for module default...
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #0
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #1
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #2
May 07, 2016 3:46:09 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #3
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
Please see the logs [/var/folders/dg/1d63fk7n5r9c05hnbn7z2nx80000gp/T/appcfg6594780979158835679.log] for further information.
我认为问题出在url中指定的app_id
; https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
那个url里面的app_id
是%24%7Bapp.id%7D
其实是ornate-woodland-130423
这是我的appengine_web.xml:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>${app.id}</application>
<version>${app.version}</version>
<threadsafe>true</threadsafe>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
</appengine-web-app>
摘自我的pom.xml:
<properties>
<app.id>ornate-woodland-130423</app.id>
<app.version>1</app.version>
<appengine.version>1.9.37</appengine.version>
<gcloud.plugin.version>2.0.9.89.v20151202</gcloud.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
</properties>
我有办法解决这个问题吗?
这不起作用的原因是因为 app.id
需要在 appengine_web.xml
中明确指定。因此,为什么在 URL 中它说 app.id
是 %24%7Bapp.id%7D
。正如上面有人指出的那样,这实际上是 ${app.id}。
所以不要像这样隐式设置它;
<application>${app.id}</application>
我把它改成了这个,它起作用了
<application>ornate-woodland-130423</application>