Bug 464427 - AppStream links in apps.kde.org sometimes don't show the app in Discover
Summary: AppStream links in apps.kde.org sometimes don't show the app in Discover
Status: RESOLVED FIXED
Alias: None
Product: www.kde.org
Classification: Websites
Component: apps.kde.org (show other bugs)
Version: unspecified
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: kde-www mailing-list
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-01-17 20:23 UTC by Nate Graham
Modified: 2023-02-08 21:59 UTC (History)
1 user (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 Nate Graham 2023-01-17 20:23:11 UTC
STEPS TO REPRODUCE
1. Go to https://apps.kde.org/dolphin
2. Click on "Install on Linux", which opens appstream://org.kde.dolphin and launches Discover

OBSERVED RESULT
Error message saying "Could not open appstream://org.kde.dolphin because it was not found in any available software repositories.

EXPECTED RESULT
Dolphin's page opens.

ADDITIONAL INFORMATION
What's happening is that on my distro (Fedora 37), Dolphin's AppStream URL is

appstream://org.kde.dolphin.desktop

not

appstream://org.kde.dolphin

So if I open appstream://org.kde.dolphin.desktop in Discover, it works.

Unfortunately the root cause of this issue is messy handling of the .desktop suffix in AppStream itself that's baked in because it's a part of the spec. Because we can't guarantee that the ID on the system and the URL that users open both agree on whether that ".desktop" sufficis present or absent, and we should probably try to handle both.
Comment 1 Nate Graham 2023-01-17 20:25:37 UTC
Looks like we try to; see:
- https://invent.kde.org/plasma/discover/-/commit/176db6c331ad1c3bd3f39abf546fd22a659c4f9a
- https://invent.kde.org/plasma/discover/-/commit/e1aa6b37f29f54c96d933c1d2372eb24720ddcad

but I guess it broke recently or doesn't handle this specific case.
Comment 2 Nate Graham 2023-01-17 20:26:48 UTC
Oh, we removed it in https://invent.kde.org/plasma/discover/-/commit/4ce1e6dca9db1a14437eff90b9e4b67ebe0bb2f3. And I approved the MR removing it. Derp.
Comment 3 Nate Graham 2023-02-08 21:59:43 UTC
Ultimately this turned out to be a bug in the URL generation code on the website that we were working around in Discover!

It's now been fixed on the website.