Bug 469139 - Kickoff doesn't start Snap packages at the first time [Kubuntu 23.04]
Summary: Kickoff doesn't start Snap packages at the first time [Kubuntu 23.04]
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.27.4
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-29 13:06 UTC by Enrico
Modified: 2023-05-05 09:26 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico 2023-04-29 13:06:19 UTC
SUMMARY
***
Hello,
very often kickoff can't start snap packages when I launch it from the menu. The first time I launch the app it fails, then it works fine

I report this bug against kickoff because I've tested launching the same Snaps from 1) the icon pinned to the panel 2) konsole (eg. /var/lib/snapd/desktop/applications/telegram-desktop_telegram-desktop.desktop that should be the same file kickoff execute) and it works.

***


STEPS TO REPRODUCE
1. Boot the system
2. Open kickoff (Meta Key)
3. Search for a snap with the keyboard (tested with Audacity, Thunderbird, Telegram Desktop)
4. Press Enter to start the app

OBSERVED RESULT
The app fails to start. It TRIES to start but then it closes.
I say "it tries to start" because if I launch Thunderbird I can see the rolling circle on the panel-pinned icon, but then it closes.

After failing the first launch, I can launch it again and again with no problems.

EXPECTED RESULT
Should start also the first time.


Let me know if I can provide some additional log. I tried to start the .desktop from konsole to get some logs (as it seems the file executed by KickOff) but it always starts with no problems. Kikoff fails the first time.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-20-generic (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2023-05-02 16:05:34 UTC
Can you do this?

1. Open a terminal window
2. Run `journalctl --follow --user --unit=plasma-plasmashell.service'
3. Reproduce the issue
4. Paste the text that appeared in the terminal window after the app first crashed

Does the same issue also happen when you launch the app from KRunner (the search field that appears when you type Alt+space)?
Comment 2 Enrico 2023-05-02 16:41:53 UTC
Hello Nate,
the journalctl returns nothing when the snap "crashes"

I can see some of this warnings, but they are shown when I press the meta-key and not when I type the name, press ENTER and see the snap to close.

mag 02 18:37:48 enrico-kubuntu plasmashell[2348]: file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/ApplicationsPage.qml:178: TypeError: Cannot read property 'forceActiveFocus' of null
mag 02 18:37:49 enrico-kubuntu plasmashell[2348]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"
mag 02 18:38:16 enrico-kubuntu plasmashell[2348]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"
mag 02 18:38:28 enrico-kubuntu plasmashell[2348]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"
mag 02 18:38:28 enrico-kubuntu plasmashell[2348]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment

from Krunner I get the same result. The first time the snap crashes, then it starts from the second time
Comment 3 Nate Graham 2023-05-02 16:48:42 UTC
Thanks.

Does the issue reproduce if you launch the app with `kstart5 "[command in the desktop file's Exec= line]"`
Comment 4 Enrico 2023-05-02 18:14:56 UTC
Hello, it seems to work fine.

The Exec line is pretty complicated. Eg:
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/gimp_gimp.desktop /snap/bin/gimp %U

Is it ok If I've run the following command?
kstart5 env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/gimp_gimp.desktop /snap/bin/gimp %U

Thanks
Comment 5 Nate Graham 2023-05-05 09:26:04 UTC
Ok, thanks. I'm CCing some people who might know more.