maemo.org Bugzilla – Bug 12337
Miniature UI can't handle incorrect FICS login
Last modified: 2011-09-18 07:52:52 UTC
You need to log in before you can comment on or make changes to this bug.
SOFTWARE VERSION: 0.3 in N9 EXACT STEPS LEADING TO PROBLEM: 1. Introduce credential in FICS login page. EXPECTED OUTCOME: - If credentials were right, the user should log in as identified user (not sure if this is working already). - If credentials were wrong, a dialog should popup and ask to retry. ACTUAL OUTCOME: No matter what, you get to SeekGame with the listing of apps. REPRODUCIBILITY: always
Assigning to me for the creation of the dialog.
(In reply to comment #0) > EXPECTED OUTCOME: > - If credentials were right, the user should log in as identified user (not > sure if this is working already). It does.
Created an attachment (id=3407) [details] Wrong FICS login UI Wrong FICS login UI Needs to be connected to backend. You can test it setting the variable loginCorrect = wrong in line 113. https://gitorious.org/miniature/miniature/commit/cad7ff13bf58dd1c9a6d98082e470cf1aafef38d
Renaming bug to reflect the current status. mikhas, can you connect the login button events to the backend, or explain me how to do it? Thanks.
Next item on list.
Fixed with commit b47f8af3f2e55457824270a3434e0235f0b984d7. Though perhaps the QML UI needs a bit more work here: When I login incorrectly the second time, it is already all red. Perhaps just have a red flash on incorrect login?
Reopening, since I can login with whatever wrong combination of ID & PSW. Copied from the console: FICS: ""Asfgjk" is not a registered name. You may use this name to play unrated games." FICS: "(After logging in, do "help register" for more info on how to register.)" FICS: "Press return to enter the server as "Asfgjk"" FICS: "" FICS: "**** Starting FICS session as Asfgjk(U) ****" Ok, I will look at the UI once I can see it working in a real case.
Added a spinner active during the login process: http://gitorious.org/miniature/miniature/commit/b6380119c2e4817f10d53b261feaaaf8aeaa1c0e There is a way to test wrong logins now: just try to login introducing one character in the login field. FICS won't digest that and the red background will show up. Now I see what you mean and I will fix it.
Now we have a 2s red flash instead of a permanent red state which, I agree, is a lot nicer: http://gitorious.org/miniature/miniature/commit/122392c0cdca84f2407fd57ec6277eded16d59f9 Also, thanks to this we can detect a bug now: 1. Introduce "q" and "q" as login and password. Press login. 2. FICS doesn't like very short IDs, so it will complain. Red flash animation comes. 3. Wait. Expected: nothing happens unless user tries to login again. Actually: A second red flash comes alone. Just one time, like an echo. Always. The console log: void Game::Frontend::Miniature::login(const QString&, const QString&) virtual void Game::Command::Login::exec(Game::Dispatcher*, Game::AbstractEngine*) 41 virtual void Game::Command::Login::exec(Game::Dispatcher*, Game::AbstractEngine*) 46 FICS: " _ __ __ __ " FICS: " | | / /__ / /________ ____ ___ ___ / /_____ " FICS: " | | /| / / _ \/ / ___/ __ \/ __ `__ \/ _ \ / __/ __ \" FICS: " | |/ |/ / __/ / /__/ /_/ / / / / / / __/ / /_/ /_/ /" FICS: " |__/|__/\___/_/\___/\____/_/ /_/ /_/\___/ \__/\____/ " FICS: " ^^__ _____________________ _ _ _ " FICS: " / - \_ / ____/ _/ ____/ ___/ _ | || || |" FICS: " <| __< / /_ / // / \__ \ (_) |_______|" FICS: " <| \ / __/ _/ // /___ ___/ / _ \__ ___ /" FICS: " <| \ /_/ /___/\____//____/ (_) |___|_|" FICS: " <|______\ |_|___|" FICS: " _|____|_ ====================================== |___|_|" FICS: " (________) freechess.org ---- 69.36.243.188 (_______)" FICS: " /________\ ====================================== /_______\ " FICS: " (Login screen designed by Alefith)" FICS: " ****** Welcome to the Free Internet Chess Server at freechess.org ******" FICS: "Webpage" FICS: " http" FICS: "//www.freechess.org" FICS: "Head admin " FICS: " Chessty Complaints to " FICS: " complaints@freechess.org" FICS: "Server location" FICS: " freechess.org Server version " FICS: " 1.25.17" FICS: " If you are not a registered player, enter guest or a unique ID." FICS: " (If your return key does not work, use cntrl-J)" FICS: "login" FICS: " " FICS: "A name should be at least three characters long! Try again." FICS: " If you are not a registered player, enter guest or a unique ID." FICS: " (If your return key does not work, use cntrl-J)" FICS: "login" virtual void Game::Command::LoginFailed::exec(Game::Dispatcher*, Game::Frontend::Miniature*) 36 Failed to login in with as "Q" virtual void Game::Command::LoginFailed::exec(Game::Dispatcher*, Game::Frontend::Miniature*) 36 FICS: " "
Ok, so it looks like the problem is simply that loginFailed Miniature should disconnect completely from FICS, right?
I've tried to fix this by doing: Connections { target: miniature onLoginFailed: { miniature.logout() ... But it doesn't disconnect. This dispatcher keeps coming once more. I better leave this to mikas.
(In reply to comment #11) > I've tried to fix this by doing: > > Connections { > target: miniature > onLoginFailed: { > miniature.logout() > ... > > But it doesn't disconnect. This dispatcher keeps coming once more. I better > leave this to mikas. Disconnect from FICS for every failed login? I am not sure I like that - it takes around 2-5 seconds or so to login to FICS. Simply need to debug why the failed login is reported twice (perhaps due to the failed password handling?)
Fixed echo with commit 116d1a7152a4ac0c910241ac49380e08f1bf3fc3 - forgot to stop a timer.
(In reply to comment #7) > Reopening, since I can login with whatever wrong combination of ID & PSW. > Copied from the console: > > FICS: ""Asfgjk" is not a registered name. You may use this name to play > unrated games." > FICS: "(After logging in, do "help register" for more info on how to > register.)" > FICS: "Press return to enter the server as "Asfgjk"" > FICS: "" > FICS: "**** Starting FICS session as Asfgjk(U) ****" > > Ok, I will look at the UI once I can see it working in a real case. Ahem, I missed that comment … FICS chooses to log you in as guest here - currently, Miniature cannot differentiate between guest logins and registered logins. So I either get a password prompt (valid username) or the guest login confirmation (invalid username) - and the latter should *not* log us in but produce a failed login message? Will look into that (REOPEN, of course).
(In reply to comment #12) > (In reply to comment #11) > > I've tried to fix this by doing: > > > > Connections { > > target: miniature > > onLoginFailed: { > > miniature.logout() > > ... > > > > But it doesn't disconnect. This dispatcher keeps coming once more. I better > > leave this to mikas. > > Disconnect from FICS for every failed login? I am not sure I like that - it > takes around 2-5 seconds or so to login to FICS. Simply need to debug why the > failed login is reported twice (perhaps due to the failed password handling?) Hah, I *have* to disconnect if FICS thinks it's a guest login, because there's no other way back to login prompt - you either press return (logs you in), or you quit … I *love* how the FICS protocol makes such trivial things as login so unreliable to handle. Well done, FICS.
Fixed guest login handling with abfbfbe2edd412d0e3768f51322c83103fc5c968. I need to apologize for my sloppiness: I think I only tested registered accounts previously. Thanks for taking bug verification serious!
Oh by the way (perhaps a new bug, as it is purely UX): 1. When entering username, enter key on virtual keyboard should bring you to password field, 2. when entering password, enter key on virtual keyboard should log you in. 3. After sending user credentials, UI should grey out login prompt until FICS response arrives (otherwise no visual feedback if login takes a bit longer, say, due to crappy internet connection).
(In reply to comment #17) > Oh by the way (perhaps a new bug, as it is purely UX): > 1. When entering username, enter key on virtual keyboard should bring you to > password field, > 2. when entering password, enter key on virtual keyboard should log you in. > 3. After sending user credentials, UI should grey out login prompt until FICS > response arrives (otherwise no visual feedback if login takes a bit longer, > say, due to crappy internet connection). Filed at https://bugs.maemo.org/show_bug.cgi?id=12375 The rest works as expected. Verifying. Thanks!