generator-jhipster: Jhipster gae gives errors with a clean jhipster project

Overview of the issue

I create a clean project in Jhipster and Google Cloud Platform. Then, I run jhipster gae and I get errors that I think I should not get. May be it is my fault, but I do not see how. It may be a problem with permissions, but it does not find the project on GCP either. If I have to do something before I start, i have no clue. If it is my fault, please let me know where is the documentation that explains how-to do it. Thanks

Motivation for or Use Case

I’m using a clean project

Reproduce the error

I sucessfully create a new project at GCP with no problems:

C:\Users\USUARIO\AppData\Local\Google\Cloud SDK>gcloud projects create jhipstergae-321 --set-as-default
Create in progress for [https://cloudresourcemanager.googleapis.com/v1/projects/jhipstergae-321].
Waiting for [operations/cp.5152513577397205577] to finish...done.
Enabling service [cloudapis.googleapis.com] on project [jhipstergae-321]...
Operation "operations/acf.f223305a-f054-42af-8a58-def023b715e5" finished successfully.
Updated property [core/project] to [jhipstergae-321].
C:\Users\USUARIO\AppData\Local\Google\Cloud SDK>gcloud projects describe jhipstergae-321
createTime: '2019-11-08T09:35:11.085Z'
lifecycleState: ACTIVE
name: jhipstergae-321
projectId: jhipstergae-321
projectNumber: '61641827385'

Then, I tried to run jhipster gae within a new created project (testgae):

D:\JHipster\testgae>jhipster gae
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:gae
INFO! Options: from-cli: true
Welcome to Google App Engine Generator
? Google Cloud Project ID jhipstergae-321ERROR: (gcloud.projects.describe) User [XXXXX@gmail.com] does not have permission to access project [jhipstergae-321] (or it may not exist): The caller does not have permission
? Google Cloud Project ID jhipstergae-321
? In which Google App Engine location do you want to deploy ? europe-west3 - Frankfurt
ERROR: (gcloud.app.services.describe) NOT_FOUND: Could not find Application "jhipstergae-321".
? Google App Engine Service Name default
? Google App Engine Instance Class F4 - 2.4GHz, 1GB, Automatic Scaling
Instance Class "F4" can only be automatically scaled. Setting scaling type to automatic.
? How many instances minimum ? 1
? How many instances max (0 for unlimited) ? 1
? Initialize a new Cloud SQL instance (Y/N) ? Y
× Error: Command failed: gcloud sql instances list  --format='value[separator=":"](project,region,name)' --project="jhipstergae-321"
ERROR: (gcloud.sql.instances.list) Name expected [:(settings.userLabels:alias=labels:label=LABELS) table(name,databaseVersion,firstof(gceZone,region):label=LOCATION,settings.tier,ip_addresses.filter("type:PRIMARY").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIMARY_ADDRESS,ip_addresses.filter("type:PRIVATE").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIVATE_ADDRESS,state:label=STATUS) *HERE* 'value[separator=:](project,region,name)'].

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: `gcloud sql instances list  --format='value[separator=":"](project,region,name)' --project="jhipstergae-321"`
}
? Google Cloud SQL Instance Name New Cloud SQL Instance
? Google Cloud SQL Instance Name testgae
? Google Cloud SQL User Name root
? Google Cloud SQL Password [hidden]
? Google Cloud SQL Database Name testgae
Configuring Google App Engine Location "europe-west3"

Creating New Cloud SQL Instance

... Running: gcloud sql instances create "testgae" --region='europe-west3' --project=jhipstergae-321 --database-version="POSTGRES_9_6" --tier="db-g1-small"
× Error: Command failed: gcloud sql instances create "testgae" --region='europe-west3' --project=jhipstergae-321 --database-version="POSTGRES_9_6" --tier="db-g1-small"
ERROR: (gcloud.sql.instances.create) HTTPError 400: Invalid request: Invalid value for region: 'europe-west3'.

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: `gcloud sql instances create "testgae" --region='europe-west3' --project=jhipstergae-321 --database-version="POSTGRES_9_6" --tier="db-g1-small"`
}
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.
child_process.js:660
    throw err;
    ^

Error: Command failed: gcloud sql instances describe testgae --format="value(connectionName)" --project="jhipstergae-321"
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.

    at checkExecSyncError (child_process.js:621:11)
    at execSync (child_process.js:657:15)
    at D:\JHipster\testgae\node_modules\generator-jhipster\generators\gae\index.js:609:52
    at ChildProcess.exithandler (child_process.js:302:5)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  status: 1,
  signal: null,
  output: [
    null,
    '',
    'ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.\r\n'
  ],
  pid: 8264,
  stdout: '',
  stderr: 'ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.\r\n'
}

D:\JHipster\testgae>

None

Nope

V6.4.1

Entity configuration(s) entityName.json files generated in the .jhipster directory

No entities

Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 28 (16 by maintainers)

Most upvoted comments

@Tonterias : Yes, it does; without the PR I think there might be some issues around the Cloud SQL thing which we haven’t tested very much. But I did a lot of testing of this Cloud SQL while doing the PR so I think it should have better support creating the databases. 😄

My mouth is watering when I see the whole thing working 😄 Good job @SudharakaP I will wait for the next version and get back you then. Thanks

@Tonterias : can I suggest you to try jhipster-devbox as it looks come from Windows environment

As I told you, you can remote mine if you need to