Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.

Hello,

I am trying to deploy to App Engine default service the application whose deployment was normal up until a few days ago. I am deploying in standard environment with NodeJS. The deployment is done via BitBucket pipeline. For some reason, I started getting the following error: 

 

ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.
 
There are not much details provided, just this one message. Any ideas?
 
Many thanks.
0 7 1,631
7 REPLIES 7

1. Try running the deploy command with the verbosity flag set to 'debug' (the default is 'warning'). This will display more information in your logs which might shed more light on your issue. This means execute the following command

gcloud app deploy --verbosity= debug

 2. A second option is to try running with the deploy command with the --http_log flag. This will list all calls to http end points, payload passed, response received and might help in figuring out the cause of the failure

gcloud app deploy --log-http

 

 ..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine

Hello @NoCommandLine,

Thanks for the reply. I tried with --verbosity=debug option but no extra information was provided. The only message received is the same as it was before:

ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.

Where can I see the logs with another option?

Thanks!

1.

Where can I see the logs with another option?

It should print out to your command console (or wherever you redirected your logs to).

2. Since your App is Nodejs, you should note this breaking change from April 11

3. You should also try the suggestion by @williamsdyyz . Sometimes, this can resolve your problem but before doing that, read the breaking changes section of the release notes of all releases between your current version and the latest version to make sure there are no breaking changes that you can't handle.

 

..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine

Make sure your SDK is up-to-date using "gcloud components update"

That bit me just the other day.

 

Managed to get more info when logging the process. 
Here is the failing request body:

Screenshot 2023-05-06 at 23.05.21.png

However, still cannot figure out why it started happening...

 

Thanks

Looking at the error (from your image), it seems the point of failure is when it tries to create a new version of your App for the default service.

Try this

  1. Go to https://console.cloud.google.com/appengine/versions
  2. Select your project and find your currently deployed version name
  3. Then run your deploy command again with that specific version i.e. run
gcloud app deploy -version= <VERSION_FROM_BULLET_3> --log-http

 

..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine

I actually managed to solve the issue by updating my package.json file. All I did was adding 

"gcp-build": "" line to the scripts part of package.json.
 
I hope this can help to the others who face the same issue.
 
Thanks for helping everyone.