Bug 500358 - kmail stuck indefinitely when trying to load a remote mail
Summary: kmail stuck indefinitely when trying to load a remote mail
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.3.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-18 23:19 UTC by tusooa
Modified: 2025-02-18 23:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2025-02-18 23:19:57 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Loading a remote mail via IMAP causes kmail to stuck for a very long time, as well as blocking other actions.

STEPS TO REPRODUCE
1. have an IMAP account
2. start kmail and try to load one mail from the remote folder
3. 

OBSERVED RESULT
The UI is filled with the placeholder "Retrieving Folder Contents
Please wait..."

If I go on and try to load a local mail, it will not load. If I restart kmail and load local mails first, it does load.

akonadictl console logs

org.kde.pim.akonadiserver: ItemRetrievalJob for request 26 finished with error: "Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
ProtocolException thrown:Failed to write all data
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection kmail2-2458638910 (0x55ac2eec8e50) : Unable to fetch item from backend (collection -1) : Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
org.kde.pim.akonadiserver: ItemRetrievalJob for request 47 finished with error: "Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection kontact-816255508 (0x55ac2eef6060) : Unable to fetch item from backend (collection -1) : Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
org.kde.pim.akonadiserver: ItemRetrievalJob for request 50 finished with error: "Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection MessageViewer-94648823667984 (0x55ac2eec8200) : Unable to fetch item from backend (collection -1) : Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

EXPECTED RESULT
(1) the remote mail should load
(2) even if there is a problem causing the remote mail to not load, it should not block other actions (e.g. looking at local mail)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 6.6.74-gentoo-x86_64
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.1
**kmail 24.12.2**

ADDITIONAL INFORMATION
Comment 1 tusooa 2025-02-18 23:31:06 UTC
Ok, it gets stuck because I did not open KWallet properly. But still, KMail should display a message about this and accessing local mail should still not be blocked.