Bug 470549 - Error while communicating with the global shortcuts service
Summary: Error while communicating with the global shortcuts service
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: 5.27.5
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-02 09:45 UTC by Aleksander
Modified: 2024-03-03 03:16 UTC (History)
5 users (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 Aleksander 2023-06-02 09:45:32 UTC
SUMMARY
Error while communicating with the global shortcuts service

STEPS TO REPRODUCE
1. Open "Shortcuts" -> "Shortcuts" settings
2. Wait or configure about 30 seconds
3. Get an "Error while communicating with the global shortcuts service"

OBSERVED RESULT
1. "Error while communicating with the global shortcuts service" message and impossibility to interact with "Shortcuts" menu. 
2. "Global shortcuts" menu is missing.

EXPECTED RESULT
1. No errors
2. Possibility to configure Global shortcuts


SOFTWARE/OS VERSIONS
KDE neon 5.27
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Comment 1 David Redondo 2023-06-05 09:21:36 UTC
What is printed when you run 
kcmshell5 kcm_keys 
and the error occurs?

Is kglobalaccel5 running? What does 
systemctl status --user plasma-kglobalaccel.service
say?
Comment 2 Nate Graham 2023-06-05 16:28:39 UTC
Yeah, this is most likely a local setup issue. Maybe something is preventing dbus communication with kglobalaccel daemon, or also kglobalaccel might be installed somehow. Please answer David's questions.

Also are you using Wayland or X11?
Comment 3 Aleksander 2023-06-13 09:06:14 UTC
(In reply to David Redondo from comment #1)
> What is printed when you run 
> kcmshell5 kcm_keys 
> and the error occurs?

The following text is printed:
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/templates/InlineMessage.qml:265:13: QML SelectableLabel: Binding loop detected for property "implicitWidth"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/templates/OverlaySheet.qml:246:38: QML FocusScope: Binding loop detected for property "contentItemMaximumWidth"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/templates/OverlaySheet.qml:246:38: QML FocusScope: Binding loop detected for property "contentItemMaximumWidth"
org.kde.kcm_keys: "Error while calling allComponents()"
org.kde.kcm_keys: "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

Then shortcuts settings are opened. Error occurs as usual within one minute.

> Is kglobalaccel5 running? What does 
> systemctl status --user plasma-kglobalaccel.service
> say?

● plasma-kglobalaccel.service - KDE Global Shortcuts Server
     Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
     Active: active (running) since Tue 2023-06-13 11:28:56 MSK; 29min ago
   Main PID: 1617 (kglobalaccel5)
      Tasks: 3 (limit: 38162)
     Memory: 5.0M
        CPU: 551ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/background.slice/plasma-kglobalaccel.service
             └─1617 /usr/bin/kglobalaccel5

jun 13 11:56:38 master-h510ms2hv2 kglobalaccel5[1617]: QDBusObjectPath: invalid path "/component/_windows_sample_application_desktop"
jun 13 11:56:38 master-h510ms2hv2 kglobalaccel5[1617]: QDBusObjectPath: invalid path "/component/wine_Programs_windows_sample_application_desktop"
jun 13 11:56:38 master-h510ms2hv2 kglobalaccel5[1617]: QDBusConnection: error: could not send reply message to service "": Marshalling failed: Invalid obje>

So this could be due to failed Wine application?
Comment 4 Aleksander 2023-06-13 09:19:10 UTC
(In reply to Nate Graham from comment #2)
> Also are you using Wayland or X11?

Neither of these. I don't even know what those things are. Just a clean KDE Neon I installed about 2 months ago.
Comment 5 David Redondo 2023-06-13 12:12:16 UTC
We have a bad objectpath apparently? But why does it only fail when calling allComponents and not earlier (when kdeglobalacceld is registering it)?
Comment 6 Aleksander 2023-06-15 12:51:25 UTC
(In reply to David Redondo from comment #5)
> We have a bad objectpath apparently? But why does it only fail when calling
> allComponents and not earlier (when kdeglobalacceld is registering it)?

I'm a new user here and IDK what is happening under the hood and how this crap works, I just want to fix it. 
Do you know how to get rid of calling that objectpath?
Comment 7 David Redondo 2023-06-15 12:59:12 UTC
(In reply to Aleksander from comment #6)
> (In reply to David Redondo from comment #5)
> > We have a bad objectpath apparently? But why does it only fail when calling
> > allComponents and not earlier (when kdeglobalacceld is registering it)?
> 
> I'm a new user here and IDK what is happening under the hood and how this
> crap works, I just want to fix it. 
> Do you know how to get rid of calling that objectpath?

Sorry the question was not directed at you, just a thought relating to the bug. It's something that happens soemtimes, people writing what they think about a bug or findings of their investigation so far so it doesn't get lost and to share with others developers that are looking at the report. Also is helpful when adding another person to the report as I did.
Comment 8 Aleksey Randay 2024-01-23 20:25:04 UTC
Hi there. 
The problem is in ~/.config/kglobalshortcutsrc. More precisely, most likely wine (I assume) added a shortcut to the code, and after deleting wine, it did not delete the shortcut, which is why the plasma-kglobalaccel.service service broke(Or the user simply incorrectly added opening the application via shortcut, which is why everything broke). This service complains about invalid path "/component/_windows_sample_application_desktop" and invalid path "/component/wine_Programs_windows_sample_application_desktop", so you need to open ~/.config/kglobalshortcutsrc and delete any lines associated with _windows_sample_application_desktop and wine_Programs_windows_sample_application_desktop. It's also worth checking ~/.local/share/applications. Good luck
Comment 9 Andres 2024-03-03 03:16:50 UTC
I am getting this issue after upgrading to plasma 6