Reputation: 1914
In my project I have the default bucket and an extra bucket.
When trying to add a new bucket everything seems ok, but if I try to access it from the Firebase Console is gone. It is not listed.
However if I go the the Google Cloud Console the bucket is there, but I can not access it from my app nor from the Firebase console.
If I try to access the bucket from my application I get this error:
Caused by: java.io.IOException: { "error": { "code": 400,
"message": "Permission denied. Could not access bucket ubvplayersdata. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources.", "status": "ACCESS_BUCKET" }}
I'm using rules version 2 in order to list buckets and on the Blaze plan.
The gs for the bucket: gs://ubvplayersdata
What am I missing?
EDIT:
The link in this answer made me realize that there was no [email protected]
with Storage Admin
role in the Google Cloud Console, but even after setting them manually, nor trying to import the bucket from Google Console to Firebase Console, still doesn't work.
UPDATE: After contacting Firebase Support they told me that after a fix on their backend the issue was indeed fixed.
Upvotes: 2
Views: 7605
Reputation: 1407
I'm not sure about the console, but from the app try to specify the name of the new buckets other than the default one:
// Get a non-default Storage bucket
FirebaseStorage storage =
FirebaseStorage.getInstance("gs://my-custom-bucket");StorageActivity.java
here you can read more about this
Make sure you set the security rules for the new bucket! Here a link that might help:
add the missing permission in the IAM & Admin
Upvotes: 1
Reputation: 317467
You will need to import the bucket created in the Cloud console for use with Firebase, otherwise it will not show in the Firebase console, and you won't be able to access it from mobile clients.
In the Firebase Storage object browser (Firebase console):
Upvotes: 2