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.
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
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.
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.
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
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.
Its akonadi_imap_resource freezing that causes the problem, killing or restarting this enables a new instance that works (for a while).