Reputation: 304
I got this error while developing a React application:
Uncaught (in promise) FirebaseError: Quota exceeded.
Below I wrote on which line in the console this error is shown:
const fetchProduct = async () => {
const querySnapshot = await getDocs(collection(db, "langcards-db"));
const arr = [];
querySnapshot.forEach((doc) => {
arr.push({
...doc.data(),
id: doc.id,
});
});
setData(arr);
setIsLoading(false);
//error in this line
}
useEffect(() => {
if(user){
fetchProduct();
}else{
setData([])
}
}, []);
useEffect(() => {
if(user){
fetchProduct();
}else{
setData([])
}
}, [user]);
useEffect(() => {
fetchProduct();
}, [data]);
I checked the console of the cloud firestore, and there are 52k read, I did not have so many requests because I only study and there are no clients and users. Most likely some of my code is not working correctly
Could this be a useЕffect
?
I made to track data changes in order to rerender quickly?
Upvotes: 0
Views: 1932
Reputation: 3908
You have run out of Firebase hits today please refer to quotas https://firebase.google.com/docs/functions/quotas
Upvotes: 2