2
votes

After I’ve deleted some values (do not remember which) in my project configuration (in the Developer Console) I cannot deploy an app to a Compute Engine instance. I’ve deployed the same code using the same configuration dozens of times successfully but after deleting some values in the Developer Console or doing some other adjustments that I considered minor, the deployment, using Maven plugin v2.0.9.95.v20160203, fails with

[INFO] Beginning deployment...
[INFO] WARNING: If this is your first deployment, please try again.
[INFO] ERROR: (gcloud.preview.app.deploy) Server responded with code [400]:
[INFO]   Bad Request Unexpected HTTP status 400.
[INFO]   Failed Project Preparation (app_id='s~some-id'). Error retrieving the App Engine service account. 
[ERROR] Error: gcloud app command with exit code : 1

I run

mvn clean validate gcloud:deploy

Unlike in some other of my projects I do not have both of the accounts

  1. App Engine default service account - [email protected]
  2. Compute Engine default service account - [email protected]

…in my Permissions section but only the 2. account.

2

2 Answers

2
votes

Maybe you deleted your App Engine service account. To create it again, you can go to the Permissions section of your project and add a new member with the email [email protected] (replace with your real project id) and "Can Edit" permissions.

0
votes

Maybe you're not authenticated to your project anymore? Have you tried to reauthenticate using gcloud auth login?

If you're authenticated but happen somehow to delete default Google AppEngine service account ([email protected]), you won't be able to recreate them yourself. You will need to file a support ticket with Google and ask them to recreate the default service account for you.

Finally, you can create new project and deploy your application there but of course this comes at a price/time.