CloudDBError: Unexpected end of the stream

I'm trying to create a login/ register page. It was working fine whenever it got the email (tag) and name(value). But when I try and make it, so it gets 2 correct fields (email and password) it ends up with the error in title OR " CloudDBError: java.net.SocketExecption: Socket closed"

I have checked my internet connection. It was working when I let the blocks choose either the email OR password was correct (by adding an extra store value field - see disabled block in the SS). but I'm wanting it so the email AND password is correct.

And the AIA :
Les_Envies_TinyDB_Test.aia (1.3 MB)

MIT CloudDB working OK here....

image

Perhaps this has something to do with switching screens and data not being available ?

One potential issue you should correct is that while the global variable initializer allows you to reference components and their readable properties, the value will be fixed at the time the app is initialized (so likely it's the empty string). Really what you would probably want to do is instead construct your tag in the button click handler so that it reflects the values at runtime.

Second, you're encoding the password into the tag. This in theory could allow for collision attacks, e.g.:

User: example@store.co.uk
Pass: test

and

User: example@store.co
Pass: .uktest

would allow the second user to log in as the first user.

I played around with it more and tried local variables too, the same error comes up.

how do you suppose I fix this? I played around with it a bit more and am still getting the aame error.

here's the newer version, trying @TIMAI2 's idea

And then the login screen:

I tested your V2 aia.

Register and Login worked OK, no errors.

You are not switching screens correctly, which may lead to memory issues and app crashes.

This could all be done on one screen, using virtual screens (vertical or horizontal arrangements and visibility.)

Example

It's more so I can't get the cloudDB to recognise that the email and pass field need to be BOTH right, in order to log in, not just one or the other
.

Any clue on how to do that?

Something like this: