After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759793 - Tracebacks when activating VPN connection
Tracebacks when activating VPN connection
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 768730 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-12-23 01:53 UTC by Michael Catanzaro
Modified: 2016-12-27 18:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Avoid JS error when activating VPN connection (1.19 KB, patch)
2016-12-20 20:04 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2015-12-23 01:53:01 UTC
It prints three times when activating my VPNC connection from the status menu:

Dec 22 19:48:59 victory-road NetworkManager[1355]: <info>  Starting VPN service 'vpnc'...
Dec 22 19:48:59 victory-road NetworkManager[1355]: <info>  VPN service 'vpnc' started (org.freedesktop.NetworkManager.vpnc), PID 3043
Dec 22 19:48:59 victory-road gnome-shell-wayland.desktop[1907]: (gnome-shell:1907): Gjs-WARNING **: JS ERROR: TypeError: a._connection is null
Dec 22 19:48:59 victory-road gnome-shell-wayland.desktop[1907]: NMVPNSection<.setActiveConnections/<@resource:///org/gnome/shell/ui/status/network.js:1534
Dec 22 19:48:59 victory-road gnome-shell-wayland.desktop[1907]: NMVPNSection<.setActiveConnections@resource:///org/gnome/shell/ui/status/network.js:1533
Dec 22 19:48:59 victory-road gnome-shell-wayland.desktop[1907]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec 22 19:48:59 victory-road gnome-shell-wayland.desktop[1907]: NMApplet<._syncVPNConnections@resource:///org/gnome/shell/ui/status/network.js:1822
Dec 22 19:48:59 victory-road gnome-shell-wayland.desktop[1907]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Comment 1 Michael Catanzaro 2016-12-20 20:04:14 UTC
Created attachment 342285 [details] [review]
network: Avoid JS error when activating VPN connection

If the call to settings.get_connection_by_path in
ensureActiveConnectionProps returns null, we'll hit a JS error here.
Seems to happen always when activating a VPN connection. Avoid that.

Note: I'm not sure if this is right or not. At least it should avoid the error.
Comment 2 Michael Catanzaro 2016-12-20 20:04:31 UTC
*** Bug 768730 has been marked as a duplicate of this bug. ***
Comment 3 Giovanni Campagna 2016-12-27 17:14:26 UTC
Review of attachment 342285 [details] [review]:

I hit the error again on 3.22.2, so it's worth fixing.

I believe this is papering over an existing bug, but it's possible for settings.get_connection_by_path() to legitimately return null (if the connection is owned by a different user and invisible to the current one), so the fix is correct anyway.
Comment 4 Giovanni Campagna 2016-12-27 17:15:34 UTC
For the record, I think the error is just a race condition in the handling of different dbus signals from NM.
The steady state, after the exception, is correct, and the right connection is shown.
Comment 5 Michael Catanzaro 2016-12-27 18:12:57 UTC
(In reply to Giovanni Campagna from comment #4)
> For the record, I think the error is just a race condition in the handling
> of different dbus signals from NM.
> The steady state, after the exception, is correct, and the right connection
> is shown.

Do you want to file a different bug for this, or reuse this one?
Comment 6 Michael Catanzaro 2016-12-27 18:15:12 UTC
Attachment 342285 [details] pushed as da7db50 - network: Avoid JS error when activating VPN connection