Connection with Firebase doesn't work

Why I can’t make my firebase db work with my app? I’ve inserted api and url, but can’t either save a user with signup form or save any data in real-time db. I used blocks exactly as in tutorials!
Please help!

Show your blocks.

for sign up

and for saving data

A few thoughts:

  1. Verify in Firebase, under authentication, that the email address submitted using the signup call was added to firebase
  2. Make sure you complete the verification process by following the link sent to the email address used to sign up
  3. Be sure to use the Sign in Block (different from the sign up block) before trying to use the save block
  4. In the “then do” section of the SAVE block, display the results of the ERROR block, but displaying it (like in the “sign in result label” ).
  5. What is the error message returned by the SAVE block?
1 Like

Hi! Thanks for helping me out

  1. you mean this?

  2. I don’t even receive any email as well as any error…

  3. You mean that the current user should be signed in in order to save data in real time db?

  4. So, I got a message PERMISSION_DENIED


  1. When I changed rules in Firebase from “auth != null” to “true” the message became “undefined” and it works

Glad it is working, but be careful, you have opened your database to all public access. Not only can that be a security threat, google will start sending you emails that the database is unsecured.

Under Authentication, there should be a Users Section. If not, there may have been an issue with your sign up block.

Happy Thunking!

1 Like

Well, I’ve changed the blocks to these:

Also, local storage has been added and it works fine now as sing up as sign in.

So, I assume signup and signin calls must be on the same screen?

Anyways thanks a lot!

Glad you got it to work!

A few tips, you may discover some challenges with your use of local storage blocks. Those are asyncronous calls. This means that the Save “password” block with NOT wait for the Save “email” block to finish. If you NEST these block inside one another,they will wait.

The technique you used looks a lot like the way I stored data in MIT App Inventor 2. Thunkable actually has variables with “APP” and “STORED” scope, which are synchronous blocks and make reading the blocks a lot easier. Just something to think about for the future.