0
votes

I have inherited a php codebase that uses google appengine, so I have a fully built app locally that I am trying to deploy. But when I run:

gcloud app deploy --project project-name --verbosity=debug

I get the error below. I don't understand the staging command error because in the app.yaml I specify runtime: php55. I don't know what the API endpoint error means, and I also don't understand why no app was found. Any help on any of these errors would be much appreciated.

DEBUG: Running [gcloud.app.deploy] with arguments: [--project: "project-name", --verbosity: "debug"] DEBUG: No staging command found for runtime [php55] and environment [STANDARD]. DEBUG: API endpoint: [https://appengine.googleapis.com/], API version: [v1] DEBUG: No app found: Traceback (most recent call last): File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 679, in _PossiblyCreateApp return api_client.GetApplication() File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 66, in GetApplication return self.client.apps.Get(request) File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/appengine/v1/appengine_v1_client.py", line 1124, in Get config, request, global_params=global_params) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 722, in _RunMethod return self.ProcessHttpResponse(method_config, http_response, request) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 728, in ProcessHttpResponse self.__ProcessHttpResponse(method_config, http_response, request)) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 599, in __ProcessHttpResponse http_response, method_config=method_config, request=request) HttpNotFoundError: HttpError accessing https://appengine.googleapis.com/v1/apps/project-name?alt=json: response: <{'status': '404', 'content-length': '136', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Tue, 24 Sep 2019 22:49:44 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": { "code": 404, "message": "Could not find Application \"project-name\".", "status": "NOT_FOUND" } }

1
Can you please add a minimum reproducable code sample to reproduce the issue (exclude any sensitive info)? Also, I suppose that you put your actual project name in the gcloud command but you redacted it when you posted the question?siamsot
I did redact the project name in my post. In the future I'll try to make that more obvious. As for minimum reproducible code, I've since figured out the problem and it had to do entirely with trying to deploy an empty project.Noah K
Glad to hear that the issue is resolved. I hope you enjoy experimenting with the App Enginesiamsot

1 Answers

1
votes

The value for --project must correspond to a Google Cloud Platform project ID.

It's unclear whether you replaced your actual project ID (NB Project IDs and Project names are distinct properties, see link) with project-name when you pasted your question.

One way to verify that the project exists would be to:

gcloud projects describe [[PROJECT]]

Assuming the project exists, a second consideration is that (since you're not specifying deployables), the command assumes the working directory contains an app.yaml (App Engine app configuration) file.