Bug 500228

Summary: Opening the application launcher logs an error message to the journal TypeError Cannot read property forceActiveFocus of null
Product: [Plasma] plasmashell Reporter: hbr <nepnep>
Component: Application Launcher (Kickoff) widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cwo.kde, mikel5764, noahadvs, notmart
Priority: NOR    
Version First Reported In: 6.3.0   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.3.1
Sentry Crash Report:

Description hbr 2025-02-17 08:45:55 UTC
SUMMARY
Opening the application launcher logs an error message to the journal:

plasmashell[1257]: file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/ApplicationsPage.qml:217: TypeError: Cannot read property 'forceActiveFocus' of null

STEPS TO REPRODUCE
1. Open / close the application launcher
2. Check the journal

OBSERVED RESULT
The above error message appears in the journal.

EXPECTED RESULT
No error happens / error message gets logged.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 30,9 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: ASRock
Product Name: X670E Steel Legend
Comment 1 Marco Martin 2025-02-17 11:31:08 UTC
just kickoff open and close without doing anything else like switching categories or searching?
Comment 2 hbr 2025-02-17 12:03:20 UTC
Yes just opening / closing (either by using the mouse or  the super key).
Comment 3 Bug Janitor Service 2025-02-17 17:51:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2819
Comment 4 cwo 2025-02-17 21:39:30 UTC
Git commit 08be7a89dcb416585078c584416c1d2d51fc85cd by Christoph Wolk.
Committed on 17/02/2025 at 21:21.
Pushed by cwo into branch 'master'.

applets/kickoff: don't forceActiveFocus nothing

Kickoff sets focus on the currentItem in the contentArea. This can be
nothing, in particular if the Favorites list is empty. This has no
effect except to print a runtime warning.

Instead, don't do that if there's no currentItem.

M  +1    -1    applets/kickoff/package/contents/ui/ApplicationsPage.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/08be7a89dcb416585078c584416c1d2d51fc85cd
Comment 5 cwo 2025-02-17 21:49:39 UTC
Git commit f8318ed363f60c8b5cb5c4299a6ef739fc0eb920 by Christoph Wolk.
Committed on 17/02/2025 at 21:39.
Pushed by cwo into branch 'Plasma/6.3'.

applets/kickoff: don't forceActiveFocus nothing

Kickoff sets focus on the currentItem in the contentArea. This can be
nothing, in particular if the Favorites list is empty. This has no
effect except to print a runtime warning.

Instead, don't do that if there's no currentItem.


(cherry picked from commit 08be7a89dcb416585078c584416c1d2d51fc85cd)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +1    -1    applets/kickoff/package/contents/ui/ApplicationsPage.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/f8318ed363f60c8b5cb5c4299a6ef739fc0eb920