If you are a App Inventor 2 user or you use any other platforms like Kodular,Appy Builder and Thunkable you need this before using Firebase component.

I use Firebase database and found 2 importand bugs.I have created a bug report you can check here

There is a bug with append value and project bucket :/

https://github.com/mit-cml/appinventor-sources/issues/1404

Did you exceed your free plan download limit?

https://github.com/mit-cml/appinventor-sources/issues/1510

Lets talk about the first problem.

If you are use Append value and change project bucket its causes bug.Like first issue.So there is first rule!

Do not use Firebase.Append Value and Firebase. Change Project bucket at the same time.!

Second problem is firebase download usage.Its really importand bug for highly downloaded apps.

Problem

Who have 2 screen and one has a firebase component.There is no problem with it.There is problem with switching to other screen.If you switch to other screen Firebase component make 2 bug-operation.Firebase trying to get FirebaseURL and FirebaseURL+ProjectBucket.So if you set Firebase URL to root its trying get all of database.

Firebase Database Profiller Result! (Project bucket = Firebases)

Downloaded Bytes

┌────────────┬─────────┬───────┬───────────┐

│ Path │ Total │ Count │ Average │

├────────────┼─────────┼───────┼───────────┤

│ / │ 2.94 MB │ 5 │ 587.33 kB │

├────────────┼─────────┼───────┼───────────┤

│ /Firebases │ 0 B │ 5 │ 0 B │

└────────────┴─────────┴───────┴───────────┘

Uploaded Bytes

┌──────┬───────┬───────┬─────────┐

│ Path │ Total │ Count │ Average │

└──────┴───────┴───────┴─────────┘

Unindexed Queries

┌──────┬───────┬───────┐

│ Path │ Index │ Count │

└──────┴───────┴───────┘

Lets think about it.Your database size is 1MB.You have 50 active daily user.Each user switch screens 5 times.

Lets calc

1*50*5 MB = 250MB for each day. You have 10GB Free plan limit so you have 10000MB and your daily usage is 250MB

10000/250= You have 40 Days Its okey there is no problem with the it.But whats happen if your or switching screens operations number increase ?

Here my  experience 🙂

Free plan limit exceed 🙂

How to fix this issue?

If your platform support changing firebase url block use it!.

Dont forget yout default firebase url to FirebaseURL+dummyvalue.If you add this dummy value to your Firebase URL its fix our problem.Firebase try get dummyvalue and dummyvalue+projectbucket (they are empty so its not download anythink)

And here result after applying fix!

So second rule is!

Do not forget use firebase url trick!

Have a nice day 😉