Bug 432654 - Flathub entries in browse list displays additional incorrect item in Sources menu
Summary: Flathub entries in browse list displays additional incorrect item in Sources...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
: 433395 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-08 17:32 UTC by Nate Graham
Modified: 2021-02-22 00:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21.1


Attachments
Incorrect additional source in 0 A.D. app (122.29 KB, image/jpeg)
2021-02-08 17:32 UTC, Nate Graham
Details
Same issue with Blender app (136.65 KB, image/jpeg)
2021-02-08 17:33 UTC, Nate Graham
Details
Additional bogus entries appeared while menu was open (358.90 KB, image/jpeg)
2021-02-08 17:33 UTC, Nate Graham
Details
Additional bogus entries were already there when I opened the menu (3.56 MB, video/webm)
2021-02-08 17:34 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-02-08 17:32:40 UTC
Created attachment 135513 [details]
Incorrect additional source in 0 A.D. app

Everything KDE from git master on openSUSE Tumbleweed.


STEPS TO REPRODUCE
0. Have Flatpak backend installed with FlatHub repo configured
1. Open Discover
2. Click on "Applications" in sidebar
3. Navigate to "Blender" or "BitWarden" or "0 A.D." item for Flathub (the one with the little flathub icon in the corner of the delegate
4. Click on "Sources" menu in top-right corner


OBSERVED RESULT
The menu displays two entries: one with the app's actual version, and an additional unexpected entry with the version number "20.08.4 (20.04)"


EXPECTED RESULT
One of the following:
1. No sources menu at all, because there is only one version from Flathub (in the case where the app is not available from my distro, or it is but its ID doesn't match the one provided by FlatHub)

2. A sources menu that displays one entry from FlatHub, and one from my distro via PackageKit (in the case where the same app is available from both sources and their IDs match)


ADDITIONAL INFORMATION
The issue only seems to be reproducible if I navigate to one of the aforementioned entries right after launching Discover. If I wait 30 seconds after launching Discover and then perform the steps to reproduce, the bug does not happen.

Also, if I reproduce the bug, wait 30 seconds, and then navigate to a different Flathub-provided app entry, the bug does not reproduce.
Comment 1 Nate Graham 2021-02-08 17:33:00 UTC
Created attachment 135514 [details]
Same issue with Blender app
Comment 2 Nate Graham 2021-02-08 17:33:47 UTC
Created attachment 135515 [details]
Additional bogus entries appeared while menu was open

Also, sometimes the sources menu gains additional bogus entries while it's open!
Comment 3 Nate Graham 2021-02-08 17:34:25 UTC
Created attachment 135516 [details]
Additional bogus entries were already there when I opened the menu

And sometimes the additional bogus entries are already there when I open the menu.
Comment 4 Bug Janitor Service 2021-02-08 23:41:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/69
Comment 5 Aleix Pol 2021-02-10 16:23:03 UTC
Git commit 2dc0f67f90770dfdb57a6465fd1a857124397c58 by Aleix Pol.
Committed on 10/02/2021 at 16:22.
Pushed by apol into branch 'master'.

Do not always bring refreshed resources in

It would horribly glitch on some searches, for example when doing by
appstream url where we cannot generically filter since some resources
will have several of them.

M  +0    -3    libdiscover/resources/ResourcesProxyModel.cpp

https://invent.kde.org/plasma/discover/commit/2dc0f67f90770dfdb57a6465fd1a857124397c58
Comment 6 Aleix Pol 2021-02-10 16:24:01 UTC
Git commit 4358ecbde9aa7a3c8110924bee39c32332c96b81 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 10/02/2021 at 16:23.
Pushed by apol into branch 'Plasma/5.21'.

Do not always bring refreshed resources in

It would horribly glitch on some searches, for example when doing by
appstream url where we cannot generically filter since some resources
will have several of them.


(cherry picked from commit 2dc0f67f90770dfdb57a6465fd1a857124397c58)

M  +0    -3    libdiscover/resources/ResourcesProxyModel.cpp

https://invent.kde.org/plasma/discover/commit/4358ecbde9aa7a3c8110924bee39c32332c96b81
Comment 7 Paul McAuley 2021-02-13 06:40:50 UTC
I always have two sources for every Flatpak. If I select one it will install for the user, the other it will install for the system. I don't have a problem with there being two, but would rather they were labelled as they just appear the same.

Is this the same issue?

(Discover 5.20.5, OpenSUSE Leap 15.2, Plasma 5.20.90)
Comment 8 Nate Graham 2021-02-16 16:43:02 UTC
Yup that's the same thing. Just fixed in Plasma 5.21. :)
Comment 9 Paul McAuley 2021-02-21 17:19:29 UTC
(In reply to Nate Graham from comment #8)
> Yup that's the same thing. Just fixed in Plasma 5.21. :)

I don't think it is the same issue, so I created bug 433395
Comment 10 Nate Graham 2021-02-22 00:23:12 UTC
That is in fact the same issue. :)

Feel free to re-open *this* bug report if you still see the issue after you update to Plasma 5.21. Thanks!
Comment 11 Nate Graham 2021-02-22 00:23:16 UTC
*** Bug 433395 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2021-02-22 00:24:00 UTC
I mean 5.21.1 sorry