I think I found out what the error message means. According to GPT-OSS 120B:
The error is produced by Qt’s portal integration layer when it tries to register the application that is going to open the URL (in this case
org.kde.kioclient).On a Wayland session the xdg‑desktop‑portal service is consulted via D‑Bus; it expects the caller to have a valid desktop‑file entry (the “App ID”) that it can look up in the system’s desktop‑file database.
The AI says it doesn’t affect Plasma on X11 because X11 doesn’t use the portal.
It recommended creating a desktop file called “org.kde.kioclient.desktop“, and adding it to /usr/share/applications to provide the correct App ID:
[Desktop Entry]
Name=KDE Kioclient (compat)
Exec=kioclient5 %u
Type=Application
NoDisplay=true
X-Desktop-File-Install-Version=5.0
I tried it, and I can now use xdg-open without causing the error.
The AI also gave me bad links to supposed bug entries on Arch and KDE’s Bugzilla that went to either 404 pages or the wrong bug reports, so that wasn’t helpful, but at least it gave me a decent workaround.