Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛] After new Firebase Update starting October 2024 Storage no longer points to right bucket by default #8123

Closed
al3xstathis opened this issue Nov 9, 2024 · 5 comments
Labels
Template type: bug New bug report

Comments

@al3xstathis
Copy link

al3xstathis commented Nov 9, 2024

According to this link there are now new firebase storage bucket URLs and some changes are happening to the legacy ones. Firebase Announcement

When i tried to upload a file using the Storage package i ran into a problem where the file wouldn't upload even if there were no storage rules on the bucket. [Error: [storage/object-not-found] No object exists at the desired reference.]

Looking into it more i logged the storage().ref('filepath...') and the link of the bucket was gs://project-name.appspot.com but in firebase my buckets URL is gs://project-name.firebasestorage.app.

I'm not sure what change needs to be done on the Storage package side but i believe this will start happening more for newly created storage buckets.

Workaround for me was to use storage().refFromURL(`gs://project-name.firebasestorage.app/${folder}/${filename})

@mikehardy
Copy link
Collaborator

Hi there! Could you open a fresh issue but this time include the information requested in the template so we know what versions are in use here? A sample code we could install as an onClick handler for repro would be appreciated

We don't appear to be doing anything directly in code with bucket names, the bucket default is taken from the plist/json configuration files downloaded from firebase web console - https://github.com/search?q=repo%3Ainvertase%2Freact-native-firebase+appspot.com&type=code (all the hits there are related to manual init testing, secondary bucket testing init manually, and bucket name comparison in testing - none of it appears to be "while interacting with SDKs, do something with the bucket name...")

@mikehardy
Copy link
Collaborator

possibly of interest - our e2e tests are running against the local firestore emulator but I believe it's possible to alter them to run against the cloud APIs, that might be a way to reproduce this in our e2e tests if there is a problem in the module here

@Maxoos
Copy link
Contributor

Maxoos commented Nov 11, 2024

Can confirm that changing the url to firebasestorage.app in your GoogleService-Info.plist and google-services.json will fix the issue.

@tvuquoc17a
Copy link

tvuquoc17a commented Nov 21, 2024

I've put the right link of the bucket and dowloaded newest google-service file from console but this error ([Error: [storage/object-not-found] No object exists at the desired reference.]) still appear. Anyone have idea ?. I'm tried to list all item in my bucket but faced this ([storage/unknown] Please use a gs:// URL for your Firebase Storage bucket.). I used the 'gs' link

@tvuquoc17a
Copy link

I've put the right link of the bucket and dowloaded newest google-service file from console but this error ([Error: [storage/object-not-found] No object exists at the desired reference.]) still appear. Anyone have idea ?. I'm tried to list all item in my bucket but faced this ([storage/unknown] Please use a gs:// URL for your Firebase Storage bucket.). I used the 'gs' link

Problem solved, I upgraded version of all firebase in my project (to 21.5.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Template type: bug New bug report
Projects
None yet
Development

No branches or pull requests

4 participants