expressgoogle-cloud-platformgoogle-app-enginecloud

Deploying to GCP App Engine from terminal produces contradictory error messages


I have an Express JS app that I am trying to deploy to a GCP app engine. I tried to deploy it from the command line using gcloud app deploy but I got this error message:

You are creating an app for project [fake-bank-432202].
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:  18

ERROR: (gcloud.app.deploy) The project [fake-bank-432202] already contains an App
Engine application. You can deploy your application using `gcloud app deploy`.

However, when I try to run gcloud app describe on the same project, I get this error message:

ERROR: (gcloud.app.describe) The current Google Cloud project [fake-bank-432202] does
not contain an App Engine application. Use `gcloud app create` to initialize an App 
Engine application within the project.

I also tried running gcloud app create but I got the same error I got when I ran gcloud app deploy

I tried switching to a different GCP project, but I still got the same error.

Is there anything I can do to fix this?

This is my app.yaml file if that helps:

runtime: nodejs22

skip_files:
- ^(.*/)?\.gitignore$  
- ^(.*/)?\.git/

Solution

  • As mentioned in the document,

    Previously, all Firestore databases were linked to an App Engine app. When linked, your database requires an active App Engine app in the same project. Without the active App Engine app, read and write access to the database is disabled.

    A mismatch can occur between the region where Datastore/Firestore resides and the region where App Engine is attempted to be created when a customer first creates Datastore then attempts to create an App Engine app in a different region.

    And also mentioned by @NoCommandLine, it could be due to billing as well. I suggest you to check and enable billing.