I have a listener on a collection like this:
this.unsubscribe = firebase
.firestore()
.collection(
path/to/collection)
.where('field', '==', value)
.orderBy('field')
.onSnapshot(this.snapshotHandler, this.errorHandler);
When the device is offline snapshotHandler and errorHandler are not called, but i get this warning:
Possible Unhandled Promise Rejection (id: 0):
Error: Firestore: The service is currently unavailable. (firestore/unavailable).
How can i catch this type of errors? (offline device or similar)
N/A
N/A
React Native
version:React Native Firebase
library version:Firebase
module(s) you're using that has the issue:TypeScript
?N/A
ExpoKit
?ExpoKit
Do you think that puting your code in a try catch block could solve the problem ?
this.errorHandler
is only for listen error on the snapshot method.
Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.