Summary: | Empty Google username after successful login | ||
---|---|---|---|
Product: | [Frameworks and Libraries] KAccounts | Reporter: | Lance Haverkamp <Lance> |
Component: | KCM | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aspotashev, bhush94, bobbywibowo, bryan.stamour, ed38, elvis.angelaccio, ergonomic.code, esa1975, hpj, hulitolku, kitaev, marco_parillo, mauro.miatello, nicolas.fella, rikmills, saulfautley, sharky.tihiy, tremblay.bernard, wbauer1, wulf.richartz |
Priority: | NOR | ||
Version: | 19.08.0 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
See Also: |
https://gitlab.com/accounts-sso/signon-ui/issues/2 https://bugs.kde.org/show_bug.cgi?id=414010 |
||
Latest Commit: | https://commits.kde.org/kaccounts-integration/4600d32a1c063db62c371b422f26263d1e991b40 | Version Fixed In: | 19.12.3 |
Sentry Crash Report: | |||
Attachments: | blocked |
Description
Lance Haverkamp
2019-11-17 02:59:11 UTC
It seems I can reproduce this in KDE neon 5.17, Plasma 5.17.3, Frameworks 5.64.0, Qt 5.13.2. New Google accounts added from System Settings > Personalization > Online Accounts won't actually have their username appear either (Screenshot: https://i.fiery.me/bGl8.png). The account did not use 2FA. Can reproduce, something broke :/ Not a kio-gdrive bug. The problem is that kaccounts fails to add the Google account. Details of the issue at https://gitlab.com/accounts-sso/signon-ui/issues/2 Moving to kaccounts-provider for now. We need to figure out if the problem is on our side (kaccounts-provider) or is an upstream issue (signon-ui). I do receive an email from Google letting me know that "KDE KAccounts Provider was granted access to your Google Account" so the login actually works, from Google's perspective. Is it relevant that when I enter an incorrect password, I immediately fail (Wrong password. Try again or click Forgot password to reset it.), but when I enter a correct password, I get an empty Web authentication for google window, and when I close that window, I get and Unable to finish -- System Settings Module window with: There was an error while trying to process the request: Access grant not present (In reply to Marco Parillo from comment #5) > Is it relevant that when I enter an incorrect password, I immediately fail > (Wrong password. Try again or click Forgot password to reset it.), but when > I enter a correct password, I get an empty Web authentication for google > window, and when I close that window, I get and Unable to finish -- System > Settings Module window with: There was an error while trying to process the > request: Access grant not present I see the empty window a lot, I just keep hitting refresh/reload; I suspect that's unrelated. Tried again today and I could add my account without any issue. Weird. That's truly bizarre, it's working for me now, too. Something very weird was going-on there, as Google clearly thought is was working both before & now. Still not working for me. In addition to kio-gdrive and kaccounts-provider are there any other dependencies? (In reply to Marco Parillo from comment #9) > Still not working for me. In addition to kio-gdrive and kaccounts-provider > are there any other dependencies? Marco is correct, it seems only my KDE Neon (Stable Version 5.17.3)is working properly. My Kubuntu 18.04 LTS laptop is still failing. Manjaro KDE 18.1.4 kaccounts-providers not work. Not loggin in google accaount. Same for me. It seems the kde gdrive application is not yet approved by google. Can you do something for it. see printscreen at : http://imaginasys.fastmail.fm/gdrive_not_approved.png messages are in french. It just says that google connection is disabled for that application because it has not been verified by google yet. Created attachment 124655 [details]
blocked
Blocked by Google in Kubuntu 18.04 and 19.10. See message attached.
Possibly related to: https://bugs.kde.org/show_bug.cgi?id=415089 *** Bug 415696 has been marked as a duplicate of this bug. *** (In reply to Marco Parillo from comment #14) > Possibly related to: https://bugs.kde.org/show_bug.cgi?id=415089 Nope, the two issues are unrelated. Maybe the KCM should set some default name if the username cannot be retrieved for whatever reason? That would at least serve as a workaround, and should not be difficult to implement I suppose. PS: I'll post a workaround here as well, to be able to use kio-gdrive despite of this problem. - Run "sqlite3 ~/.config/libaccounts-glib/accounts.db" - Enter "select * from Accounts;" to get the id of the account - Enter "update Accounts set name="username" where id=1;" to set a username and it should work. (replace 1 with the actual id, the username is actually irrelevant and can be anything, it's just used to display the account in the settings and kio-gdrive) (In reply to Wolfgang Bauer from comment #18) > PS: I'll post a workaround here as well, to be able to use kio-gdrive > despite of this problem. > > - Run "sqlite3 ~/.config/libaccounts-glib/accounts.db" > - Enter "select * from Accounts;" to get the id of the account > - Enter "update Accounts set name="username" where id=1;" to set a username > and > it should work. (replace 1 with the actual id, the username is actually > irrelevant and can be anything, it's just used to display the account in the > settings and kio-gdrive) I maybe should add that the id is the first number in the output of the select statement. Thanks, Wolfgang, this workaround resolved this issue for me! I looked a bit more into this now. This is the code that sets the account name (in kaccounts-integration/src/jobs/createaccount.cpp, line : if (m_account->displayName().isEmpty()) { m_account->setDisplayName(info.userName()); } info.userName() is an empty string here, and that breaks things. But, this is only used for display purposes, not for the actual authentification (that's why the workaround in comment#18 actually works). So we could just use any other string here to fix this bug. Proof-of-Concept "patch": sed -i 's/m_account->setDisplayName(info.userName());/m_account->setDisplayName(QString("Account%1").arg(info.id()));/' src/jobs/createaccount.cpp That would set the account name to "Account123" or similar. (or maybe use QString("%1%2").arg(info.caption().arg(info.id()), that would give something like "google123" ;-) ) Of course one could also only do that if info.userName() is actually empty as well (i.e. what I suggested in comment#17). Small corrections: (In reply to Wolfgang Bauer from comment #21) > This is the code that sets the account name (in > kaccounts-integration/src/jobs/createaccount.cpp, line : I forgot the actual line number here, it's line #183 > (or maybe use QString("%1%2").arg(info.caption().arg(info.id()) A bracket is missing there, should be: QString("%1%2").arg(info.caption()).arg(info.id()) ;-) I uploaded a patch to phabricator: https://phabricator.kde.org/D27474 *** Bug 389784 has been marked as a duplicate of this bug. *** Git commit 4600d32a1c063db62c371b422f26263d1e991b40 by Wolfgang Bauer. Committed on 02/03/2020 at 20:55. Pushed by wbauer into branch 'release/19.12'. [CreateAccount job] Never set an empty name when creating an account At least when creating a google account, signon-ui isn't able to extract the username from the login page anymore since a couple of months (and newer versions ported to QtWebEngine don't even extract it at all anymore because it was considered to be too fragile, which apparently proved to be true...). This looks kind of broken, and actually made kio-gdrive useless as that doesn't even list accounts with an empty name. To fix it, set the name to some arbitrary string in the case that info.userName() is empty. FIXED-IN: 19.12.3 Differential Revision: https://phabricator.kde.org/D27474 M +6 -1 src/jobs/createaccount.cpp https://commits.kde.org/kaccounts-integration/4600d32a1c063db62c371b422f26263d1e991b40 *** Bug 414010 has been marked as a duplicate of this bug. *** *** Bug 418571 has been marked as a duplicate of this bug. *** |