Google Firebase firestore error. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9

Google Firebase firestore error.

Hay friends tomorrow I studied about Google firebase and firestore database. And tried my best to create a code https://code.sololearn.com/WdyqpbZsKb9J/?ref=app This code very very nicely when it was created but after that daily quota limit riches. So I made another account with another firebase I'd to maintain it but its limit also riched within no time . https://ibb.co/yNdr98H See the above image actually the reading data limit is reached see another image below https://ibb.co/1K5Nm40 So I want to ask 1). What is this reading limit 2). How it works 3). The most important thing. How can I prevent this type of frustrating problem. Help me please if you can . Fast 🙏🙏 And surprised to see only 111 peoples writen data there then how reads exceeded that much.

21st Jul 2020, 12:26 AM
Ayush Kumar
Ayush Kumar - avatar
17 Answers
+ 7
How are you reading the list of messages (exact process). Are you extracting the complete list at once or you are doing it one-by-one for each message. And I also saw setInverval in your code, are you doing it multiple times?
21st Jul 2020, 12:39 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 6
you can dm for security based things.
21st Jul 2020, 1:30 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 5
You can host it somewhere else and access it using script src+ some sort of integrity check that might not be reproducible. You might create an md5 digest of window.location.href(since it would be constant and unique for your code) and use it as a key to access your key (which is stored at a server).
21st Jul 2020, 1:20 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 5
Firebase itself is real-time, listening to a Web Socket alike signals. Once connection established, no need to use setInterval to get it again.
21st Jul 2020, 2:39 AM
Gordon
Gordon - avatar
+ 4
Maybe thats what caused so many read ops. Another very rare possibility is a DOS(very.rare.).
21st Jul 2020, 12:49 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 4
DOS(Denial Of Service) is a typical attack(by a hacker of course), in which the attacker overloads your host computer a lot of requests to it(humongous amount). Since your api keys are visible in your code it is possible that someone might have just copied the key and performed a DOS using it. Although chances of this is very rare as we dont encounter hackers on regular basis, and most of them wont do such mischief.
21st Jul 2020, 12:58 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 4
Hmm good I guess might have a solution to your visible key problem
21st Jul 2020, 1:13 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 4
Kkk. I am not expert Lord Dev. I dont know thse all things ☹☹
21st Jul 2020, 1:29 AM
Ayush Kumar
Ayush Kumar - avatar
+ 3
May be. Actually I am getting the whole data once Lord Dev and keep refreshing data by getting it again and again so that if anyone enters some value so it automatically get into the list. I think the setInterval is creating the problem as I read the data continually
21st Jul 2020, 12:47 AM
Ayush Kumar
Ayush Kumar - avatar
+ 3
Hmm but last time some one did using for loop added exexs of data Lord Dev ☹☹. I had seen my firestore that time . Actually it is my second account for firestore
21st Jul 2020, 1:04 AM
Ayush Kumar
Ayush Kumar - avatar
+ 3
That person unknowingly did an DOS😅. I still see daily quota error on your code. Then most probably the setInterval is causing the DOS.
21st Jul 2020, 1:08 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 3
Hmm may be let me fix it Lord Dev
21st Jul 2020, 1:09 AM
Ayush Kumar
Ayush Kumar - avatar
+ 3
I dont think so Lord Dev . Because I will need the key at any cost to proceed in my code. There is no alternative for it I think.
21st Jul 2020, 1:15 AM
Ayush Kumar
Ayush Kumar - avatar
+ 2
What is this DOS Lord Dev . ☹☹
21st Jul 2020, 12:50 AM
Ayush Kumar
Ayush Kumar - avatar
+ 2
Now take a look Lord Dev. I created a situation in which the code will only get refreshed when user add data. for its proper functionality we need to wait I think while it get data back .
21st Jul 2020, 1:12 AM
Ayush Kumar
Ayush Kumar - avatar
+ 1
Fixed Lord Dev. Have a look to my new code
21st Jul 2020, 3:18 AM
Ayush Kumar
Ayush Kumar - avatar