3

I have a Google App Engine Standard project, let's call it my-project. (Not it's real id.) It is located at: my-project.appspot.com

It has a default GCS bucket with the same name. Using a browser I can view the bucket at: https://storage.googleapis.com/my-project.appspot.com (So-far, so good!)

The Google documentation states:

Note: When you create a default bucket, you also get a staging bucket with the same name except that staging. is prepended to it. You can use this staging bucket for temporary files used for staging and test purposes; it also has a 5 GB limit, but it is automatically emptied on a weekly basis.

However, I can not see a staging. bucket in my project console.

Using a browser, if I try to visit my staging bucket at: https://storage.googleapis.com/staging.my-project.appspot.com

I get the following error message:

<Error>
   <Code>NoSuchBucket</Code>
   <Message>The specified bucket does not exist.</Message>
</Error>

Could someone let me know if the Google documentation is in error, otherwise could you please let me know where I can find my staging bucket?

3
  • Default buckets are listed on the GAE app settings in the developer console. My (older) project doesn't have the mentioned bucket, the note might be applicable only for projects/buckets created after this feature was introduced. Commented May 2, 2018 at 16:41
  • Just to make absolutely sure: it is assumed you had activated the default Cloud Storage bucket for your app by clicking Create under Default Cloud Storage Bucket in the App Engine settings page for your project.
    – George
    Commented May 2, 2018 at 19:27
  • This project was created in the cloud console about 18 months ago, it's been idle while creating the backend in the local developer SDK, so I don't recall specifically activating any buckets.
    – Brian
    Commented May 3, 2018 at 12:04

3 Answers 3

3

The staging.my-project.appspot.com bucket should have been created indeed when you initialized your App Engine application. You may have deleted it inadvertently or there may have been an issue during initialization but anyway, you have several options to recover it:

  • From command-line with Cloud SDK installed and initialized with your project (or directly from Cloud Shell), run the gcloud beta app repair command. This will restore required App Engine features like the App Engine service account if it has been deleted or any missing default Storage buckets, in this case the staging.... one.
  • Deploy a new App Engine version via gcloud app deploy. Under the hood, Cloud SDK will run the repair command if needed to restore the bucket.
1
  • I tried the gcloud beta app repair command, worked great! I can now see my staging bucket. Thanks @LundinCast !
    – Brian
    Commented May 3, 2018 at 12:10
1

It should be accessible at https://console.cloud.google.com/storage/browser/staging.my-project.appspot.com?project=my-project

Or you can go https://console.cloud.google.com/storage/browser?project=my-project and locate it from here.

One interesting thing - for my staging bucket TTL set for 14 days not for 7 as specified in documentation.

1
  • The first location shows the following error message in the bucket list instead of any buckets: "You need the storage.objects.list permission to list objects in this bucket. Ask a project or bucket owner to give you this permission and try again." This is weird, since I am the sole owner of this project this message makes no sense to me. (Could this be a GCP bug?) The second location shows only the default bucket in the bucket list, no staging bucket.
    – Brian
    Commented May 3, 2018 at 12:08
0

For others who have encountered this issue, there may be a more obvious solution.

I had a similar issue as the OP with a lapsed "proof-of-concept" project. But the suggested solutions had no effect.

On further investigation, I noticed that billing has not been enabled for the project. Once I linked the project to a billing account, the associated cloud buckets were automatically created.

1
  • This is. bad and can lead to unexpected costs
    – NelsonGon
    Commented Jun 13 at 14:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.