Import Firebase DB from same region Bucket fails

51 Views Asked by At

I've tried several solutions for this problem, which resumes in trying to import a local base Firestore dump into a new DB but it fails under specific situations. Even though I've tried to do all the steps described here: Allow Public Read access on a GCS bucket? - which includes managing and changing the permissions through the GPanel (which doesn't allow me to uncheck the "enforce public access prevention" - even when I try to create a new bucket from scratch) or through the GConsole using both gsutil and gcloud utilities, the error persists:

enter image description here

My last attempt was through the gsutil command line through the GConsole, but it fails miserably:

{{my-gcloud-user}}@cloudshell:~ (reflected-oath-398412)$ gsutil iam ch allUsers:objectViewer gs://{{my-bucket-name}}

ERROR 1024 17:50:10.371289 retry_decorator.py] Retrying in 0.98 seconds ...
Traceback (most recent call last):
  File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/gcs_json_api.py", line 476, in SetBucketIamPolicy
    return self.api_client.buckets.SetIamPolicy(apitools_request,
  File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/third_party/storage_apitools/storage_v1_client.py", line 466, in SetIamPolicy
    return self._RunMethod(
  File "/usr/lib/google-cloud-sdk/platform/gsutil/third_party/apitools/apitools/base/py/base_api.py", line 737, in _RunMethod
    return self.ProcessHttpResponse(method_config, http_response, request)
  File "/usr/lib/google-cloud-sdk/platform/gsutil/third_party/apitools/apitools/base/py/base_api.py", line 743, in ProcessHttpResponse
    self.__ProcessHttpResponse(method_config, http_response, request))
  File "/usr/lib/google-cloud-sdk/platform/gsutil/third_party/apitools/apitools/base/py/base_api.py", line 609, in __ProcessHttpResponse
    raise exceptions.HttpError.FromResponse(
apitools.base.py.exceptions.HttpError: HttpError accessing <https://storage.googleapis.com/storage/v1/b/cmj-prod/iam?alt=json>: response: <{'x-guploader-uploadid': 'ABPtcPr8OXTNkxlClZmNUR5Y8toIFqGWzEZZ5Ue4pGS5x9p-AtEseQTuE8yc5J9SBv80_dNj9NT7TYuIdg', 'content-type': 'application/json; charset=UTF-8', 'date': 'Tue, 24 Oct 2023 17:50:10 GMT', 'vary': 'Origin, X-Origin', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'expires': 'Mon, 01 Jan 1990 00:00:00 GMT', 'pragma': 'no-cache', 'content-length': '476', 'server': 'UploadServer', 'status': '412'}>, content <{
  "error": {
    "code": 412,
    "message": "The member bindings allUsers and allAuthenticatedUsers are not allowed since public access prevention is enforced.",
    "errors": [
      {
        "message": "The member bindings allUsers and allAuthenticatedUsers are not allowed since public access prevention is enforced.",
        "domain": "global",
        "reason": "conditionNotMet",
        "locationType": "header",
        "location": "If-Match"
      }
    ]
  }
}
>

I've opened an issue ticket on GPanel for some more info, but I appreciate if anyone has any other ideas that could be tried. Cheers

To be able to import a default (base) DB to a new Firestore instance, through any means.

0

There are 0 best solutions below