Bug 470477 - Cannot create alarms
Summary: Cannot create alarms
Status: RESOLVED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: Akonadi (show other bugs)
Version: 2.12.5
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-31 03:47 UTC by van.snyder@sbcglobal.net
Modified: 2023-06-24 18:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-3771602-0.html (1.25 KB, text/html)
2023-06-01 19:15 UTC, van.snyder@sbcglobal.net
Details
attachment-3784801-0.html (1.60 KB, text/html)
2023-06-01 23:35 UTC, van.snyder@sbcglobal.net
Details
attachment-3918181-0.html (1.70 KB, text/html)
2023-06-03 19:44 UTC, van.snyder@sbcglobal.net
Details
attachment-1348548-0.html (1.18 KB, text/html)
2023-06-24 01:10 UTC, van.snyder@sbcglobal.net
Details

Note You need to log in before you can comment on or make changes to this bug.
Description van.snyder@sbcglobal.net 2023-05-31 03:47:08 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Launch Kalarm
2. Try to create an alarm. The "new" button is grayed out. The "new" pick on the "file" menu is grayed out.
3. 

OBSERVED RESULT


EXPECTED RESULT

Create alarm.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 
Operating System: Debian GNU/Linux 10
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 4.19.0-23-686-pae
OS Type: 32-bit
Processors: 4 × Intel® Core™ i5-6300U CPU @ 2.40GHz
Memory: 3.7 GiB of RAM

ADDITIONAL INFORMATION
Comment 1 David Jarvie 2023-06-01 14:36:52 UTC
In the calendar view (menu View -> Show Calendars), are any Active Alarms calendars shown?

If so, right click on the calendar and select Show Details. Please report its Permissions, Status and Default calendar setting.
Comment 2 van.snyder@sbcglobal.net 2023-06-01 19:15:19 UTC
Created attachment 159400 [details]
attachment-3771602-0.html

On Thu, 2023-06-01 at 14:36 +0000, David Jarvie wrote:
> https://bugs.kde.org/show_bug.cgi?id=470477
> 
> --- Comment #1 from David Jarvie <djarvie@kde.org> ---In the calendar
> view (menu View -> Show Calendars), are any Active Alarmscalendars
> shown?
> If so, right click on the calendar and select Show Details. Please
> report itsPermissions, Status and Default calendar setting.

Today the "new" button and the "new" pick on the "file" menu are
active.

But when I try to create a display alarm, the response is "Failed to
create alarm." The details are "Failed to append item."

There is only one active alarm. Its permissions are read-write. The
status is "Enabled." The Default is "No". These are independent of
whether its box  is checked.
Comment 3 David Jarvie 2023-06-01 20:34:21 UTC
A possible fix is to right click on the alarm calendar in the calendar view panel, and ensure that "Use as default for active alarms" is selected.

However, if the calendar is already selected as default, or if it still doesn't work after doing that, I suggest deleting and re-adding the alarm calendar as follows:

1) Select the active alarm calendar in the calendar view panel, and click Show Details. Note the File location.
2) Remove it from KAlarm's database by clicking Remove. (Note that this doesn't delete your actual alarm calendar file.)
3) Add the calendar again by clicking Add. In the dialog, enter the file location noted in step 1, select Active Alarms, enter "Active Alarms" as the name, and do not select read only.
Comment 4 van.snyder@sbcglobal.net 2023-06-01 23:35:07 UTC
Created attachment 159406 [details]
attachment-3784801-0.html

On Thu, 2023-06-01 at 20:34 +0000, David Jarvie wrote:
> https://bugs.kde.org/show_bug.cgi?id=470477
> 
> --- Comment #3 from David Jarvie <djarvie@kde.org> ---A possible fix
> is to right click on the alarm calendar in the calendar viewpanel,
> and ensure that "Use as default for active alarms" is selected.
> However, if the calendar is already selected as default, or if it
> still doesn'twork after doing that, I suggest deleting and re-adding
> the alarm calendar asfollows:
> 1) Select the active alarm calendar in the calendar view panel, and
> click ShowDetails. Note the File location.2) Remove it from KAlarm's
> database by clicking Remove. (Note that this doesn'tdelete your
> actual alarm calendar file.)3) Add the calendar again by clicking
> Add. In the dialog, enter the filelocation noted in step 1, select
> Active Alarms, enter "Active Alarms" as thename, and do not select
> read only.

