[kmail2] [Bug 339214] Starting KMail gives message "Could not create collection trash resourceId: 3 [MailCommon::Kernel::createDefaultCollectionDone, MailCommon::Kernel::emergencyExit]

Fabian Vogt bugzilla_noreply at kde.org
Wed Oct 2 22:19:04 BST 2024


https://bugs.kde.org/show_bug.cgi?id=339214

--- Comment #50 from Fabian Vogt <fabian at ritter-vogt.de> ---
(In reply to Knut Hildebrandt from comment #49)
> (In reply to Fabian Vogt from comment #48)
> > Resetting state to REPORTED, this clearly was not fixed.
> > 
> > (In reply to Knut Hildebrandt from comment #47)
> > > (In reply to Fabian Vogt from comment #44)
> > > > Here's how to manually fix the weirdness in the database without folder
> > > > remaining:
> > > > 
> > > > 1. Start akonadiconsole
> > > > 2. In the browser tab, right click on "Local Folders" -> "Trash"
> > > > 3. Open the Folder properties window
> > > > 4. In the "Attributes" tab, make sure it has "SpecialCollectionAttribute"
> > > > set to "trash". If necessary, change or create it.
> > > > 5. Start kmail again
> > > > 
> > > > This also applies if the error message is about drafts or other special
> > > > folder, just set the attribute on the matching folder instead.
> > > 
> > > Today I ran into that problem again, but can't solve it by either deleting
> > > the trash folder or following what these instructions. Thus I'm not sure, if
> > > it is caused by the same bug. 
> > > 
> > > Two things I did today. In an IMAP-Account I had set deleting trash after
> > > two weeks. I had done this before a while, but it was unset. And I upgraded
> > > the system and thus Kmail from 24.05.2 to 24.08.1 today.
> > > 
> > > BTW, when I set SpecialCollectionAttribute it is not persistent. After
> > > closing and reopening Akonadoconsole the had disappeared.
> > 
> > That's probably the issue, it needs to be properly saved. Any warnings or
> > errors in the journal?
> 
> Well, after starting Kmail - actually Kontact - I found this in
> Akonadi.error:
> 
> [CRITICAL] org.kde.pim.akonadiserver: DATABASE ERROR:
> [CRITICAL] org.kde.pim.akonadiserver:   Error code: "1062"
> [CRITICAL] org.kde.pim.akonadiserver:   DB error:  "Duplicate entry
> '6-trash' for key 'CollectionTable_parentAndNameIndex'"
> [CRITICAL] org.kde.pim.akonadiserver:   Error text: "Duplicate entry
> '6-trash' for key 'CollectionTable_parentAndNameIndex' QMYSQL: Der Befehl
> konnte nicht ausgeführt werden"
> 
> That suggested that something with the database was wrong, thus I stopped
> Akonadi and renamed it. After restarting Akonadi the database was rebuild
> and I could start Kmail - actually Kontact - with the drawback, that all my
> settings were lost ;-( Since this is unaccaptable I got back to the old
> database looking for another solution. Any idea? A suggestion how to fix the
> database?

Using the DB browser in akonadiconsole you'll have to delete the entry with
"name" trash and "parentId" 6 that has the higher id. Then follow the
instructions
to assign the specialcollectionattribute to the correct trash again.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list