Bug 293208 - Kalarm fails to create default calendars for freshly created user
Summary: Kalarm fails to create default calendars for freshly created user
Status: CLOSED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: Akonadi (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 14:16 UTC by Vit Pelcak
Modified: 2020-08-17 23:41 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vit Pelcak 2012-02-03 14:16:32 UTC
Version:           unspecified
OS:                Linux

I have created new user. Kalarm doesn't crash for him.

But it displays several error messages on start.

Failed to create default calendar “Alarm templates”

Location: /home/test/.kde4/share/apps/kalarm/template.ics
(Agent instance creation timeout.)

Failed to create default calendar “Archived alarms” 
Location: /home/test/.kde4/share/apps/kalarm/expired.ics
(Agent instance creation timeout.)

Failed to create default calendar “Active alarms” 
Location: /home/test/.kde4/share/apps/kalarm/calendar.ics
(Could not get owner of name
'org.freedesktop.Akonadi.Resource.akonadi_kalarm_resource_0': no such name)

I'm just translating those messages from Czech, but in general, it should be
OK.

Please note, I'm not using KDE as I moved to E17.

Reproducible: Always

Steps to Reproduce:
Create new user, login (perhaps into non-KDE DE) and start Kalarm.

Actual Results:  
Error messages are displayed.

Expected Results:  
No error messages are expected.
Comment 1 Vit Pelcak 2012-02-03 14:17:06 UTC
I forgot to add, that distribution is openSUSE.
Comment 2 David Jarvie 2012-02-03 14:32:34 UTC
A possible cause for this is that Akonadi had not completed its startup when KAlarm tried to create the Akonadi resources for its default calendars. This is a known problem.

To verify this, can you try quitting KAlarm. Then run akonadiconsole, and in it delete all KAlarm resources which are listed in its first tab. Then restart KAlarm and see whether the default calendars are created successfully.
Comment 3 Vit Pelcak 2012-02-03 14:44:16 UTC
I can confirm that your suggestion helped.

I guess I can use akonadiconsole to delete that extra calendar in my other bug as well.
Comment 4 David Jarvie 2012-02-03 15:04:13 UTC
This seems to confirm that the problem is that KAlarm is not waiting until Akonadi startup is complete before trying to create the resources. I've changed the bug description accordingly.

Currently, I don't know of any way for an application to detect when Akonadi is ready. This needs to be resolved.
Comment 5 David Jarvie 2012-02-11 11:29:31 UTC
Git commit ce1caef4ca48171855bdb16f9263622fd1660119 by David Jarvie.
Committed on 11/02/2012 at 12:25.
Pushed by djarvie into branch 'master'.

Bug 293208: fix errors creating default resources on initialisation

Wait for Akonadi server to be fully running before creating default
KAlarm resources. This also requires kdepimlibs commit
d612b6055f725c01664e3ed07294d2f29052d204 by Volker Krause which fixes
the server manager reporting prematurely that it is running.

M  +21   -5    kalarm/akonadimodel.cpp
M  +3    -0    kalarm/akonadimodel.h

http://commits.kde.org/kdepim/ce1caef4ca48171855bdb16f9263622fd1660119
Comment 6 David Jarvie 2012-02-11 11:35:07 UTC
Git commit 8b8890cecd3d066f7454b17b113c748cbef53c96 by David Jarvie.
Committed on 11/02/2012 at 12:35.
Pushed by djarvie into branch 'KDE/4.8'.

Bug 293208: fix errors creating default resources on initialisation

Wait for Akonadi server to be fully running before creating default
KAlarm resources. This also requires kdepimlibs commit
d612b6055f725c01664e3ed07294d2f29052d204 by Volker Krause which fixes
the server manager reporting prematurely that it is running.

Backport of ce1caef4ca48171855bdb16f9263622fd1660119 (master)
FIXED-IN:4.8.1

M  +2    -1    kalarm/Changelog
M  +21   -5    kalarm/akonadimodel.cpp
M  +3    -0    kalarm/akonadimodel.h

http://commits.kde.org/kdepim/8b8890cecd3d066f7454b17b113c748cbef53c96
Comment 7 Matt Stevens 2012-03-07 06:57:00 UTC
When will this hit the ubuntu repo?
Comment 8 David Jarvie 2012-03-07 17:09:13 UTC
You need to ask on an Ubuntu mailing list - KDE has no control over when distros package KDE software.