2
votes

I created a GCP App Engine (AE) project using Java 11. Once the AE project was created, I then linked it to Firebase (as opposed to creating natively through Firebase to begin with). Everything worked fine.

Today I deleted the Firebase account thinking it would keep original AE project, since I thought it was simply an add-on to my core AE project. I was wrong. Both the AE project and the Firebase account were deleted. I restored both through the GCP admin screen and the site came back up (both the AE project and Firebase functionality).

The problem now is that I can't deploy new versions of my code with gcloud app deploy. The build logs (on GCP's end) list the following error:

Step #3 - "analyzer": Already have image (with digest): us.gcr.io/gae-runtimes/buildpacks/java11/builder:java11_20200816_11_0_RC00

Step #3 - "analyzer": ERROR: failed to initialize cache: failed to create image cache: accessing cache image "us.gcr.io/my-project-dev-287623/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest": connect to repo store 'us.gcr.io/my-project-dev-287623/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest': GET https://us.gcr.io/v2/my-project-dev-287623/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache/manifests/latest: DENIED: Permission denied for "latest" from request "/v2/my-project-dev-287623/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache/manifests/latest".

Now I'm locked out from deploying any new code. Any ideas?

4
by click on the URL above, the message indicated that 'Please enable or contact project owners to enable the Google Container Registry API in Cloud Console'. Try to enable the Google Container Registry API first.Shawn Di Wu
@ShawnDiWu - I checked Google Container Registry API and it is already enabled. I can see my service account entries under Credentials. I don't see anything sticking out as wrong.P_impl55
Try using the --no-promote --no-stop-previous-version flags when you deploy. If that works, stop and/or delete the old versions. Let me know if this works.Rafael Lemos
@RafaelLemos - I tried --no-promote --no-stop-previous-version but it still failed with the same permissions error.P_impl55
It is certain that the permission error. You need to grant permission to the docker. Also it may caused by the ' Cloud Build API', checked if ' Cloud Build API' has been enabled abd try to disbale it and then enable it. It may help. Let me know if the issue continues.Shawn Di Wu

4 Answers

7
votes

This issue was resolved when I enabled billing for my account. Please check if you have billing enabled/linked billing account for your project.

2
votes

I want to point out a misunderstanding in your question, I forgot to mention it in my first message. There is NO link GCP project to the Firebase project. Firebase project IS a Google Cloud project. That is why when you delete the Firebase project, the GCP project gone. it is intended behavior. The way you mean link, it is actually to add Firebase services to the current GCP project

It is certain that the permission error. You need to grant permission to the docker. Also it may caused by the ' Cloud Build API', checked if ' Cloud Build API' has been enabled and try to disable it and then enable it. It may help. Let me know if the issue continues

2
votes

If your billing and Build API are enabled please check this. After the end of the trial period, Google asks to Upgrade account to enable its services. Google shows a notification bar to do it on top of the Cloud Console.

0
votes

Due to payment failure in my case. There was a pending payment of $0.01 for previous month & payment failed as the minimum payment is $10. I have paid $10 in advance & working fine.