Bug 481932 - "Unable to create KIO worker. Unknown protocol 'appstream'." error when using "Get <app>" feature
Summary: "Unable to create KIO worker. Unknown protocol 'appstream'." error when using...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.93.0
Platform: Arch Linux Linux
: HI major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6, regression
: 482155 482489 483296 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-28 14:22 UTC by Patrick Silva
Modified: 2024-03-17 13:40 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2024-02-28 14:22:30 UTC
STEPS TO REPRODUCE
1. search for a not installed app with Kickoff
2. click on 'Get <searched app>" search result
3. 

OBSERVED RESULT
error message "Unable to create KIO worker. Unknown protocol 'appstream'."

EXPECTED RESULT
Discover opens the description page of the searched app

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland
Comment 1 Patrick Silva 2024-02-29 14:43:10 UTC
Same error message after using "Uninstall or manage addons..." from the context menu of Kickoff.
Comment 2 Nate Graham 2024-02-29 21:05:59 UTC
Can reproduce on Fedora 39 with Plasma 6 compiled from source on top, so it's not an issue with Arch using a newer version of the MIME stuff.
Comment 3 Alexander Lohnau 2024-03-01 06:30:26 UTC
I can not reproduce with my self-compiled state. I will try tomorrow recompiling the latest Qt 6.6 and KDE master stuff after that.
Comment 4 Patrick Silva 2024-03-01 14:08:36 UTC
Can reproduce on neon unstable too.
Comment 5 Patrick Silva 2024-03-01 14:45:11 UTC
*** Bug 482155 has been marked as a duplicate of this bug. ***
Comment 6 Harald Sitter 2024-03-01 16:56:37 UTC
I believe discover's desktop file is a bit wrong there. It only accepts files (%F) but it should accept urls (%U). What specifically appears to happens is that since it has %F KIO  wants to download the url so it can feed it to discover as a file, but since appstream:// isn't a downloadable protocol it errors out on account of finding no handler.
Comment 7 Nicolas Fella 2024-03-02 17:36:01 UTC
(In reply to Harald Sitter from comment #6)
> I believe discover's desktop file is a bit wrong there. It only accepts
> files (%F) but it should accept urls (%U). What specifically appears to
> happens is that since it has %F KIO  wants to download the url so it can
> feed it to discover as a file, but since appstream:// isn't a downloadable
> protocol it errors out on account of finding no handler.

There's a twist: Discover ships org.kde.discover.urlhandler.desktop, which has the right placeholder and the appstream association.

However the newly introduced kde-mimeapps.list assigns org.kde.discover to appstream
Comment 8 Bug Janitor Service 2024-03-02 17:40:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2074
Comment 9 Fushan Wen 2024-03-03 16:25:06 UTC
Git commit a6f84d7d3dcfbdec2e011af8c61f491fa970c963 by Fushan Wen, on behalf of Nicolas Fella.
Committed on 03/03/2024 at 16:25.
Pushed by fusionfuture into branch 'master'.

Fix default appstream handler

Discover ships a separate desktop file to act as URL handler, use that
FIXED-IN: 6.0.1

M  +1    -1    kde-mimeapps.list

https://invent.kde.org/plasma/plasma-desktop/-/commit/a6f84d7d3dcfbdec2e011af8c61f491fa970c963
Comment 10 Fushan Wen 2024-03-04 04:54:20 UTC
Git commit 54506e2b1405f5b5e8dade766b0ad63355e88f74 by Fushan Wen.
Committed on 04/03/2024 at 04:54.
Pushed by fusionfuture into branch 'Plasma/6.0'.

🍒Fix default appstream handler

Discover ships a separate desktop file to act as URL handler, use that
FIXED-IN: 6.0.1


(cherry picked from commit a6f84d7d3dcfbdec2e011af8c61f491fa970c963)

M  +1    -1    kde-mimeapps.list

https://invent.kde.org/plasma/plasma-desktop/-/commit/54506e2b1405f5b5e8dade766b0ad63355e88f74
Comment 11 Nicolas Fella 2024-03-05 19:57:27 UTC
*** Bug 482489 has been marked as a duplicate of this bug. ***
Comment 12 Szczepan Hołyszewski 2024-03-06 18:14:35 UTC
How can a user fix this for themselves without waiting for the fix to percolate through normal channels?
Comment 13 Nate Graham 2024-03-06 20:05:18 UTC
They can compile it themselves. But in this case there should be no need, as it's fixed in version 6.0.1 which was released yesterday.
Comment 14 Patrick Silva 2024-03-11 22:29:39 UTC
*** Bug 483296 has been marked as a duplicate of this bug. ***
Comment 15 Maarten Steevens 2024-03-17 13:40:18 UTC
Interestingly, the fix provided in plasma 6.0.1 actually seems to break kde neon. I just upgraded my kde neon installation from plasma 5 to 6.0.2 and kickoff was not showing any applications and the task manager on my panel was also not working. So I searched around found this bug report and manually reverted this change (https://invent.kde.org/plasma/plasma-desktop/-/commit/54506e2b1405f5b5e8dade766b0ad63355e88f74) and then everything started working again.