Bug 411397

Summary: Until initial metadata refresh on launch completes, Discover claims packages are not installed and don’t have reviews even when they are/have
Product: [Applications] Discover Reporter: Karl Ove Hufthammer <karl>
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, cappelikan, justin.zobel, katyaberezyaka, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=408037
Latest Commit: Version Fixed In: 5.22
Attachments: incorrect version file

Description Karl Ove Hufthammer 2019-08-28 19:45:27 UTC
SUMMARY
If I click on an installed and reviewed application *before* the ‘Fetching Updates...’ process is finished (which can easily take a minute or so), I get the (translated version) of:

   Install this app and be the first to write a review!

This information is incorrect and confusing. The application *is* both installed and have user reviews.


STEPS TO REPRODUCE
1. Open Discover.
2. Click on an installed application before the ‘Fetching Updates...’ process is finished.
3. Look at the reviews section.

OBSERVED RESULT
The review section shows:

   Install this app and be the first to write a review!

And the log on the console says:

   org.kde.plasma.libdiscover: error fetching reviews: "Error transferring https://odrs.gnome.org/1.0/reviews/api/fetch - server replied: BAD REQUEST" "{\n    \"msg\": \"missing data, expected version\",\n    \"success\": false\n}"

EXPECTED RESULT
The reviews section should either show the available reviews, be hidden (if it’s not possible or fetch reviews before ‘Fetching Updates’ is finished) or show a message that the reviews will be shown when ‘Fetching Updates’ is finished. And when ‘Fetching Updates’ is finished, the reviews should automatically be shown.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20190824
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
Kernel Version: 5.2.9-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2500 CPU @ 3.30GHz
Memory: 15,6 GiB
Comment 1 Nate Graham 2019-09-03 17:39:01 UTC

*** This bug has been marked as a duplicate of bug 411034 ***
Comment 2 Karl Ove Hufthammer 2019-09-03 20:27:21 UTC
Reopening, as per comments in #411034. I observe this bug on the latest git master version of Discover.
Comment 3 Justin Zobel 2020-11-04 05:47:21 UTC
Karl can you please confirm if this is still an issue? I've tried to replicate it on Discover from git master but I can't.
Comment 4 Karl Ove Hufthammer 2020-11-04 18:04:02 UTC
(In reply to Justin Zobel from comment #3)
> Karl can you please confirm if this is still an issue? I've tried to
> replicate it on Discover from git master but I can't.

I can still confirm this with Discover 5.20.2. There are, however, some changes. The button is now *disabled* when fetching update. For an installed application, it now just says:

  Install to Write a Review

When the ‘Fetching Updates’ process has finished, the button text is changed to

  Write a Review

and the button is no longer disabled.
Comment 5 Nate Graham 2021-04-07 20:12:13 UTC
Definitely still an issue. It's quite noticeable with openSUSE distros which take forever and a half to refresh the metadata on launch.
Comment 6 Aleix Pol 2021-04-12 14:47:08 UTC
I see OP also is using SUSE.

I'm not entirely sure what should happen there (besides someone sitting down and seeing if there's an actual reason why zypper should be unbearably slow). Are you suggesting that we treat applications where we don't know their state as installed there?
Comment 7 Nate Graham 2021-04-12 20:36:29 UTC
We could display a spinner instead of any text at all, while the data that the text depends on hasn't been loaded yet.
Comment 8 Bug Janitor Service 2021-04-13 15:42:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/110
Comment 9 Aleix Pol 2021-04-13 18:02:30 UTC
Git commit 676f354e013d61f3484b35ccfced5c01032457bf by Aleix Pol.
Committed on 13/04/2021 at 16:19.
Pushed by ngraham into branch 'master'.

Show a less encouraging title on our UI when app state is being fetched

So far we were displaying them as disabled but uninstalled. This is
somewhat confusing in some cases, especially for openSUSE users where
this process takes a while.

M  +1    -1    discover/qml/ApplicationPage.qml
M  +5    -1    discover/qml/InstallApplicationButton.qml

https://invent.kde.org/plasma/discover/commit/676f354e013d61f3484b35ccfced5c01032457bf
Comment 10 cappelikan 2023-02-26 12:12:44 UTC
Created attachment 156758 [details]
incorrect version file

incorrect version file
Comment 11 cappelikan 2023-02-26 12:17:48 UTC
Installed advanced radio player when updating, a version that does not correspond to the latest one and got this file SRsEwr-org.kde.plasma.advancedradio.tar.gz , latest version 2.3 , this file 2.2.1 although when updating it writes that the update is from version 2.2.1 to 2.3
Comment 12 cappelikan 2023-02-26 12:21:58 UTC
source repository https://store.kde.org/p/1313987
Comment 13 Nate Graham 2023-02-27 17:16:28 UTC
Please submit a new bug report as your issue is something different. Thanks!