Bug 278068 - Outbox directory is no longer created, which causes an startup error for KMail
Summary: Outbox directory is no longer created, which causes an startup error for KMail
Status: RESOLVED NOT A BUG
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Dispatcher Agent (show other bugs)
Version: 4.8
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 07:55 UTC by Raymond Wooninck
Modified: 2011-07-19 12:19 UTC (History)
2 users (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 Raymond Wooninck 2011-07-19 07:55:02 UTC
Version:           4.8 (using Devel) 
OS:                Linux

In the last week I had some instability of Plasma-desktop and krunner. Both issues seemed to be related to the connectivity to the calendar and contacts data (Plasma-desktop crashed due to the digital clock plasmoid and krunner crashed based on the contacts runner). 

I wiped out the full Akonadi setup for my local user (wiped the directories $HOME/.local/share/akonadi, $HOME/.local/share/local-mail, $HOME/.local/share/.local-mail.directory, $HOME/.config/akonadi and the akonadi configuration files from $HOME/.kde4/share/config). 

I started akonadi through akonadictl startup and everything seemed to be fine. Starting Kmail to define my email accounts however gave the error : "KMail encountered a fatal error and will terminate now. The error was: Failed to fetch the resource collection." 

Further checking learned that the directory $HOME/.local/share/.local-mail.directory is missing and this would be the outbox. The "local folders" resource is created fine ($HOME/.local/share/local-mail). 

Deleting the akonadi resources "Mail Dispatcher Agent" and "Local Folders" and then to add them again, does not resolve the issue. 

I am currently using the latest git for KDE (including Akonadi-runtime and kdepim), but talking to the openSUSE KDE Maintainers this problem also occurs with KDE 4.7 rc2.

Reproducible: Always

Steps to Reproduce:
Setup Akonadi for the first-time. 

Actual Results:  
Missing outbox that causes KMail to crash

Expected Results:  
The folder that contains the outbox is created
Comment 1 Christophe Marin 2011-07-19 10:32:02 UTC
A quick test with a new user and (almost) the same kdepim-runtime version didn't reveal anything.

from the .xsession-errors:

void Akonadi::NotificationSource::addClientServiceName(const QString&) Notification source "AkonadiAgentServer" now serving: (":1.55", ":1.56", ":1.57") 
Agent instance created in separate process. 
Database "akonadi" opened using driver "QMYSQL" 
AkonadiAgentServer(21562)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
akonadi_maildispatcher_agent(21532)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
akonadi_maildispatcher_agent(21532) OutboxQueue::Private::localFoldersChanged: Changed outbox to 4
akonadi_maildispatcher_agent(21532) OutboxQueue::Private::initQueue: Fetching items in collection 4
akonadi_maildispatcher_agent(21532) OutboxQueue::Private::localFoldersChanged: Requesting sent-mail folder
akonadi_maildispatcher_agent(21532) OutboxQueue::Private::localFoldersChanged: Requesting sent-mail folder
AkonadiAgentServer(21562) MaildirResource::maildirForCollection: Got incomplete ancestor chain: Collection ID: 4    remote ID: "" 
   name: "outbox" 
   url: KUrl("akonadi:?collection=4") 
   parent: 3 "/home/akonadi/.local/share/local-mail" 
   resource: "akonadi_maildir_resource_0" 
   rights: QFlags(0x1|0x2|0x4|0x8|0x10|0x20) 
   contents mime type: ("message/rfc822", "inode/directory") 
    CachePolicy:  
   inherit: true 
   interval: -1 
   timeout: 1 
   sync on demand: true 
   local parts: ("ENVELOPE") 
    CollectionStatistics: 
   count: -1 
   unread count: -1 
   size: -1 
AkonadiAgentServer(21562)/akonadiresource (maildir) MaildirResource::collectionAdded: () ()
AkonadiAgentServer(21562)/akonadiresource (maildir) MaildirResource::collectionAdded: ("outbox") ()
akonadi_maildispatcher_agent(21532) OutboxQueue::Private::collectionFetched: Fetched 0 items.
AkonadiAgentServer(21562)/akonadiresource (maildir) MaildirResource::collectionAdded: ("outbox") ()
AkonadiAgentServer(21562)/akonadiresource (maildir) MaildirResource::collectionAdded: ("outbox", "sent-mail") ()
Comment 2 Raymond Wooninck 2011-07-19 12:19:33 UTC
With the help of Christophe, I managed to find the real cause of the issue. It seems that the Akonadi-runtime package was not correctly build or contained errors. 

A local build of akonadi-runtime resolved the above mentioned issue and everything seemed to be working fine again. 

I am closing this bug report as resolved/invalid.