Runtime Error: Select list item: Attempt to get item number 1 of a list of length 0: ()

Hello, I am trying to create an app with Log in and Sign up pages with Firebase Database, after watching some tutorials on YouTube, I managed to create the pages.

Runing on Companion it gives me this error: “Runtime Error: Select list item: Attempt to get item number 1 of a list of length 0: ()” when I try to Log in.

The Sign Up page is working fine.

Can anyone help me solve it?

Welcome Carolina,

Have you searched the forum because your question has been asked many times before?

If you want help you have to give more information, in your case your blocks.

1 Like

Thank you for the advice!

I have searched on the forum and also on google and Youtube for help and tutorials, but I couldn’t fixed it, I tried to understand the problem and solved it, but after I did, something went wrong and I couldn’t Log in because the “password was wrong” even when it was right, so I tried to make everything again following the same tutorial and this was the result.

These are my blocks, I know that the wrong part is in the “verify_password_login” procedure, but I can’t solve it, just like I explained.

Your list is empty

bild

Since I’m not a Firebase guru but wonder if it is this one that causes the issue
bild

Thank you for the answer!

I don’t think that’s the issue, because in the first image I am calling the 1 value, and the first value is “password_Sign_up” so it should be working

Hello,
Your problem is: when you call Firebase, you set and empty list if the tag doesn’t exist. When Firebase get the value, if the user doesn’t exist, you are still trying to verify his password.

1 Like

Also, you need to be consistent. When creating New Account, you set the username to “Down-case” but when a user is login, you set it to “Uppercase”.

Try with that:


5 Likes

It is working!!! Thank you so much!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.