Bug 389682 - Kmail stops collecting gmail
Summary: Kmail stops collecting gmail
Status: REOPENED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.5.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-31 11:18 UTC by davidblunkett
Modified: 2018-05-07 21:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davidblunkett 2018-01-31 11:18:36 UTC
I cannot pin this bug down directly but kmail starts fine, accesses my gmail account fine but after sometime it simply stops receiving any new mail.

At this point I have to restart akonadi somehow, maybe log out and log back in or use akonadiconsole and fool it into thinking I've made a config change so the "restart" button becomes active after which everything springs back to life and my stack of emails is received.

This silly dance is usually required once or twice a day and is really very tedious. The problem is indicated by no mail and the IMAP mail indicator just hanging showing no progress and then vanishing.
Comment 1 davidblunkett 2018-02-07 11:16:59 UTC
Having restarted akonadi 3 times today I think these messages spewing over my console help identify the problem: 

[SASL-XOAUTH2] - Requesting authID![SASL-XOAUTH2] - Requesting token
![SASL-XOAUTH2] - filling prompts
![SASL-XOAUTH2] - Requesting authID![SASL-XOAUTH2] - Requesting token
!org.kde.kgapi: Unauthorized. Access token has expired or is invalid.
[SASL-XOAUTH2] - Requesting authID![SASL-XOAUTH2] - Requesting token
![SASL-XOAUTH2] - filling prompts
![SASL-XOAUTH2] - Requesting authID![SASL-XOAUTH2] - Requesting token
!org.kde.pim.akonadicore: Deleting items from the akonadi database failed: "No items found"
org.kde.pim.akonadicore: Deleting items from the akonadi database failed: "No items found"
org.kde.kgapi: Unauthorized. Access token has expired or is invalid.
[SASL-XOAUTH2] - Requesting authID![SASL-XOAUTH2] - Requesting token
![SASL-XOAUTH2] - filling prompts
![SASL-XOAUTH2] - Requesting authID![SASL-XOAUTH2] - Requesting token
!org.kde.pim.kimap: sasl_client_step failed with: -1 "SASL(0): successful result: "
qt.network.ssl: QSslSocket::startClientEncryption: cannot start handshake on non-plain connection
org.kde.pim.kimap: Connection to server lost  0
org.kde.pim.imapresource: Session login cancelled
Comment 2 davidblunkett 2018-02-09 13:43:38 UTC
This is getting worse - akonadi needs restarting several times a day to get my mail and I'm seeing this error on restart:

Application: No such method 'agentName' in interface 'org.freedesktop.Akonadi.AgentManager' at object path '/AgentManager' (signature 'ss') (akonadi_baloo_indexer), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

I don't think it is relevant to the main problem but it is littering up the screen.
Comment 3 davidblunkett 2018-04-24 09:23:30 UTC
I think this is working once more:

Solution delete gmail account and put it back: so far 24 hours without a restart needed which is a record for the past few months.
Comment 4 davidblunkett 2018-05-03 21:13:40 UTC
While the frequency of akonadi reboots has gone down this bug is not fixed.

-- sometimes I can make it restart by ticking and unticking an option in the settings for the account, this kills the frozen connection and when it restarts things work again.

-- sometimes it requires akonadictl restart to reboot as before

There are a rash of imap not working reports 

Bug 393795
Bug 387876
Bug 377877
Bug 382253

which may be related but it isn't clear
Comment 5 davidblunkett 2018-05-04 10:28:11 UTC
Sopped twice already this morning.

Deleted the gmail account and started again - worked fine although took a <long> time to sync.

An hour later and it is dead, again.
Comment 6 davidblunkett 2018-05-07 21:07:57 UTC
Its

akonadi_imap_resource

freezing that causes the problem, killing or restarting this enables a new instance that works (for a while).