Skip to content

useStorageDownloadURL crashes when there is no file in firebase storage #535

Description

@kirilligum

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions