Getting "Project not found" errors when using `gcloud deploy app`

Running the gcloud app deploy --project=my-project-name command gives me the following result:

 $ gcloud app deploy --project=my-project-name You are about to deploy the following services: - my-project-name/my-service-name/20160922t110054 (from [/usr/local/projects/my-project/app.yaml]) Deployed URL: [https://my-service-name-dot-my-project-name.appspot.com] Do you want to continue (Y/n)? Y WARNING: We couldn't validate that your project is ready to deploy to App Engine Flexible Environment. If deployment fails, please try again. Beginning deployment of service [my-service-name]... WARNING: Deployment of App Engine Flexible Environment apps is currently in Beta Building and pushing image for service [my-service-name] ERROR: (gcloud.app.deploy) Project [my-project-name] not found. 

As you can see, he claims that the project was not found. What confuses me is that the project clearly appears here:

 $ gcloud projects list PROJECT_ID NAME PROJECT_NUMBER my-project-name MyProject 980737858333 

I cannot find any other instance of this problem, and I have run out of troubleshooting ideas. So what is the problem with the command I'm running? Or how else can I troubleshoot?

My app.yaml as follows:

 entrypoint: gunicorn -b :8080 main.app runtime: custom vm: true service: my-service-name 
+5
source share
1 answer

Turns out this happens if you're not using the Google Cloud Container Builder API. I found this by trying --verbosity debug , which displayed a link that I had to follow in order to enable it for my project.

When deployed, a call to https://cloudbuild.googleapis.com/v1/projects/my-project-name/builds?alt=json returns a nice error message:

 "The cloudbuild API is not enabled for project ID \"my-project-name\": to enable it, visit https://console.cloud.google.com/apis/api/cloudbuild.googleapis.com/overview?project=my-project-name" 

It would be great if this were shown to the user instead of the "app not found" error

+8
source

All Articles