Problem FirebaseDB - Screen change

Hello everyone,
I'm running into an issue with FirebaseDB.
I created a small test app that reads and writes data to FirebaseDB.
On Screen1, I can read and write data to the database without any problems.
However, when I switch to Screen2 and try to read data from the database, the screen displays, but none of the buttons respond when clicked!
If I launch the screens individually (using the Companion), they work fine! Is there something I need to initialize in the blocks to prevent this freeze-up?

Thanks in advance. (Google translate! sorry)

  1. Let us assume you are using AppInventor AI2 ?
  2. Are you using the AppInventor native Firebase component?
  3. Are you using AppInventor's provided Firebase project, or your own project?
  4. Can you show us images of your relevant blocks on each screen, and images of the designer setup for each screen?

Hello,
Yes, I am using the web-based version of the application: https://ai2a.appinventor.mit.edu
Yes, I am using the app's native component.
What do you mean by "Are you using App Inventor's provided Firebase project, or your own project?" It is a project I created myself.
It is a very simple setup, as I encountered this issue on another, larger project. To verify the problem, I put together a small arrangement of blocks; it is very simple, but when switching from Screen1 to Screen2, all the buttons become inactive! Even the Notifier doesn't trigger!
Thanks for your interest.

Where is each Firebase DB hosted?

Needed to see the panel on the right, for each screen:

1 Like

Just run a test, not having any issues switching screens and returning a value here,using companion

Hello,
Thank you for your help.
The databases are on Google's Firebase site!

That's crazy! I can't get it to work at all! What on earth could I have done to make it not work here?

The FirebaseToken and FirebaseURL are the same on both screens. I got them from the Firebase website when I created my project!

Try deleting the API key from both FirebaseToken boxes, you do not need it.

image

Also check that your firebase url ends with an / on both screens

Also confirm that you are using the Firebase us-central server for your project.

firebase url ends with an / on both screens = OK

I tried removing the FirebaseToken and using just the URL, but that doesn't work either.
I am on the European server (europe_west1).

I don't understand!! What's the problem? I've spent two days online trying to figure out the reason!! Even ChatGPT can't solve it!!

Create new project on us-central server. The Firebase component has so far only worked with that server.

I even compiled an APK to check, and upon launch, the screen just freezes on a blank white display! When I run the test, I can read the data on the Firebase website, but as soon as I switch to Screen 2... nothing works anymore!
Okay, I'll try creating a new project in Firebase on a US server. I'll let you know how it goes. Thanks for your help.

If that fails, then I suggest this, it always works, with any firebase server:

Use the Firebase RealtimeDatabase REST api with the AppInventor Web component.

You're a lifesaver!! It works on the US server! I can't believe it! It was just a server issue! I can hardly believe it.

A very sincere thank you, because I was starting to doubt my skills! I don't know if anyone else has had this problem, but I hope my post helps others!

That's crazy! I'm going to teach it to ChatGPT.:grin:

That leads me to another question: is it better to work with FirebaseDB or CloudDB? Since it wasn't working with Firebase, I rebuilt my project using Cloud.