Cloud Build for Google App Engine - Flexible is failing with a generic 'exit status 1' - debug output shows issue in python files

134 views
Skip to first unread message

Claudio Vallesi

unread,
Jun 18, 2019, 12:18:58 PM6/18/19
to Google App Engine

I'm testing how to build a pipeline on GCP and after successfully deploying an Angular 6 application I wanted to add a websocket (socket.io) backend that will serve real time updates.

First of all the error itself, which is results of this command:

gcloud builds submit --verbosity=debug --config stage.cloudbuild.yaml .

[...]

Step #1: ERROR: (gcloud.app.deploy) INTERNAL: Internal error encountered.
Finished Step #1
ERROR
ERROR
: build step 1 "gcr.io/cloud-builders/gcloud" failed: exit status 1
----------------------------------------------------------------------------------


DEBUG
: (gcloud.builds.submit) build 29412e5a-cd7f-4af8-9b83-71fb17414dc2 completed with status "FAILURE"
Traceback (most recent call last):
 
File "C:\Users\[UsernameRedacted]\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 985, in Execute
    resources
= calliope_command.Run(cli=self, args=args)
 
File "C:\Users\[UsernameRedacted]\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 795, in Run
    resources
= command_instance.Run(args)
 
File "C:\Users\[UsernameRedacted]\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\surface\builds\submit.py", line 497, in Run
   
raise FailedBuildException(build)
FailedBuildException: build 29412e5a-cd7f-4af8-9b83-71fb17414dc2 completed with status "FAILURE"
ERROR
: (gcloud.builds.submit) build 29412e5a-cd7f-4af8-9b83-71fb17414dc2 completed with status "FAILURE"
[...]
[ ... NPM saying it's not its fault yada yada ... ]

My local environment is:
  • Node: 10.9.0
  • NPM: 6.2.0
  • OS: Windows 10
Seems like something is wrong in some python script in my local machine but honestly I don't know how I should fix this. Any help is appreciated.

The following is the app.yaml file (specifically stage.app.yaml):

service: mercury

runtime
: nodejs
env
: flex

instance_class
: B1
manual_scaling
:
  instances
: 1

env_variables
:
  MERCURY_PORT
: 5001
  MERCURY_SECRET
: [REDACTED]

network
:
  session_affinity
: true

The cloudbuild.yaml (specifically stage.cloudbuild.yaml):

steps:

- name: 'gcr.io/cloud-builders/npm'
  args
: [ 'install' ]

- name: 'gcr.io/cloud-builders/gcloud'
  args
: [ 'app', 'deploy', 'stage.app.yaml', '-v=stage' ]

And finally, this is the package.json:

{

 
"name": "mercury",
 
"version": "1.0.0",
 
"description": "socket.io event manager",
 
"main": "index.js",
 
"scripts": {
   
"start": "node index.js",
   
"deploy-stage": "gcloud builds submit --config stage.cloudbuild.yaml .",
   
"deploy-prod": "gcloud builds submit --config prod.cloudbuild.yaml ."
 
},
 
"dependencies": {
   
"async": "^2.4.0",
   
"body-parser": "^1.17.1",
   
"dotenv": "^4.0.0",
   
"express": "^4.15.2",
   
"express-validator": "^3.2.0",
   
"http": "0.0.0",
   
"jsonwebtoken": "^7.4.0",
   
"moment": "^2.18.1",
   
"request": "^2.81.0",
   
"request-promise": "^4.2.2",
   
"socket.io": "^2.0.1"
 
},
 
"devDependencies": {
   
"eslint": "^4.18.1",
   
"eslint-plugin-node": "^6.0.0",
   
"log-timestamp": "^0.1.2"
 
},
 
"engines": {
   
"node": "10.9.0"
 
}
}

Yasser Karout

unread,
Jun 18, 2019, 5:17:15 PM6/18/19
to google-a...@googlegroups.com
Hello,

I recommend posting this on Stackoverflow as it is better suited for development questions since the post will have more visibility. Groups is more geared towards high level discussions about Google Cloud products. But if you suspect the issue is on the Google side, feel free to open a new issue here [1] to potentially have the App Engine Team look into it.

Thanks,

Claudio Vallesi

unread,
Jun 19, 2019, 5:25:28 AM6/19/19
to Google App Engine
Thanks for the suggestion but I did it already before posting here as well.

Posting here was a suggestion I received from the official Twitter account for GCP: https://twitter.com/GCPcloud/status/1140954434635272192

No one is answering to the stackoverflow question while at least someone replied here which is honestly quite disheartening about how much support is given over stackoverflow.

Sam (Google Cloud Support)

unread,
Jun 19, 2019, 5:32:11 PM6/19/19
to Google App Engine
I've posted a comment on your StackOverflow question requesting more information. Kindly refer to that forum for further support. Thanks for your patience.
Reply all
Reply to author
Forward
0 new messages