Bug 427800

Summary: Handler exception when handling command FetchItems on connection Archive Mail Kernel ETM
Product: [Frameworks and Libraries] Akonadi Reporter: Adam Jimerson <vendion>
Component: serverAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: quazgar
Priority: NOR    
Version: 5.15.0   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:

Description Adam Jimerson 2020-10-16 13:18:41 UTC
SUMMARY
When deleting emails from Kmail2, sometimes a few seconds after deleting the email it shows back up in the message list. When trying to select the message again I see the following error in Kmail "Item query returned empty result set". Running akonadi in the forground with `akonadictl start` I see the following in the STDOUT/STDERR

<code>
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection Archive Mail Kernel ETM (0x803849960) : Item query returned empty result set
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection MailFilter Kernel ETM (0x803849880) : Item query returned empty result set
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection KMail Kernel ETM (0x803848000) : Item query returned empty result set
"Item query returned empty result set"
"Item query returned empty result set"
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection Archive Mail Kernel ETM (0x803849960) : Item query returned empty result set
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection MailFilter Kernel ETM (0x803849880) : Item query returned empty result set
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection KMail Kernel ETM (0x803848000) : Item query returned empty result set
</code>

STEPS TO REPRODUCE
1. Configure Kmail to connect to a mail server via IMAP (e.g. Gmail imap)
2. Delete emails from inbox, until one shows back up in the message list
3. Try to open the deleted email

OBSERVED RESULT

The deleted email shows up in the messages list as if it was read but not deleted. When trying to select the message an error is thrown.


EXPECTED RESULT

Deleted emails should stay deleted and should not show back up in the message list.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 12.1-RELEASE-p10
(available in About System)
KDE Plasma Version: 20.08.2
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Adam Jimerson 2020-10-19 12:45:19 UTC
(In reply to Adam Jimerson from comment #0)

> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: 12.1-RELEASE-p10
> (available in About System)
> KDE Plasma Version: 20.08.2
> KDE Frameworks Version: 5.74.0
> Qt Version: 5.15.0

Addendum to the above (I did not have the System Settings application installed on this system previously):

Operating System: FreeBSD 12.1
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.0
Kernel Version: 12.1-RELEASE-p10
OS Type: 64-bit
Memory: 31.9 GiB of RAM
Graphics Processor: Radeon RX 580 Series
Comment 2 quazgar 2023-02-10 09:03:55 UTC
I can confirm this behavior.

Depending on the operation, Akonadi may also say instead:

```
org.kde.pim.akonadiserver: Error while handling command ModifyItems on connection kontact-48271 (0x55ac6b7cfe80)
```

Versions:
  Linux: Debian Bullseye
  Kontact Version: 5.15.3 (20.08.3)
  KDE Frameworks: 5.78.0