Bug 440062 - Error — KIOExec: Unable to create io-slave. klauncher said: Unknown protocol 'mailto'.
Summary: Error — KIOExec: Unable to create io-slave. klauncher said: Unknown protocol ...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.83.0
Platform: Other FreeBSD
: NOR minor
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 443297 450508 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-07-20 08:56 UTC by Graham Perrin
Modified: 2022-02-18 13:52 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.91


Attachments
Screenshot (180.28 KB, image/png)
2021-07-20 08:56 UTC, Graham Perrin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2021-07-20 08:56:40 UTC
Created attachment 140209 [details]
Screenshot

SUMMARY

Aiming to e-mail the author of Application Dashboard 1.0 (to report an Application Dashboard bug, not this bug) results an error, not an e-mail. 

STEPS TO REPRODUCE

1. Application Dashboard settings ▶ About

2. click the e-mail icon

OBSERVED RESULT

3. a dialogue, 

> Error — KIOExec
> 
> Unable to create io-slave. klauncher said: Unknown protocol 'mailto'.


EXPECTED RESULT

3. a draft e-mail in the preferred application (in my case, Thunderbird). 

SOFTWARE/OS VERSIONS

Operating System: FreeBSD 14.0
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 14.0-CURRENT (64-bit)
Graphics Platform: X11
Memory: 15.9 GiB of RAM
Graphics Processor: AMD TURKS

ADDITIONAL INFORMATION
Comment 1 Ondřej Růžička 2021-10-03 16:58:05 UTC
can confirm

possibly related to bug#292579 (?)

Operating System: openSUSE Tumbleweed 20210928
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.14.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7300U CPU @ 2.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Comment 2 Nicolas Fella 2021-10-05 11:26:22 UTC
*** Bug 443297 has been marked as a duplicate of this bug. ***
Comment 3 aronkvh 2021-10-23 13:41:38 UTC
I have the same issue as well.
Mailspring opens but doesn't set the attachment, Chrome with Gmail set as mailto default gives the same error as in the screenshot.


Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-25-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-3770 CPU @ 3.40GHz
Memory: 27,1 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000
Comment 4 Angelos Skembris 2021-11-16 13:38:09 UTC
Also present in my case with Thunderbird, openSUSE Tumbleweed 20211101, Plasma version 5.23.2, Frameworks 5.87.0. Error occurs when trying to open a "mailto:" link in Okular.
Comment 5 Nicolas Fella 2022-01-18 20:50:19 UTC
I figured out what is causing this. It's kind of a bug in Thunderbird (and potentially other mail clients).

Adding "x-scheme-handler/mailto;" to thunderbird's .desktop file fixes it. The problem is that without that KIO assumes that the app doesn't understand mailto URLs and then tries to convert those into local files using kioexec, which doesn't make sense.

Unfortunately with Thunderbird it's a mess since upstream doesn't ship a .desktop file and every distro adds one downstream, which is why such issues creep in
Comment 6 Nicolas Fella 2022-01-18 20:53:51 UTC
*Adding "MimeType=x-scheme-handler/mailto;"
Comment 7 Bug Janitor Service 2022-01-18 20:59:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/718
Comment 8 Bug Janitor Service 2022-01-18 21:39:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/719
Comment 9 Bug Janitor Service 2022-01-19 01:29:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/720
Comment 10 Axel Schwank 2022-01-19 17:59:18 UTC
Hi Nicolas,

unfortunately, I cannot confirm this solution. The thunderbird.desktop file in place here already contains this entry
MimeType=x-scheme-handler/mailto;
but the problem still exists.

Operating System: openSUSE Leap 15.3
KDE Plasma Version: 5.18.6
KDE Frameworks Version: 5.76.0
Qt Version: 5.12.7
Thunderbird Version: 91.5.0-lp153.1.1 from Package Repository obs://build.opensuse.org/mozilla
Comment 11 barry 2022-01-26 18:43:38 UTC
I also have the x-scheme-handler in my `thunderbird.desktop` file.  In my case, the issue was caused by the presence of a skeletal `user-app-XXXXXX-thunderbird.desktop` file in `~/.local/share/applications` which did not contain any of the relevant MIME info.  Not sure who creates these, but firefox and thunderbird are the big targets for this duplication.  After removing the one in `~/.local/share/applications`, my system took advantage of the full file in the usual `/usr/share/applications` directory, and followed the mailto links without issue.
Comment 12 Nicolas Fella 2022-01-26 19:08:05 UTC
That is a very interesting observation, thanks.

This file seems to be created by Thunderbird when it sets itself as the default application. It creates that file and then changes the default app for x-scheme-handler/maito to be that desktop file.

this is also the root cause for https://bugs.kde.org/show_bug.cgi?id=421582
Comment 13 Nicolas Fella 2022-01-26 19:09:27 UTC
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1637575
Comment 14 Nicolas Fella 2022-01-26 19:28:05 UTC
And https://bugzilla.mozilla.org/show_bug.cgi?id=1752195
Comment 15 Nicolas Fella 2022-01-31 00:32:27 UTC
Git commit bba0a515ba6aff35cdb66ae9b462faa1059b70e9 by Nicolas Fella.
Committed on 31/01/2022 at 00:17.
Pushed by nicolasfella into branch 'master'.

[desktopexecparser] Consider associations from mimeapps.list to determine whether an app supports a scheme

Currently we check whether an app has MimeType=x-scheme-handler/foo in its desktop file.

This breaks for some apps, e.g. thunderbird handles mailto but does not always have it marked as such in its desktop file.

Also it ignores manual associations in mimeapps.list

Check whether the relevant app is in the list of possible handlers for that url scheme and don't use kioexec in that case
Related: bug 439132

M  +10   -0    src/core/desktopexecparser.cpp

https://invent.kde.org/frameworks/kio/commit/bba0a515ba6aff35cdb66ae9b462faa1059b70e9
Comment 16 Nicolas Fella 2022-02-18 13:52:22 UTC
*** Bug 450508 has been marked as a duplicate of this bug. ***