9

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

$ 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, it's claiming the project isn't found. What's confusing me is that the project clearly appears under here:

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

I can't find any other instance of this issue, and I've run out of ideas to troubleshoot. So what's the problem with the command I'm running? Or how else can I troubleshoot?

My app.yaml looks like this:

entrypoint: gunicorn -b :8080 main.app
runtime: custom
vm: true

service: my-service-name
6
  • 1
    Are you using a service account? What role do you have on that project? Commented Sep 22, 2016 at 18:25
  • @ZacharyNewman I'm an editor on the project Commented Sep 22, 2016 at 18:29
  • What's really strange is that if I purposefully use a non-existent project name I get an error telling me I don't have the required permissions. Which means in my original case it's successfully determined that I have permissions for the project before alerting me that it doesn't exist. Commented Sep 22, 2016 at 18:48
  • Very strange. I'll try to route this to the correct folks inside Google. Commented Sep 22, 2016 at 18:55
  • @ZacharyNewman Thanks, I really appreciate your help. I've just tried deploying to a separate random project of which I am the owner, and didn't hit the same roadblock. Does that signify it might be a permissions issue? Commented Sep 22, 2016 at 18:56

1 Answer 1

10

It turns out this is what happens if you don't have the "Google Cloud Container Builder API" enabled. I found this out by trying --verbosity debug, which displayed the link I had to follow to enable it for my project.

When deploying, the 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 cool if that was displayed to the user in place of the "app not found" error

4
  • 1
    also use --log-http : which i've found is very helpful
    – npr
    Commented Sep 23, 2016 at 13:24
  • 1
    I was following the go examples, but started again with a new project, this step seemed automated on the first run.... but had me scratching my head, Your insight and link got me up and runnning again, much thanks. Commented Sep 29, 2016 at 21:48
  • You could have explained how to enable it: stackoverflow.com/questions/56126481/…
    – jpruiz114
    Commented Jan 26, 2021 at 16:30
  • At the time of writing, the link in the logs (like I mentioned above) took you straight to the page where you enable it. Does it no longer do that? Commented Jan 26, 2021 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.