Bug 353231 - Invalid item retrieved -> should specify which item and offer to fix problem
Summary: Invalid item retrieved -> should specify which item and offer to fix problem
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-27 09:56 UTC by quazgar
Modified: 2018-01-31 16:50 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 quazgar 2015-09-27 09:56:48 UTC
I recently mass-imported a lot of folders from an older Kmail installation into a fresh install, and it seems that a few messages either did not survive the import or were broken before already (I suspect the latter).  Now when trying to move the folders from the temporary place where I imported them to where they actually should go, some folders can not be moved with an error message "Unable to retrieve item from resource: Invalid item retrieved". (By the way, when this item happens to be in a subfolder of the folder, the error message is empty.)


Reproducible: Always

Steps to Reproduce:
1. Have a local mail folder with an invalid item inside.
2. Try to move the folder


Actual Results:  
An error message appears: "Unable to retrieve item from resource: Invalid item retrieved", the folder is not moved.

The akonadi output is:

"1078" 
posting retrieval request for item 260477  there are  1  queues and  0  items in mine 
request for item 260477 still pending - waiting 
processing retrieval request for item 260477  parts: ("RFC822")  of resource: "akonadi_maildir_resource_0" 
AkonadiAgentServer(3561) MaildirResource::maildirForCollection: Got incomplete ancestor chain: Collection ID: 910    remote ID: "" 
   name: "" 
   url: KUrl("akonadi://?collection=910") 
   parent: 895 "" 
   resource: "" 
   rights: QFlags(0x1|0x2|0x4|0x8|0x10|0x20) 
   contents mime type: () 
   isVirtual: false 
    CachePolicy:  
   inherit: true 
   interval: -1 
   timeout: -1 
   sync on demand: false 
   local parts: () 
    CollectionStatistics: 
   count: -1 
   unread count: -1 
   size: -1 
continuing 
request for item 260477 "" failed: "Unable to retrieve item from resource: <html>Invalid item retrieved</html>" 
ItemRetrieverException :  Unable to retrieve item from resource: <html>Invalid item retrieved</html>


Expected Results:  
Not sure what to expect, but see a few suggestions below.

KMail Version 4.14.8.

Suggestions what to do better:
- Just move the folder, keeping the invalid item and move its reference along, just output a warning (I am not sure if this is possible with the internal structure).
- At least output which item is invalid and where to find it, equivalently to the console output.  This allows the user to manually inspect and/or delete the item in the Akonadi console.
- Offer to the user directly the choice to delete/archive/restore the item, if possible.

I think that less than 1% of all users would be able to work the steps to do this manually: check output of ~/.xsession-errors, find ID of corrupt item there, then open akonadiconsole, find the item, delete it.
Comment 1 Denis Kurz 2017-06-23 20:18:52 UTC
This bug has never been confirmed for a Kontact version that is based on KDE Frameworks, except possibly a Technology Preview version 5.0.x. Those versions differ significantly from the old 4.x series. Therefore, I plan to close it in around two or three months. In the meantime, it is set to WAITINGFORINFO to give reporters the opportunity to check if it is still valid. As soon as someone confirms it for a recent version (at least 5.1, ideally even more recent), I'll gladly reopen it.

Please understand that we lack the manpower to triage bugs reported for versions almost two years beyond their end of life.
Comment 2 Denis Kurz 2018-01-31 16:50:31 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.1 aka 15.12, preferably more recent), please open a new one unless it already exists. Thank you for all your input.