2
votes

i using bellow command to deploy php app to app engine:

gcloud app deploy --promote --project test12 app-live.yaml --log-http --verbosity=debug

My app-live.yaml file:

runtime: php72
api_version: 1

env_variables:
  VERSION: '2.0'
  APP_MODE: live

  GOOGLE_CLOUD_PROJECT: xx
  CLOUD_STORAGE_BUCKET: xx.appspot.com
  GOOGLE_APPLICATION_CREDENTIALS: data/file.json


handlers:
# Serve images as static resources.
- url: /(.+\.(gif|png|jpg|jpeg|js|css|ttf|woff2|otf|eot|svg|ttf|woff|ico|map))$
  static_files: \1
  upload: .+\.(gif|png|jpg|jpeg|js|css|ttf|woff2|otf|eot|svg|ttf|woff|ico|map)$
  application_readable: true
  http_headers:
    X-file-Header: static
    Access-Control-Allow-Origin: "*"

- url: /cron/(.*)
  script: cron/\1

- url: /.*
  script: index.php
  secure: always

error_handlers:
  - error_code: over_quota
    file: layout/html/over_quota.html

but show this error:

HttpBadRequestError: HttpError accessing https://appengine.googleapis.com/v1/apps/ads-clickgs/services/default/versions?alt=json: response: <{'status': '400', 'content-length': '252', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Tue, 28 Aug 2018 04:44:34 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="44,43,39,35"', 'content-type': 'application/json; charset=UTF-8'}>, content <{ "error": { "code": 400, "message": "Please update to the latest version of gcloud. If you are using the API directly, please provide a value for version.entrypoint.shell. This can be an empty value.", "status": "INVALID_ARGUMENT" }

I have searched on google but I did not found any suggestion.

1
Please provide the command. I can see only the response in your post.Roman Patutin
yes, i edit my post. please seeHoangWeb
i deploy a simple php app for testing. it worked for same project but i can't deploy my complex php app as i mention above.HoangWeb
Did you try to update Google Cloud SDK? Do you use docker in "complex php app"?Roman Patutin
yes, all up to date. current SDK version [213.0.0]. No docker, standard env: php72HoangWeb

1 Answers

2
votes

I had the same issue and fixed it using :

gcloud components update

As I did not have permission to modify the SDK installation directory it was suggested I run : (You might want to adapt to your path)

sudo /usr/local/google-cloud-sdk/bin/gcloud components update

Then my gcloud app deploy command worked again :)