Bug 373402

Summary: kio-gdrive keeps asking for authentication if kwallet is not available
Product: [Frameworks and Libraries] kio-gdrive Reporter: evea <kde>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: CONFIRMED ---    
Severity: normal CC: 1238tal, duott.daenur, dutchgigalo, f.alexander.wilms, gennady.uraltsev, perfinstals, postix, travneff
Priority: NOR    
Version: 23.04.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description evea 2016-12-07 22:54:08 UTC
After authenticating for the second time (access to who you are and View your e-mail address). The second authentication screen keeps reappearing even though I approved the first time.

Tried the newest build and even compiled from git, can not access gdrive in version 1.0.4.
Comment 1 Elvis Angelaccio 2016-12-08 11:13:57 UTC
(In reply to evea from comment #0)
> After authenticating for the second time (access to who you are and View
> your e-mail address).

What do you mean exactly? You were trying to add another account?
Comment 2 evea 2016-12-08 12:43:52 UTC
(In reply to Elvis Angelaccio from comment #1)
> (In reply to evea from comment #0)
> > After authenticating for the second time (access to who you are and View
> > your e-mail address).
> 
> What do you mean exactly? You were trying to add another account?

After checking the systemlog I noticed the problem was that I did not have kwallet activated, an error message would be helpful.

Even though the problem is fixed for me, I will post how it looks like if kwallet is not active:

_______________
I don't have any account connected yet.

So lets say I want to use gdrive, I open it and am asked for authentication.
After entering my account details, I am asked to allow the following things:

Akonadi Resources for Google Services would like to:
View and manage the files in your Google Drive
View the files in your Google Drive
Know who you are on Google
View your email address
View and manage Google Drive files and folders that you have opened or created with this app
View metadata for files in your Google Drive

So I press allow. After 1 second the login screen opens once again (this time the user name is already entered). After logging in, I am asked for new permissions.

Akonadi Resources for Google Services would like to:
Know who you are on Google
View your email address

After pressing allow, the same login screen will appear again, this is a endless cycle.
Comment 3 Elvis Angelaccio 2016-12-08 14:35:31 UTC
Thanks for the explanation, I can reproduce if I keep kwallet closed.
Comment 4 Elvis Angelaccio 2017-01-28 15:04:32 UTC
*** Bug 375652 has been marked as a duplicate of this bug. ***
Comment 5 duott.daenur 2017-05-28 11:51:23 UTC
I also have this bug on KDE Neon User Edition. Launching KWallet makes it work
Comment 6 Andrew 2018-08-10 09:35:39 UTC
Have this on Fedora 28 x64.
Just can't connect an account on a fresh install: it loops endlessly asking for account selection.
Kwallet is disabled, however there are some lines like "Successfully activated service 'org.kde.kwalletd5'" from dbus-daemon in system log.

Installed from repo: kio-gdrive-1.2.0-3.fc27.x86_64
Comment 7 Andrew 2018-08-10 15:59:36 UTC
Enabling kwallet fixes it for Dolphin and Krusader.
kioclient5 still has this problem when trying to list the specific dir.
And prints only following for the root folder:

  $ kioclient5 ls gdrive://username@gmail.com
  username@gmail.com
  new-account
  .

kioclient (QT4 version) just doesn't understand the protocol:

  $ kioclient ls gdrive://username@gmail.com/video/childrenofhope-videos/
  kioclient(10053): couldn't create slave: "Unable to create io-slave:
  klauncher said: Unknown protocol 'gdrive'.
  "
Comment 8 1238tal 2023-09-29 19:18:17 UTC
I can confirm this bug still exists on KDE Plasma 5.27.8

If I disable kwallet by creating a .config file called kwalletrc
```
[Wallet]
First Use=false
Enabled=true
```
Then upon rebooting, google drive integration doesn't work. It loses authentication every time.
Comment 9 Tamburrino Roberto 2023-10-03 14:53:40 UTC
Dolphin with Kio-gdrive starts but stops when entering the email, it doesn't even ask for the password .This command found online " kioclient5 exec gdrive:/   " gives me:    kf.kio.core: KIO::get didn't emit a mimetype! Please fix the KIO worker for URL QUrl("gdrive:/")