Can't deploy NodeJs app with using IAM roles in a service account: error response 13: An internal error occurred

153 views
Skip to first unread message

Valentin Despa

unread,
Jul 26, 2018, 11:14:57 AM7/26/18
to Google App Engine

I am trying to deploy the standard example NodeJs App using a service account.


I have created a new service account with the roles (as described in the documentation https://cloud.google.com/appengine/docs/standard/nodejs/granting-project-access#deploying_using_iam_roles):

- App Engine Admin
- Storage Object Admin

When deploying with 

gcloud app deploy --verbosity=debug

I get the error:

Updating service [default]...⠛DEBUG: Operation [apps/MYAPP/operations/01c6d8bc-9247-4d1b-924f-c6ec12514fcf] complete. Result: {
   
"metadata": {
       
"target": "apps/MYAPP/services/default/versions/20180726t071855",
       
"method": "google.appengine.v1.Versions.CreateVersion",
       
"user": "MYACCOUNT@ MYAPP.iam.gserviceaccount.com",
       
"insertTime": "2018-07-26T05:18:59.150Z",
       
"endTime": "2018-07-26T05:19:02.609Z",
       
"@type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1"
   
},
   
"done": true,
   
"name": "apps/MYAPP/operations/01c6d8bc-9247-4d1b-924f-c6ec12514fcf",
   
"error": {
       
"message": "An internal error occurred.",
       
"code": 13
   
}
}
Updating service [default]...failed.
DEBUG
: (gcloud.app.deploy) Error Response: [13] An internal error occurred.


If I add the role Project Owner it is properly working and deploying a new version. So it does not seem to be a problem with the code itself.

So it seems to be a permission problem. 

Does anybody have any ideas? I hate to do CI/CD with accounts with more permission than they need.

George (Cloud Platform Support)

unread,
Jul 27, 2018, 11:06:01 AM7/27/18
to Google App Engine
Error 13 is unfortunately uninformative. 

- Have you run the "gcloud auth login" command? [0] How did you authorize your account, exactly? 

- Do you get this error every time you try deploying from this machine? 

- Have you tried deploying the same project from a different machine?  If you have succeed deploying from the second machine: are the gcloud installations identical on both machines?  If not, what version(s) and components are installed on the second machine? 

- Have you tried rolling back gcloud to 208.0.2 [1] on the machine with failing deployments, and then retry deployment? 

- If you want to update your Cloud SDK installation to the latest available version, use the gcloud components update command. 

- What is the output of gcloud info? 

Reply all
Reply to author
Forward
0 new messages