JS ERROR: TypeError: item is undefined, breaks VPN indicator
My VPN indicator is broken currently. gnome-shell is not showing the secure lock icon next to the network icon, even though my VPN is active (as shown in gnome-control-center). I see a JS error:
JS ERROR: TypeError: item is undefined
setActiveConnections/<@resource:///org/gnome/shell/ui/status/network.js:1497:17
setActiveConnections@resource:///org/gnome/shell/ui/status/network.js:1494:9
_syncVpnConnections@resource:///org/gnome/shell/ui/status/network.js:1826:9
_clientGot@resource:///org/gnome/shell/ui/status/network.js:1639:9
I don't think this is a regression in 3.32; I've seen it several times before. I don't know how to reproduce, though. Seems random.
Failing code:
setActiveConnections(vpnConnections) {
let connections = this._connectionItems.values();
for (let item of connections) {
item.setActiveConnection(null);
}
vpnConnections.forEach(a => {
if (a.connection) {
let item = this._connectionItems.get(a.connection.get_uuid());
item.setActiveConnection(a); // <-- item is undefined here
}
});
}
Edited by Michael Catanzaro