After doing both sets of steps, it still refuses to create alarms. The
"Active Alarms" calendar is not read only. It is enabled, and is the
default calendar.
Comment 5 van.snyder@sbcglobal.net 2023-06-03 19:44:04 UTC
Created attachment 159448 [details]
attachment-3918181-0.html

On Thu, 2023-06-01 at 20:34 +0000, David Jarvie wrote:
> https://bugs.kde.org/show_bug.cgi?id=470477
> 
> --- Comment #3 from David Jarvie <djarvie@kde.org> ---A possible fix
> is to right click on the alarm calendar in the calendar viewpanel,
> and ensure that "Use as default for active alarms" is selected.
> However, if the calendar is already selected as default, or if it
> still doesn'twork after doing that, I suggest deleting and re-adding
> the alarm calendar asfollows:
> 1) Select the active alarm calendar in the calendar view panel, and
> click ShowDetails. Note the File location.2) Remove it from KAlarm's
> database by clicking Remove. (Note that this doesn'tdelete your
> actual alarm calendar file.)3) Add the calendar again by clicking
> Add. In the dialog, enter the filelocation noted in step 1, select
> Active Alarms, enter "Active Alarms" as thename, and do not select
> read only.

After doing both sets of steps, it still refuses to create alarms. The
"Active Alarms" calendar is not read only. It is enabled, and is the
default calendar.
Are there any secret incantations that can be invoked when launching
kalarm so that it produces messages about why things went wrong?
Comment 6 David Jarvie 2023-06-05 10:22:17 UTC
This problem is clearly due to Akonadi. It is because of its unreliability that KAlarm (since version 3, released in 2020 in KDE Apps 20.08) no longer uses Akonadi. Upgrading would be the most reliable way to fix the issue.

In the meantime, I suggest trying the following. In each case, quit KAlarm first before running the fix. In a terminal window, run the commands
    akonadictl vacuum
    akonadictl fsck

If that doesn't fix things, run the commands
    akonadictl stop
    rm ~/.config/akonadi_*kalarm*rc
    rm ~/.config/akonadi/*_kalarm*

If that still doesn't fix things, all I can think of is to completely wipe Akonadi's configuration. WARNING: this should only be done if you don't use any other KDE PIM applications which use Akonadi, such as KMail, KOrganizer, KNotes (and possibly others), since those applications could lose data. It would be wise to back up all files and directories before deleting them, so that you can reinstate them afterwards if things go wrong. To wipe the Akonadi configuration,

    akonadictl stop
    rm -rf ~/.config/akonadi*
    rm -rf ~/.local/share/akonadi*
Comment 7 David Jarvie 2023-06-23 23:29:24 UTC
Marking as fixed because this issue has been fixed in KAlarm version 3 and later, due to Akonadi no longer being used.
Comment 8 van.snyder@sbcglobal.net 2023-06-24 01:10:37 UTC
Created attachment 159872 [details]
attachment-1348548-0.html

On Fri, 2023-06-23 at 23:29 +0000, David Jarvie wrote:
> https://bugs.kde.org/show_bug.cgi?id=470477
> 
> David Jarvie <djarvie@kde.org> changed:
>            What    |Removed                     |Added---------------
> -----------------------------------------------------------
> --         Resolution|
> -
> --                         |FIXED             Status|REPORTED        
>             |RESOLVED
> --- Comment #7 from David Jarvie <djarvie@kde.org> ---Marking as
> fixed because this issue has been fixed in KAlarm version 3 andlater,
> due to Akonadi no longer being used.

Can I install this in Debian 10, or do I need to upgrade first?
Comment 9 David Jarvie 2023-06-24 18:33:55 UTC
There don't seem to be any backports for Debian 10, so you would need to update your system to Debian 11 or 12. Alternatively, it is possible to build KAlarm from source using the kdesrc-build package, but I wouldn't recommend that unless you already have some knowledge or experience of building software from source.