App Engine deployment fails with “Client Error (40

2019-06-15 05:07发布

my python27 app deployment is failing for some reasons:

2012-03-09 16:46:25 Running command: "['C:\\Python27\\pythonw.exe', '-u', 'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=malartre@scolab.com', '--passin', 'update', 'C:\\Users\\XXXXXXXXXXXXXX\\GoogleAppEngine\\XXXXXXXXXXXXXX']"
Application: XXXXXXXXXXXXXX; version: 1
Host: appengine.google.com

Starting update of app: XXXXXXXXXXXXXXX, version: 1
Getting current resource limits.
Password for malartre@scolab.com: Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Scanned 1500 files.
Scanned 2000 files.
Scanned 2500 files.
Cloning 2973 static files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Cloned 600 files.
Cloned 700 files.
Cloned 800 files.
Cloned 900 files.
Cloned 1000 files.
Cloned 1100 files.
Cloned 1200 files.
Cloned 1300 files.
Cloned 1400 files.
Cloned 1500 files.
Cloned 1600 files.
Cloned 1700 files.
Cloned 1800 files.
Cloned 1900 files.
Cloned 2000 files.
Cloned 2100 files.
Cloned 2200 files.
Cloned 2300 files.
Cloned 2400 files.
Cloned 2500 files.
Cloned 2600 files.
Cloned 2700 files.
Cloned 2800 files.
Cloned 2900 files.
Cloning 3 application files.

Uploading 4 files and blobs.
Uploaded 4 files and blobs
Compilation starting.
Compilation completed.
Starting deployment.
Rolling back the update.
Error 400: --- begin server output ---

Client Error (400)
The request is invalid for an unspecified reason.
--- end server output ---
2012-03-09 16:47:14 (Process exited with code 1)

You can close this window now.

How can I debug that? Thanks, Carl

6条回答
做个烂人
2楼-- · 2019-06-15 05:12

One of the causes of this error is having more than 1000 files in a folder.

For me I had about 1k images but then 9 folders and I think that put it over the top. I haven't checked if the limitation also exists for folder counts but I imagine it does.

查看更多
趁早两清
3楼-- · 2019-06-15 05:15

i know this is an old question, but i thought i would provide the solution that worked for me. Select Control from the GAE Launcher, then Clear Deployment Credential. Deploy again. The deployment script will open a web page where GAE is requesting access to use your Google account to authenticate. the answer from Jen Tong helped me get to my solution.

查看更多
4楼-- · 2019-06-15 05:23

This is a fall-back error message that is triggered when your deployment sends very unexpected data to App Engine during deployment.

In other words, there's no quick fix here, but there are a couple things you can check:

  • Check your apps metadata in app.yaml for Python and appengine-web.xml for Java. Double check each field. If the application name is very wrong, it may trigger this error.
  • Make sure that your deployment credentials are valid. If you're authenticating with OAuth 2.0, try using password based authentication.
查看更多
▲ chillily
5楼-- · 2019-06-15 05:28

Just recording my experience in this related question.

I got a 'Client Error 400/unspecified reason' because my app.yaml error handlers were pointing to files in a static directory.

I moved the error files to a separate directory and updated app.yaml paths.

Update worked properly.

查看更多
在下西门庆
6楼-- · 2019-06-15 05:33

Deleting some files worked for me. Looks like there may be a 1000 file hard limit for apps on GAE, and this obscure error code is at least in part used to document being over the limit.

http://www.adampresley.com/2011/06/gae-and-client-error-400.html

查看更多
在下西门庆
7楼-- · 2019-06-15 05:34

I has this because I had an rogue ) in my app.yaml. I'd check the last thing(s) you did for errors because although your app may upload, an error may cause the application not to deploy.

查看更多
登录 后发表回答