FirebaseDB Realtime Database error

I am current working on an app for my school project. My goal is to display the data on Firebase realtime database to my App. My problem is that even though my firebase rule is public and has the correct URL on the FirebaseDB, it keeps sending an error saying " Error from companion: For a custom firebase host you must first set your authentication server before using authentication features." I tried doing some research and concluded that the FirebaseDB feature in MIT app inventor probably does not support URL's that ends with .app. Any ideas how to fix it?

Either:

In the Firebase Console, you need to at least visit the Authentication page

or

If using the AppInventor Firebase Component, your Firebase project needs to be on the us-central server. If you are using a different server, then you will need to create a new project on the us-central server.

Is Us-Central-server ok for me to use? Even though im at southeast asia. And also will the URL of the project on the us server end with an ".com"?

i already visited the authentication page and enabled anonymous users and email/password

Yes, it is the only server that works with the Firebase component.

The alternative is to use an extension, or the web component to access Firebase

If i use the project from us server, will it have problems because im at a different region or no?

No you will not have any problems, may just take data a few milliseconds longer.

Ok thanks. I will now try it

i tried it now and no error occured but new problem. The temperature sensed on my esp32 is uploading and being updated on the realtime database in firebase is suppose to be displayed on the app but no value occurs. Here is my blocks related to firebasedb:

image

Got any ideas?

Show your Firebase data and structure (from/in the console) and the project bucket you are using.

Is the app supposed to appear on Authentication and users? Cause i don't see the project bucket name on the users

image

Set your project bucket to temperature

Set your getValue block like this:

image

Should return the temperature value.

If that is all you need to do, and it works, then fine, if you are aiming to do more, some chagnes will be required.

You cannot use authenticated users / secure rules with the Firebase component.

Thank you for the effort, but projectbucket still wont appear in users and label remains "Temperature: 0C".

The very basics:

image

You won't see anything about users.

Thanks for your help. I did the basics and it the number 24.5 actually appeared so i wondered why it couldn't display the updating temperature on the app. But i also found that there are two temperature values in the database, on top is the result of the test and on the bottom in the data coming from the esp32. How do i make the data from the esp32 display on the app?
image

Project buckets are case sensitive, are you using temperature or Temperature ?

1 Like

You read my mind. Just as i changed the code from t to an uppercase the data remained as one and it now displays on the app

Thank you so much for the time and guidance!!!

2 Likes