4

I have an old Google Cloud Project that i just can't delete.

When I do it via website i get an "Project Service Unknown error Tracking number: 342342354345345345"

When i do it via CLI with command:

gcloud projects delete "PROJECT"

I get an error:

ERROR: (gcloud.projects.delete) FAILED_PRECONDITION: Precondition check failed.

'@type': type.googleapis.com/google.rpc.ResourceInfo

resourceName: projects/77777777777777

resourceType: PROJECT

What else can i do?

Community
  • 1
  • 1
FilipM
  • 43
  • 4
  • For the Console error, you will need Google Cloud Support. For the CLI error, this looks like you are using an old version of `gcloud`. Run `gcloud components update` and try again. This update command requires command elevation on Windows. – John Hanley Oct 28 '19 at 07:39
  • Have you been using Cloud Endpoints Services by any chance? – ericcco Oct 28 '19 at 10:19
  • @JohnHanley Did the update, opened cmd with admin rights and the same error was there – FilipM Oct 28 '19 at 10:27
  • 1
    @eespinola Yes! That did it! deleted my Endpoint via "gcloud endpoints services delete service-name" and then it deleted sucessfully! Thanks! – FilipM Oct 28 '19 at 10:28
  • I am glad that this was your issue. I wrote the solution as an answer, and I would appreciate if you can accept it in order to get more visibility to other users. Thanks! :) – ericcco Oct 28 '19 at 10:32

2 Answers2

4

In case you are using Cloud Endpoints services in your project, you should delete them first and try to delete the project again by using the UI or the following gcloud command:

gcloud projects delete "PROJECT"
ericcco
  • 696
  • 2
  • 14
  • This is good to know. Please enter this issue in the Google Cloud Issue Tracker. https://cloud.google.com/support/docs/issue-trackers – John Hanley Oct 28 '19 at 14:34
  • 1
    I checked on Google Cloud Issue Tracker and I found that there is one [already created](https://issuetracker.google.com/143348700) for this topic. – ericcco Oct 28 '19 at 15:12
  • The issue is no longer public but this looks relevant: https://stackoverflow.com/questions/59357139/when-i-shut-down-a-gcp-project-i-receive-an-unknown-error-with-a-tracking-numbe – Alexis MP Dec 16 '19 at 13:32
  • Here are some guidelines about troubleshooting project deletion: https://cloud.google.com/resource-manager/docs/troubleshooting-project-deletion – PYB Mar 04 '20 at 14:47
0

In case that is not too late this worked for me:

  1. see your project retentions: gcloud alpha resource-manager liens list
  2. if you have any retention delete: gcloud alpha resource-manager liens delete "name"
  3. delete your project gcloud projects delete "project"

more info about gcp project retentions here

RichG
  • 4,202
  • 1
  • 12
  • 23