status/network: NMDevice.get_path() can't get the dbus path
Version:
gnome-shell: 40.3
NetworkManager:1.32.4
gnome-control-center: 40.0
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/status/network.js#L997
let accessPoints = network.accessPoints;
if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT) ||
(accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
// 802.1x-enabled APs require further configuration, so they're
// handled in gnome-control-center
launchSettingsPanel('wifi', 'connect-8021x-wifi',
this._device.get_path(), accessPoints[0].get_path());
Here the gnome-control-center needs the dbus path for the NMDevice, but now the this._device.get_path()
returns the pci path, then the gnome-control-center can't open the right page. And some time the this._device.get_path()
returns null when there is no pci path(using hostapd), the gnome-contro-center can't be opened, and get the error message in journal log:
Jun 21 05:24:49 susetest gnome-shell[998]: JS ERROR: Error: Argument string may not be null
_packVariant@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:87:29
_init/this.Variant._new_internal@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:281:35
launchSettingsPanel/param<@resource:///org/gnome/shell/ui/status/network.js:89:31
launchSettingsPanel@resource:///org/gnome/shell/ui/status/network.js:89:22
_connect@resource:///org/gnome/shell/ui/status/network.js:966:36
Expect that the gnome-control-center can open the right page.