Search code examples
google-app-enginegoogle-cloud-platform

Unable to create an AppEngine app in Google Cloud Platform


Followed the steps described in the publicly available lab

When I tried to deploy an app, I got an error:

$ gcloud app deploy
You are creating an app for project [sfsu-pic-a-daily-lab-1].
WARNING: Creating an App Engine application for a project is irreversible and the region
cannot be changed. More information about regions is at
<https://cloud.google.com/appengine/docs/locations>.

Please choose the region where you want your App Engine application located:

 [1] asia-east1    (supports standard and flexible)
 [2] asia-east2    (supports standard and flexible and search_api)
 [3] asia-northeast1 (supports standard and flexible and search_api)
 [4] asia-northeast2 (supports standard and flexible and search_api)
 [5] asia-northeast3 (supports standard and flexible and search_api)
 [6] asia-south1   (supports standard and flexible and search_api)
 [7] asia-southeast1 (supports standard and flexible)
 [8] asia-southeast2 (supports standard and flexible and search_api)
 [9] australia-southeast1 (supports standard and flexible and search_api)
 [10] europe-central2 (supports standard and flexible)
 [11] europe-west   (supports standard and flexible and search_api)
 [12] europe-west2  (supports standard and flexible and search_api)
 [13] europe-west3  (supports standard and flexible and search_api)
 [14] europe-west6  (supports standard and flexible and search_api)
 [15] northamerica-northeast1 (supports standard and flexible and search_api)
 [16] southamerica-east1 (supports standard and flexible and search_api)
 [17] us-central    (supports standard and flexible and search_api)
 [18] us-east1      (supports standard and flexible and search_api)
 [19] us-east4      (supports standard and flexible and search_api)
 [20] us-west1      (supports standard and flexible)
 [21] us-west2      (supports standard and flexible and search_api)
 [22] us-west3      (supports standard and flexible and search_api)
 [23] us-west4      (supports standard and flexible and search_api)
 [24] cancel
Please enter your numeric choice:  20

ERROR: (gcloud.app.deploy) The project [sfsu-pic-a-daily-lab-1] already contains an App Engine application. You can deploy your application using `gcloud app deploy`.

When I tried to see if there was some other app, there was nothing (and I'm sure I didn't create another App Engine app before).

$ gcloud app instances list
ERROR: (gcloud.app.instances.list) Apps instance [sfsu-pic-a-daily-lab-1] not found: App does not exist.

$ gcloud app browse
ERROR: (gcloud.app.browse) The current Google Cloud project [sfsu-pic-a-daily-lab-1] does not contain an App Engine application. Use `gcloud app create` to initialize an App Engine application within the project.

And yet, it still does not let me create an AppEngine app:

$ gcloud app create
You are creating an app for project [sfsu-pic-a-daily-lab-1].
WARNING: Creating an App Engine application for a project is irreversible and the region
cannot be changed. More information about regions is at
<https://cloud.google.com/appengine/docs/locations>.

Please choose the region where you want your App Engine application located:

 [1] asia-east1    (supports standard and flexible)
 [2] asia-east2    (supports standard and flexible and search_api)
 [3] asia-northeast1 (supports standard and flexible and search_api)
 [4] asia-northeast2 (supports standard and flexible and search_api)
 [5] asia-northeast3 (supports standard and flexible and search_api)
 [6] asia-south1   (supports standard and flexible and search_api)
 [7] asia-southeast1 (supports standard and flexible)
 [8] asia-southeast2 (supports standard and flexible and search_api)
 [9] australia-southeast1 (supports standard and flexible and search_api)
 [10] europe-central2 (supports standard and flexible)
 [11] europe-west   (supports standard and flexible and search_api)
 [12] europe-west2  (supports standard and flexible and search_api)
 [13] europe-west3  (supports standard and flexible and search_api)
 [14] europe-west6  (supports standard and flexible and search_api)
 [15] northamerica-northeast1 (supports standard and flexible and search_api)
 [16] southamerica-east1 (supports standard and flexible and search_api)
 [17] us-central    (supports standard and flexible and search_api)
 [18] us-east1      (supports standard and flexible and search_api)
 [19] us-east4      (supports standard and flexible and search_api)
 [20] us-west1      (supports standard and flexible)
 [21] us-west2      (supports standard and flexible and search_api)
 [22] us-west3      (supports standard and flexible and search_api)
 [23] us-west4      (supports standard and flexible and search_api)
 [24] cancel
Please enter your numeric choice:  20

ERROR: (gcloud.app.create) The project [sfsu-pic-a-daily-lab-1] already contains an App Engine application. You can deploy your application using `gcloud app deploy`.

Creating the app in UI Console does not work either: enter image description here

This is something I don't understand here. Will appreciate your suggestions!

Upd: found the following error message associated with the App Engine error:

Already exists (HTTP 409): Cannot create Firestore database resource projects/sfsu-pic-a-daily-lab-1/databases/(default) since it is already exists at location nam5.

Solution

  • As it turned out, creating App Engine instance before creating a Firestore database avoids this issue. However, if you create a Firestore first, you may run into this problem.