How to delete akonadi_google_resource?

My old google resource configuration is broken and kmail can’t pop up authorization window for this specific account. For all other gmail account, the kmail can pop up a browser window to authorize account. But just for this specific account, it keeps saying unable to verify additional scopes no matter how I try to reconfigure it.

How can I delete cached google resources completely so I can start all over again?

You could try with the akonadiconsole tool which is usually an extra install.

On the first tab find the entry for the resource, right click and choose “remove agent”

Tried to reconfigure that, now my contacts and calendars are synced correctly. But for email, I still get the same error with no pop-up browser window to verify my account(just for this one, others seems working totally fine).

I think email is handled by a normal IMAP resource.

At least that is my setup for GMail

Yes. The problem is that on this computer, this specific Google account can’t pop-up authorize page and always notify me that “Failed to authenticate additional scopes”.

I just set another Google account, no problem at all.

I am sorry, I don’t follow.

Did you remove the resource that caused the issue or did you successfully reconfigure it and now have issued with another one?

I remove the resource successfully, but reconfiguration also fails. Create a new user account and configure under it, it works.

I don’t have issue with other Google account, just this one.

Relevant logs:

org.kde.kgapi: Bad request QUrl("https://accounts.google.com/o/oauth2/token?prettyPrint=false") , Google replied ' "{\n  \"error\": \"invalid_grant\",\n  \"error_description\": \"Bad Request\"\n}" '

I don’t know why, but it looks like it didn’t successfully pass through my username.

Here are two different logs:

Working:

org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f8c202d30f0) identified as "AgentBaseChangeRecorder - 94905792361888"
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f8c2025c9e0) )
org.kde.pim.google: void GoogleSettings::init() No username set

Not working:

org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f8b9c050cd0) identified as "SpecialCollectionsMonitor - 94165545450640"
org.kde.kgapi: Bad request QUrl("https://accounts.google.com/o/oauth2/token?prettyPrint=false") , Google replied ' "{\n  \"error\": \"invalid_grant\",\n  \"error_description\": \"Bad Request\"\n}"

I tried several Gmail account, only this one that was set on this computer before always fail.

Finally got it working by following method:

1.Create a new IMAP account with different username and end with @gmail.com

2.On the pop-up browser window, change the username in the url to the account that has problem(the username is after login_hint). Looks like this:&login_hint=username%40gmail.com, change the username here.

3.Change the username in kmail back to your own gmail account.

4.Login in in the web browser normally.

5.It now should begin to download email from Google serer.