Bug 441546 - KService isValid() fails unknown error code 100 when TryExec= contains two binaries separated by space
Summary: KService isValid() fails unknown error code 100 when TryExec= contains two bi...
Status: REPORTED
Alias: None
Product: frameworks-kservice
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.83.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-25 20:24 UTC by Sandro
Modified: 2025-07-13 18:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
picture of the error message (29.12 KB, image/png)
2021-08-25 20:24 UTC, Sandro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sandro 2021-08-25 20:24:38 UTC
Created attachment 141049 [details]
picture of the error message

When trying to open a desktop file which contains an invalid TryExec like ``TryExec=nixGLIntel wezterm`` KDE presents the user with ``Unknown Error Code 100`` instead of explaining the situation properly. I believe this should be handled better by KDE.


STEPS TO REPRODUCE
1. Create a Desktop file named wezterm.desktop with the content:
```
[Desktop Entry]
Name=WezTerm
Comment=Wez's Terminal Emulator
Keywords=shell;prompt;command;commandline;cmd;
Icon=org.wezfurlong.wezterm
TryExec=nixGLIntel wezterm
Exec=nixGLIntel wezterm
Type=Application
Categories=System;TerminalEmulator;Utility;
Terminal=false
```
2. Open the directory in Dolphin
3. Try to execute the Desktop file
4. See the not describing error message

OBSERVED RESULT

See attachment

EXPECTED RESULT

Tell the user that the binary "nixGLIntel wezterm" does not exist or properly handle spaces.

SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: Debian Unstable
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.83.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
Comment 1 Sandro 2021-08-25 20:27:17 UTC
I believe that the error message originates from https://invent.kde.org/frameworks/kio/-/blob/master/src/gui/kprocessrunner.cpp#L76 and the validation code is in KService.