分享我的生活
分享能使人快乐

解决 “无效的Appid 使用前请先部署。”

最新版提示这样升级到测试版还是这样”无效的Appid 使用前请先部署。”

 

原问题

部署了好几次,Show Debug Log无论开关都是无效appid,部署显示是成功的,

这是最后一次打开状态下部署的日志

2016-08-02 15:53:24,706 – root – INFO – enable debug logging

2016-08-02 15:53:24,706 – root – INFO – set proxy to http://127.0.0.1:8087

2016-08-02 15:53:24,721 – root – INFO – ============ Begin upload ============

2016-08-02 15:53:24,721 – root – INFO – appid:1470116205938

2016-08-02 15:53:24,743 – root – INFO – Send: /api/appversion/rollback, params={‘version’: ‘1’, ‘app_id’: ‘1470116205938’}

2016-08-02 15:53:24,743 – google.appengine.tools.appengine_rpc – DEBUG – _Authenticate skipped auth; needs_auth=False

2016-08-02 15:53:24,743 – google.appengine.tools.appengine_rpc – DEBUG – Sending request to https://appengine.google.com/api/appversion/rollback?app_id=1470116205938&force_rollback=0&version=1 headers={‘X-appcfg-api-version’: ‘1’, ‘content-length’: ‘0’, ‘Content-Type’: ‘application/octet-stream’} body=

2016-08-02 15:53:25,608 – google.appengine.tools.appengine_rpc – DEBUG – Got http error 401.

2016-08-02 15:53:25,608 – google.appengine.tools.appengine_rpc – DEBUG – Attempting to auth. This is try 1 of 3.

2016-08-02 15:53:25,608 – google.appengine.tools.appengine_rpc – DEBUG – _Authenticate requesting auth

2016-08-02 15:53:30,904 – oauth2client.client – INFO – Successfully retrieved access token

2016-08-02 15:53:30,907 – google.appengine.tools.appengine_rpc – DEBUG – _Authenticate configuring auth; needs_auth=True

2016-08-02 15:53:30,907 – google.appengine.tools.appengine_rpc – DEBUG – Sending request to https://appengine.google.com/api/appversion/rollback?app_id=1470116205938&force_rollback=0&version=1 headers={‘X-appcfg-api-version’: ‘1’, ‘content-length’: ‘0’, ‘Content-Type’: ‘application/octet-stream’} body=

2016-08-02 15:53:31,328 – google.appengine.tools.appengine_rpc – DEBUG – Got http error 404.

2016-08-02 15:53:31,328 – google.appengine.tools.appengine_rpc – DEBUG – Unexpected results: {‘status’: ‘404’, ‘content-length’: ’58’, ‘expires’: ‘Mon, 01 Jan 1990 00:00:00 GMT’, ‘-content-encoding’: ‘gzip’, ‘x-cloud-trace-context’: ‘0f99a138b094f5c3937dede867ed1108;o=1’, ‘content-type’: ‘text/plain’}

2016-08-02 15:53:31,359 – root – INFO – Send: /api/appversion/rollback, params={‘version’: ‘1’, ‘app_id’: ‘1470116205938’}

2016-08-02 15:53:31,359 – google.appengine.tools.appengine_rpc – DEBUG – _Authenticate configuring auth; needs_auth=False

2016-08-02 15:53:31,359 – google.appengine.tools.appengine_rpc – DEBUG – Sending request to https://appengine.google.com/api/appversion/rollback?app_id=1470116205938&force_rollback=0&version=1 headers={‘X-appcfg-api-version’: ‘1’, ‘content-length’: ‘0’, ‘Content-Type’: ‘application/octet-stream’} body=

2016-08-02 15:53:31,819 – google.appengine.tools.appengine_rpc – DEBUG – Got http error 404.

2016-08-02 15:53:31,819 – google.appengine.tools.appengine_rpc – DEBUG – Unexpected results: {‘status’: ‘404’, ‘content-length’: ’58’, ‘expires’: ‘Mon, 01 Jan 1990 00:00:00 GMT’, ‘-content-encoding’: ‘gzip’, ‘x-cloud-trace-context’: ’54e55f5f9c7720fb1f881fd986b44599;o=1′, ‘content-type’: ‘text/plain’}

2016-08-02 15:53:31,849 – root – INFO – Send: /api/appversion/rollback, params={‘version’: ‘1’, ‘app_id’: ‘1470116205938’}

2016-08-02 15:53:31,849 – google.appengine.tools.appengine_rpc – DEBUG – _Authenticate configuring auth; needs_auth=False

2016-08-02 15:53:31,851 – google.appengine.tools.appengine_rpc – DEBUG – Sending request to https://appengine.google.com/api/appversion/rollback?app_id=1470116205938&force_rollback=0&version=1 headers={‘X-appcfg-api-version’: ‘1’, ‘content-length’: ‘0’, ‘Content-Type’: ‘application/octet-stream’} body=

2016-08-02 15:53:32,262 – google.appengine.tools.appengine_rpc – DEBUG – Got http error 404.

2016-08-02 15:53:32,263 – google.appengine.tools.appengine_rpc – DEBUG – Unexpected results: {‘status’: ‘404’, ‘content-length’: ’58’, ‘expires’: ‘Mon, 01 Jan 1990 00:00:00 GMT’, ‘-content-encoding’: ‘gzip’, ‘x-cloud-trace-context’: ’21e06b7851cbf9a64e43727247f77c7e;o=1′, ‘content-type’: ‘text/plain’}

2016-08-02 15:53:32,263 – root – INFO – =======================

2016-08-02 15:53:32,265 – root – INFO – Deploy failed appid list:

2016-08-02 15:53:32,265 – root – INFO – – 1470116205938

2016-08-02 15:53:32,265 – root – INFO – == END ==

经过gcloud shell测试,服务器端是可以部署成功的,代码精简如下:

在网页打开控制台console,然后打开gcloud shell

git clone https://www.xxxxxx.com/xxxxxxx/xxxx.git

cd xxxx

cp app.template.yaml app.yaml

vi app.yaml

删除application:和version: 1 这两行

gcloud app deploy app.yaml

然后就部署成功。

对于用webUI的朋友来说

原因很简单:appids不再是简单的一串数字或者字母。比如你为你的appid 起名为milestone001,实际上系统会给分一个milestone001-1470018899134 这样的appids。你用milestone001部署肯定不成功,部署的时候要填写milestone001-1470018899134

如图,以前我们部署的时候填写的都是红框之内的短appid,现在需要填写绿框内的长appid。填写之后,可以部署成功。

如图刚刚手工gcloud部署成功1个,webUI尝试成功一个,验证测试成功3个。

End。

赞(2)
未经允许不得转载:RUBLOG-分享我的生活 » 解决 “无效的Appid 使用前请先部署。”

我想说 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #-49

    博客不错,嘎嘎!

    QQ3612271773年前 (2016-08-11)Reply