Bug 513761 - KRunner fails to search/list Activities due to kactivitymanagerd SQL syntax error "near '.'"
Summary: KRunner fails to search/list Activities due to kactivitymanagerd SQL syntax e...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Activities in general (other bugs)
Version First Reported In: 6.5.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-24 00:17 UTC by Simone
Modified: 2026-02-10 22:09 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone 2025-12-24 00:17:36 UTC
SUMMARY KRunner fails to list or search for Plasma Activities on Arch Linux. Despite the plasma-kactivitymanagerd.service being active and activities being correctly reported via D-Bus, KRunner returns no results. The service logs a persistent SQL syntax error that prevents metadata from being indexed or served to KRunner.

STEPS TO REPRODUCE

    Create one or more Activities in System Settings.

    Open KRunner (Alt+Space).

    Type the name of an existing Activity (e.g., "Lavoro").

    Observe that no Activity results are shown.

    Check the log file at ~/.local/share/kactivitymanagerd/resources/errors.log.

OBSERVED RESULT KRunner returns no results for activities. The log file consistently shows: error: near ".": syntax error Impossibile eseguire il comando Attempts to mitigate this by setting kactivitymanagerd_plugin_sqliteEnabled=false in kactivitymanagerdrc do not stop the error from appearing, nor do they restore KRunner functionality.

EXPECTED RESULT KRunner should correctly display matching Activities and allow switching between them.

SOFTWARE/OS VERSIONS

    Operating System: Arch Linux

    KDE Plasma Version: 6.5.4

    KDE Frameworks Version: 6.21.0

    Qt Version: 6.10.1

    Kernel Version: 6.18.2-arch2-1 (64-bit)

    Graphics Platform: Wayland

ADDITIONAL INFORMATION

    Manual D-Bus calls (qdbus6 org.kde.ActivityManager /ActivityManager/Activities ListActivities) correctly return the Activity IDs, but ActivityName often returns empty even when defined in kactivitymanagerdrc.

    The syntax error near "." appears immediately upon service restart, even after deleting the ~/.local/share/kactivitymanagerd/resources/ directory.

    This suggests an invalid SQL query (possibly a malformed PRAGMA or table reference) generated by the daemon that is incompatible with current SQLite versions.

    Reinstalling kactivitymanagerd and kactivities-stats does not fix the issue.
Comment 1 Stephan Diestelhorst 2026-01-08 11:45:47 UTC
I see the same thing on KDE Neon with logging via systemd with a fresh database:

syon@d-allen:~$ systemctl --user status plasma-kactivitymanagerd
[...]
Jan 08 11:31:31 d-allen systemd[1941]: Started plasma-kactivitymanagerd.service - KActivityManager Activity manager Service.
Jan 08 11:31:31 d-allen kactivitymanagerd[13706]: SQL:  
                                                      error:  QSqlError("1", "Unable to execute statement", "near \".\": syntax error") 
                                                      query:  ".tables"
Comment 2 Ivan Čukić 2026-01-09 08:31:29 UTC
Hey, can you do

sqlite3 ~/.local/share/kactivitymanagerd/resources/database

and type

.tables

there?
Comment 3 Ivan Čukić 2026-01-09 08:33:56 UTC
Also, can you run these from sqlite3 (don't post the outputs here, except any errors you get)

select * from ResourceInfo;
select * from ResourceLink;
select * from SchemaInfo;
Comment 4 TraceyC 2026-01-13 17:04:36 UTC
Setting status, since we're waiting on a reply
Comment 5 Bug Janitor Service 2026-01-28 03:48:33 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Simone 2026-01-28 12:18:37 UTC
Hi Ivan and everyone,

I have performed the requested manual tests on the database using sqlite3 (version 3.51.2). Here are the results:

1. Output of .tables:
ResourceEvent       ResourceLink        SchemaInfo
ResourceInfo        ResourceScoreCache
2. Output of select * from SchemaInfo;:
version|2015.02.09
3. Confirmation of the SQL Error: The database appears to be physically intact. However, I can confirm the observation made by Stephan in Comment #1. My logs also show that kactivitymanagerd is attempting to execute ".tables" as a raw SQL statement, which triggers the QSqlError("1", "Unable to execute statement", "near \".\": syntax error").

4. Functional Impact on KRunner: Due to this error, KRunner completely fails to list or search for activities. Even though activities are correctly reported via D-Bus (qdbus6), typing their names in KRunner returns no results. This effectively breaks the ability to switch activities quickly via keyboard.

5. Visual Impact on "Activity Bar" Widget: Additionally, on login, the "Activity Bar" widget is visually stuck on the first activity in the list, even if the session starts on a different one. The blue indicator does not match the actual state until I manually click on the widget, which seems to force a synchronization.

It appears that the SQL syntax error prevents kactivitymanagerd from correctly serving metadata to both KRunner and the Plasma Shell widgets during the initial indexing/startup phase.
Comment 7 Stephan Diestelhorst 2026-02-10 22:09:01 UTC
$ sqlite3 ~/.local/share/kactivitymanagerd/resources/database
SQLite version 3.45.1 2024-01-30 16:01:20
Enter ".help" for usage hints.
sqlite> .tables
ResourceEvent       ResourceLink        SchemaInfo        
ResourceInfo        ResourceScoreCache
sqlite> select * from ResourceInfo;
<list of directories>
sqlite> select * from ResourceLink;
<empty>
sqlite> select * from SchemaInfo;
version|2015.02.09

So very similar to the other report.