Bug 400359 - kded module fails to connect to NM on NM restarts
Summary: kded module fails to connect to NM on NM restarts
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-27 09:52 UTC by Fabian Vogt
Modified: 2018-11-06 19:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2018-10-27 09:52:31 UTC
Changes in NM lately (I suppose https://github.com/NetworkManager/NetworkManager/commit/4672499b95083d2f4b38ec9f409d72c74ade2902) changed the dbus initialization order.

This results in multiple errors like

No such interface 'org.freedesktop.NetworkManager.AgentManager' on object at path /org/freedesktop/NetworkManager/AgentManager

in the dbus traffic from kded on the system bus.

The result is in this case a missing secret agent.
Comment 1 Fabian Vogt 2018-10-27 23:42:15 UTC
Attempt at fixing this: https://phabricator.kde.org/D16471
Comment 2 anidev 2018-11-02 09:05:24 UTC
Just want to chime and confirm I have this exact issue with kde 5.51.0 / Qt 5.11.2 plasma-nm 5.14.2 / NetworkManager 1.14.0, on OpenSUSE. Happens everytime NM is restarted, which in my case happens when I update the package. I've had this issue for a while now. Also seems like #398524 is the same issue.
Comment 3 Fabian Vogt 2018-11-06 19:18:32 UTC
Git commit fa472e6a5e2637a681f61e75cf0988bf847f46ed by Fabian Vogt.
Committed on 06/11/2018 at 19:17.
Pushed by fvogt into branch 'master'.

Listen for added DBus interfaces instead of registered services

Summary:
When the service is registered, the interfaces might not be available yet.
So wait for those instead.

This was RFC because:
- I'm not sure whether it's guaranteed that InterfacesAdded is emitted on
  service registration as well or both connections are necessary
- I don't know how it's possible to test this as org.kde.fakenetwork does
  not support the org.freedesktop.ObjectManager API

Test Plan:
Restarting NM while kded5 keeps running caused "nmcli up" to fail because of
missing secrets.
With this patch, it works successfully.

Reviewers: #frameworks, jgrulich

Reviewed By: jgrulich

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16471

M  +16   -8    src/manager.cpp
M  +3    -1    src/manager_p.h
M  +12   -3    src/secretagent.cpp
M  +1    -0    src/secretagent.h
M  +1    -1    src/secretagent_p.h

https://commits.kde.org/networkmanager-qt/fa472e6a5e2637a681f61e75cf0988bf847f46ed