KMail crashed while deleting emails and does not start anymore

Hi everyone,

KMail crashed while I was reading and deleting some emails, and it stopped working after that. Now, every time I try to start it, I get the error message:

The Email program encountered a fatal error and will terminate now.
The error was:
Could not create collection templates, resourceId 11

As expected, I get the same error message if I start Kontact.

By starting KMail in the terminal, I get the following error messages:

Cannot initialize model with data QJsonObject(). missing: QJsonValue(string, "urls")
org.kde.pim.akonadicore: Failed SpecialCollectionsRequestJob::slotResult "Could not create collection templates, resourceId 11"
org.kde.pim.mailcommon: "The Email program encountered a fatal error and will terminate now.\nThe error was:\nCould not create collection templates, resourceId 11"

I searched for similar problems, and renamed the folder templates to templates.bak in .local/share/local-mail/, but it didn’t work.
I also restarted the computer, but the problem persists.

Any hint on how to solve this issue?

Output of `inxi -Fazy`

System:
Kernel: 5.17.9-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
parameters: BOOT_IMAGE=/vmlinuz-5.17-x86_64
root=UUID=ca0b13f1-3220-4bc9-9dc7-77d2311111e0 rw rootflags=subvol=@ quiet
apparmor=1 security=apparmor udev.log_priority=3
Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.4 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 4180Q3U v: ThinkPad T420
serial: Chassis: type: 10 serial:
Mobo: LENOVO model: 4180Q3U serial:
UEFI-[Legacy]: LENOVO v: 83ET82WW (1.52 ) date: 06/04/2018
Battery:
ID-1: BAT0 charge: 29.7 Wh (40.2%) condition: 73.9/75.5 Wh (97.9%)
volts: 10.8 min: 11.1 model: SANYO 45N1023 type: Li-ion serial:
status: not charging
CPU:
Info: model: Intel Core i7-2640M bits: 64 type: MT MCP arch: Sandy Bridge
family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
L3: 4 MiB desc: 1x4 MiB
Speed (MHz): avg: 1378 high: 1878 min/max: 800/3500 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 843 2: 1027 3: 1765
4: 1878 bogomips: 22332
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX unsupported
Type: l1tf mitigation: PTE Inversion
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
vendor: Lenovo ThinkPad T420 driver: i915 v: kernel ports:
active: LVDS-1,VGA-1 empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-2, HDMI-A-3
bus-ID: 00:02.0 chip-ID: 8086:0126 class-ID: 0300
Device-2: Chicony integrated camera type: USB driver: uvcvideo
bus-ID: 1-1.6:5 chip-ID: 04f2:b221 class-ID: 0e02
Display: x11 server: X.Org v: 21.1.3 compositor: kwin_x11 driver: X:
loaded: modesetting alternate: fbdev,vesa gpu: i915 display-ID: :0
screens: 1
Screen-1: 0 s-res: 1920x1980 s-dpi: 96 s-size: 506x522mm (19.92x20.55")
s-diag: 727mm (28.62")
Monitor-1: LVDS-1 pos: primary,bottom-r model: LG Display 0x02e2
built: 2010 res: 1600x900 hz: 60 dpi: 131 gamma: 1.2
size: 310x174mm (12.2x6.85") diag: 355mm (14") ratio: 16:9 modes: 1600x900
Monitor-2: VGA-1 pos: primary,top-left model: BenQ GW2780 serial:
built: 2021 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2
size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
OpenGL: renderer: Mesa Intel HD Graphics 3000 (SNB GT2) v: 3.3 Mesa 22.0.4
compat-v: 3.1 direct render: Yes
Audio:
Device-1: Intel 6 Series/C200 Series Family High Definition Audio
vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:1c20 class-ID: 0403
Sound Server-1: ALSA v: k5.17.9-1-MANJARO running: yes
Sound Server-2: sndio v: N/A running: no
Sound Server-3: JACK v: 1.9.21 running: no
Sound Server-4: PulseAudio v: 15.0 running: yes
Sound Server-5: PipeWire v: 0.3.51 running: yes
Network:
Device-1: Intel 82579LM Gigabit Network vendor: Lenovo ThinkPad T520
driver: e1000e v: kernel port: 5080 bus-ID: 00:19.0 chip-ID: 8086:1502
class-ID: 0200
IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac:
Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0
chip-ID: 8086:0085 class-ID: 0280
IF: wlp3s0 state: up mac:
IF-ID-1: wwp0s29u1u4i6 state: down mac:
Bluetooth:
Device-1: Broadcom BCM2045B (BDC-2.1) type: USB driver: btusb v: 0.8
bus-ID: 1-1.4:4 chip-ID: 0a5c:217f class-ID: fe01 serial:
Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
Drives:
Local Storage: total: 1.36 TiB used: 1.01 TiB (74.3%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: rev: 3B6Q scheme: MBR
ID-2: /dev/sdb maj-min: 8:16 vendor: HGST (Hitachi) model: HTS541010A9E680
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
type: HDD rpm: 5400 serial: rev: A7G0 scheme: MBR
Partition:
ID-1: / raw-size: 100 GiB size: 100 GiB (100.00%) used: 30.35 GiB (30.4%)
fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot raw-size: 512 MiB size: 511 MiB (99.80%)
used: 174.9 MiB (34.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 365.26 GiB size: 365.26 GiB (100.00%)
used: 280.88 GiB (76.9%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
ID-4: /var/log raw-size: 100 GiB size: 100 GiB (100.00%)
used: 30.35 GiB (30.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 59.0 C mobo: N/A
Fan Speeds (RPM): cpu: 3515
Info:
Processes: 310 Uptime: 15m wakeups: 1 Memory: 15.41 GiB
used: 3.78 GiB (24.5%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 2041 lib: 430 flatpak: 0
Shell: Zsh v: 5.9 running-in: konsole inxi: 3.3.16

I managed to solve it, by installing Akonadi Console, going to the Agents tab, and removing the Local Folders agent. I then restarted Akonadi and KMail, and the problem disappeared.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.