Bug 446501 - All flatpaks returned as results when searching installed packages
Summary: All flatpaks returned as results when searching installed packages
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-05 03:15 UTC by Bernie Innocenti
Modified: 2021-12-15 02:08 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23.5


Attachments
search results for "blahblah" (430.85 KB, image/png)
2021-12-05 03:15 UTC, Bernie Innocenti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernie Innocenti 2021-12-05 03:15:49 UTC
Created attachment 144226 [details]
search results for "blahblah"

SUMMARY
No matter what string  you search for, the shown results include all the installed flatpaks.

STEPS TO REPRODUCE
1. Open Discover
2. Click on "Installed" on the bottom-left list
3. Type "blahblah" in the search bar

OBSERVED RESULT
All installed flatpaks listed

EXPECTED RESULT
Nothing should be listed because nothing matches "blahblah"

SOFTWARE/OS VERSIONS
Everything built from sources as of today (kdesrc-build).
Also happens on Fedora Rawhide (5.23.3).
Comment 1 Paul Worrall 2021-12-05 09:16:31 UTC
I can reproduce on KDE Neon User Edition, setting to confirmed.

It looks like the random search string removes all the apt and snap packages from the list (because they don't match) but does not remove the flatpak ones.  I have only tested with system-wide flatpaks.

Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-41-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD A6-6400K APU with Radeon(tm) HD Graphics
Memory: 7.7 GiB of RAM
Graphics Processor: AMD CEDAR
Comment 2 Nate Graham 2021-12-07 03:21:43 UTC
Weird, cannot reproduce on Fedora 34.
Comment 3 Srevin Saju 2021-12-07 11:59:15 UTC
Hmm, I tried reproducing this bug, and I hit another error:

1. I clicked Installed.
2. Searched for "GNU" in search.
3. The discover app crashed. (this only happens when installed is selected)

Host OS: Fedora Kinoite 35
discover: 5.23.3

```
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/GlobalDrawer.qml:354:13: QML ColumnLayout: Binding loop detected for property "height"
org.kde.plasma.libdiscover: last stream isn't over yet Filters(state: AbstractResource::Installed,search: "GNU",) ResourcesProxyModel(0x55ae08f4e880)
KCrash: Application 'plasma-discover' crashing...
The Wayland connection experienced a fatal error: Bad file descriptor
```
Comment 4 Bernie Innocenti 2021-12-07 19:06:44 UTC
> Hmm, I tried reproducing this bug, and I hit another error:

Could you re-run plasma-discover under gdb and get a stack trace?

Is the plasma-discover-flatpak package installed? Any other backends?

This is what's installed on my Rawhide system:
 plasma-discover-libs-5.23.3.1-1.fc36.x86_64
 plasma-discover-flatpak-5.23.3.1-1.fc36.x86_64
 plasma-discover-5.23.3.1-1.fc36.x86_64
 plasma-discover-notifier-5.23.3.1-1.fc36.x86_64
Comment 5 Aleix Pol 2021-12-15 02:06:42 UTC
Git commit ff36b2a24bd8c81fa0ec6bfc7a61cba02c968c93 by Aleix Pol.
Committed on 15/12/2021 at 02:06.
Pushed by apol into branch 'master'.

flatpak: Properly filter installed apps

M  +4    -1    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/commit/ff36b2a24bd8c81fa0ec6bfc7a61cba02c968c93
Comment 6 Aleix Pol 2021-12-15 02:06:59 UTC
Git commit 7043d9d44cc42f69d53a3198efb5f9b12589fbde by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 15/12/2021 at 02:06.
Pushed by apol into branch 'Plasma/5.23'.

flatpak: Properly filter installed apps


(cherry picked from commit ff36b2a24bd8c81fa0ec6bfc7a61cba02c968c93)

M  +4    -1    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/commit/7043d9d44cc42f69d53a3198efb5f9b12589fbde