Can't configure Google account

Bug #1864627 reported by Mark Fraser
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kaccounts-integration
Fix Released
Medium
kaccounts-integration (Ubuntu)
Undecided
Unassigned

Bug Description

Adding a Google account in Kubuntu 20.04 either produces an empty window after entering email and password details or if it does work, there seems to be no way of reconfiguring the account.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: systemsettings 4:5.18.1-0ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-14.17-generic 5.4.18
Uname: Linux 5.4.0-14-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu18
Architecture: amd64
CurrentDesktop: KDE
Date: Tue Feb 25 09:30:35 2020
ExecutablePath: /usr/bin/systemsettings5
InstallationDate: Installed on 2020-02-25 (0 days ago)
InstallationMedia: Kubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
ProcEnviron:
 LANGUAGE=en_GB
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: systemsettings
UpgradeStatus: Upgraded to focal on 2020-02-25 (0 days ago)
XsessionErrors: (nvidia-settings:3664): GLib-GObject-CRITICAL **: 08:41:57.364: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Revision history for this message
In , LanceHaverkamp (lance-thehaverkamps) wrote :

SUMMARY
Using Kio Gdrive Online Accounts. Trying to set things up for first use. It goes through the motions, lets me click new account, connects to Google, Google asks for my username & password, then asks for 2FA code. Everything looks like it's going to work, but I can never get access to Google. The link that should appear in Dolphin for a specific Google account is never created. The only link in that ever appears in gdrive:/ is "new account"

I've tried this with both a Gsuite account, and a non-Guite account; neither works.

Using KDE Neon: Version 5.17.2
Also tried in Kubuntu 18.04 (LTS), exact same results

STEPS TO REPRODUCE
1. install kio-gdrive
2. In dolphin Network > Google Drive > New Account > Create > Google > Enter email > Enter Password > Enter 2FA > Allow > Done

OBSERVED RESULT
Newly authorized account does not appear in Dolphin under gdrive:/

EXPECTED RESULT
An icon in Dolphin under gdrive:/ to access your account

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Both KDE Neon & Kubuntu LTS
(available in About System)
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1
Also tried in Kubuntu 18.04 (LTS), from a different computer, exact same results

ADDITIONAL INFORMATION

I have verified that the google settings for my account do allow third-party app access.

Revision history for this message
In , Bobby-b (bobby-b) wrote :

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.

Revision history for this message
In , Elvis-angelaccio-o (elvis-angelaccio-o) wrote :

Can reproduce, something broke :/

Revision history for this message
In , Elvis-angelaccio-o (elvis-angelaccio-o) wrote :

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).

Revision history for this message
In , LanceHaverkamp (lance-thehaverkamps) wrote :

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.

Revision history for this message
In , Marco Parillo (marco-parillo) wrote :

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

Revision history for this message
In , LanceHaverkamp (lance-thehaverkamps) wrote :

(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.

Revision history for this message
In , Elvis-angelaccio-o (elvis-angelaccio-o) wrote :

Tried again today and I could add my account without any issue. Weird.

Revision history for this message
In , LanceHaverkamp (lance-thehaverkamps) wrote :

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.

Revision history for this message
In , Marco Parillo (marco-parillo) wrote :

Still not working for me. In addition to kio-gdrive and kaccounts-provider are there any other dependencies?

Revision history for this message
In , LanceHaverkamp (lance-thehaverkamps) wrote :

(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.

Revision history for this message
In , Hulitolku (hulitolku) wrote :

Manjaro KDE 18.1.4
kaccounts-providers not work.
Not loggin in google accaount.

Revision history for this message
In , Bernard Tremblay (tremblay-bernard) wrote :

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.

Revision history for this message
In , Rik Mills (rikmills) wrote :

Created attachment 124655
blocked

Blocked by Google in Kubuntu 18.04 and 19.10. See message attached.

Revision history for this message
In , Marco Parillo (marco-parillo) wrote :
Revision history for this message
In , Andrius (andriusmao) wrote :

*** Bug 415696 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Elvis-angelaccio-o (elvis-angelaccio-o) wrote :

(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.

Revision history for this message
In , Wbauer (wbauer) wrote :

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.

Revision history for this message
In , Wbauer (wbauer) wrote :

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)

Revision history for this message
In , Wbauer (wbauer) wrote :

(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.

Revision history for this message
In , Kitaev (kitaev) wrote :

Thanks, Wolfgang, this workaround resolved this issue for me!

Revision history for this message
In , Wbauer (wbauer) wrote :

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).

Revision history for this message
In , Wbauer (wbauer) wrote :

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())
;-)

Revision history for this message
In , Wbauer (wbauer) wrote :

I uploaded a patch to phabricator:
https://phabricator.kde.org/D27474

Revision history for this message
Mark Fraser (launchpad-mfraz) wrote :
Revision history for this message
Mark Fraser (launchpad-mfraz) wrote :

There is also no way of removing my Google account after setting it up.

Rik Mills (rikmills)
affects: systemsettings (Ubuntu) → kaccounts-integration (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kaccounts-integration (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Nicolas-fella (nicolas-fella) wrote :

*** Bug 389784 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Wbauer (wbauer) wrote :

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

Revision history for this message
In , Wbauer (wbauer) wrote :

*** Bug 414010 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Elvis-angelaccio-o (elvis-angelaccio-o) wrote :

*** Bug 418571 has been marked as a duplicate of this bug. ***

Changed in kaccounts-integration:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Franco (francogpellegrini) wrote :

still broken

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.