I am getting bad experience

i am really getting bad experience.
when i use if then else block, i am getting both the result ,that is from then block and also from else block.
again i used else if, but the result is same, i am literally facing very bad problems
what should i do now? why its happening? is there any server problem?
and also the firebase db component is not working at all, my app users from playstore are complaining as the app not working, it was working fine yesterday.

Please elaborate your problem, and provide a screenshot of it.


here i have used teo if then else blocks. 1st is to check the username and 2nd is to check the password.
whenever i put the correct username and password then the label shows login successful and notifer shows Wrong username or password. how can it be possible? what wrong with this block? i have used this block for demo purpose

Impossible to debug without the contents of response content and the text boxes.

That loop looks suspicious.

i dont get it. whats wrong with this block? what should i do? Please help me Sir

In essence, because you are using for each, it will inevitably return both a true and at some point false value (because it iterates over all the values) Find the value you want first, then just work with that.

When you change the UI in a loop, don't see everything. You will only see the effect of the last pass of the loop. The If, else if, else block works fine, the rest is bad implementation and logic. We don't see what you get in responseContent, we don't see what you get in the PasswordtextBox.

Imagine you were a lawyer in court defending your blocks to a skeptical jury and a hanging judge.

Do that for everything you code.

P.S. In the Court of Logic, all code is considered guilty until proven innocent.

4 Likes

my response content after json text decode is like this [["01", ""01""], ["p", ""qwe""], ["er", ""rtrt"]]

ex- here p is username and corresponding password is qwe
now i got the logic and its working fine...
but what about firebase db, why it is not working?

:question:

You show now blocks with regard to Firebase ....

not getting the tag or value

Check you have your projectBucket set correctly

Or show your full firebase data structure

yes sir, the project bucket is correct, yesterday it was working fine but today some users told me that app is not working correctly so i checked it, the blocks were fine but the firebase not getting response. also check another two apps. same problem. please tell me how to solve this problem.

Do you have a FireBase Error event block, and is it set up to announce the error?

getting nothing

My guess is that you are still requesting a tag user that does not exist in the context you are setting. It is a guess because you do not show your data structure.

Capture
Capture

till yesterday it was working fine

What does Label60 in Screen4 have as its .Text in the Designer?

Is it also blank, like what you ask to be returned from FireBase if tag 'user' is not found?

That would make it hard to distinguish between a NOT FOUND return and a NEVER ANSWERED situation.

So your projectBucket in the Designer is set to blank/empty ?

See here:

when i connect to another wifi, the firebase is working fine. again i connect to the previous wifi then the firebase is not working. why is it so?