-
Notifications
You must be signed in to change notification settings - Fork 407
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
cannot handle error from useFirestoreCollectionData #540
Comments
I have a similar issue with useFirestoreDocData and useFirestoreDocDataOnce. The error actually originates from the This error is also cannot be caught without a React Error Boundary. I think it would be better to pass in a flag like reactfire/src/SuspenseSubject.ts Lines 51 to 61 in 9754f86
Another approach could be to not set |
tagging @jhuleatt to hopefully increase visibility |
Bumping this as well. Crashing on |
Same here. Anyone have something on this? |
same |
|
Bump. I can't use this library either because of this issue. Wrapping the entire function body in a try/catch does allow you to catch the error but is not tenable. |
Bump, same here. |
Bump, when will this be fixed? |
Version info
React: 18.2.0
Firebase: 9.9.0
ReactFire: 4.2.2
Other (e.g. Node, browser, operating system) (if applicable):
Next.js 12.2.2
Test case
use
useFirestoreCollectionData
and handleFirebaseError: Missing or insufficient permissions.
Steps to reproduce
Expected behavior
The hook doesn't throw and the error is in
error
variableActual behavior
The hook throws and error cannot be handled without try catch (that should't be used?)
reactfire/src/useObservable.ts
Lines 120 to 134 in 9754f86
The text was updated successfully, but these errors were encountered: