reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

useStorageDownloadURL crashes when there is no file in firebase storage

Open kirilligum opened this issue 3 years ago • 4 comments

Version info

React: 17.0.2 Firebase: 9.6.6 ReactFire: 4.2.1 Other (e.g. Node, browser, operating system) (if applicable): nodejs v16.16.0

Test case

Steps to reproduce

in the code

  const storage = useStorage();
  const catRef = ref(storage, 'kyc/upload/wy_id');
  const { status, data: imageURL } = useStorageDownloadURL(catRef);

Expected behavior

if the file is not there, the status should reflect

Actual behavior

the website is blank and in the browser's console: Uncaught FirebaseError: Firebase Storage: Object 'kyc/upload/wy_id' does not exist. (storage/object-not-found)

kirilligum avatar Aug 03 '22 19:08 kirilligum

I'm seeing same issue.

steveoh avatar Dec 07 '22 03:12 steveoh

Same issue for me... Has anybody found a working solution for this by any chance?

adamkubina1 avatar Apr 04 '23 10:04 adamkubina1

I stopped using reactfire for this and used the base firebase constructs and it fixed a few issues in our app.

steveoh avatar Apr 04 '23 15:04 steveoh

the same..

prixrak avatar Jun 04 '23 13:06 prixrak