Bug 980467 - Fails to show VPN status correctly.
Fails to show VPN status correctly.
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gnome-shell (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Owen Taylor
Fedora Extras Quality Assurance
:
: 967743 969855 995617 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-02 09:12 EDT by David Woodhouse
Modified: 2015-02-17 10:46 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 10:46:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 698962 None None None Never

  None (edit)
Description David Woodhouse 2013-07-02 09:12:46 EDT
1. Log in to GNOME
2. Click the network icon and find VPN connection in the list.
3. Click where it says 'off' to turn that connection 'on'.
4. Authentication dialog pops up. Fill it in, connect.
5. Notification pop-up occurs, telling me I'm connected to the VPN.
6. nmcli says I'm connected to the VPN:
$ nmcli c status
NAME                      UUID                                   DEVICES    DEFAULT  VPN   MASTER-PATH                                 
Auto eth0                 055a615c-04a2-40e2-b26b-fa957f9eefaa   eth0       yes      no    --                                          
Intel AnyConnect VPN      591b235e-691f-4f94-8f99-fc38ee9f1231   eth0       no       yes   /org/freedesktop/NetworkManager/Devices/0   

7. Click the network icon again. Observe that the slider for the VPN still
   shows that the VPN is disconnected. 
8. Click it again to see what happens. It actually *kills* the existing VPN
   connection and immediately pops up a dialog to connect again.
Comment 1 David Woodhouse 2013-07-02 09:13:52 EDT
On that final step, as the authentication dialog appears, I get this output from gnome-shell:

    JS ERROR: !!!   Exception was: TypeError: obj.active is undefined
    JS ERROR: !!!     message = '"obj.active is undefined"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/status/network.js"'
    JS ERROR: !!!     lineNumber = '1564'
    JS ERROR: !!!     stack = '"([object GObject_Object])@/usr/share/gnome-shell/js/ui/status/network.js:1564
wrapper([object GObject_Object])@/usr/share/gjs-1.0/lang.js:213
()@/usr/share/gnome-shell/js/ui/status/network.js:2031
wrapper()@/usr/share/gjs-1.0/lang.js:213
([object GObject_Object],[object GObject_ParamSpec])@/usr/share/gnome-shell/js/ui/status/network.js:2292
wrapper([object GObject_Object],[object GObject_ParamSpec])@/usr/share/gjs-1.0/lang.js:213
"'
Comment 2 David Woodhouse 2013-07-10 04:22:24 EDT
*** Bug 969855 has been marked as a duplicate of this bug. ***
Comment 3 Charles Bovy 2013-07-11 04:45:34 EDT
Issue is fixed upstream in master.
By just taking /usr/share/gnome-shell/js/ui/status/network.js of master, it functions correctly.
I haven't checked what commit did fix it.
Comment 4 David Woodhouse 2013-07-11 05:09:36 EDT
That also works here; thanks. Still very confused that this appears to happen on one of my machines, but not another with identically-configured VPN.
Comment 5 Charles Bovy 2013-07-11 05:34:47 EDT
Minor issue still: VPN icon is missing when there is an active VPN connection.
Comment 6 Charles Bovy 2013-07-11 06:52:34 EDT
Quick and dirty patch to show encrypted VPN icon on VPN connection:

@@ -1960,5 +1960,6 @@
         }
 
         this._vpnIcon.icon_name = this._vpnSection.getIndicatorIcon();
+	this._vpnIcon.show();
     }
 });
Comment 7 David Woodhouse 2013-07-14 05:33:43 EDT
Bug 967743 still doesn't seem fixed though. After my VPN session expires and I'm logged out, the network list still just says 'connection failed' and won't let me attempt to reconnect.

Is there a way to go back to using nm-applet?
Comment 8 Dan Williams 2013-09-20 16:26:08 EDT
If you modify /usr/share/gnome-shell/js/ui/status/network.js checkConnection() method like so:

    checkConnection: function(connection) {
        let pos = this._findConnection(connection.get_uuid());
        let exists = pos != -1;
        let valid = this.connectionValid(connection);
        let same = false;
        if (exists) {
            let existing = this._connections[pos];

-            // Check if connection changed name or id
-            similar = existing.name == connection.get_id();
-                existing.timestamp == connection._timestamp;
+            same = existing.uuid == connection.get_uuid();
        }

does that fix the issue for you?  The core problem is that the timestamp is different because udpateConnection() fails to correctly update the timestamps and thus the VPN connection gets added/removed and when it's removed, it clears '.active' and thus fun things happen.  Comparing (name+timestamp) is not the right approach here anyway, it should only be using UUID.
Comment 9 Dan Williams 2013-09-20 16:27:28 EDT
*** Bug 967743 has been marked as a duplicate of this bug. ***
Comment 10 Dan Williams 2013-09-20 16:28:49 EDT
*** Bug 995617 has been marked as a duplicate of this bug. ***
Comment 11 Dan Williams 2013-09-20 16:31:45 EDT
Fixed patch:

    checkConnection: function(connection) {
        let pos = this._findConnection(connection.get_uuid());
        let exists = pos != -1;
        let valid = this.connectionValid(connection);
        let similar = false;
        if (exists) {
            let existing = this._connections[pos];

-            // Check if connection changed name or id
-            similar = existing.name == connection.get_id();
-                existing.timestamp == connection._timestamp;
+            similar = existing.uuid == connection.get_uuid();
        }
Comment 12 Slava 2013-09-20 21:33:20 EDT
Thank you for quick attention, is this patch will be pushed to updated rpm ?
Comment 13 Fedora End Of Life 2015-01-09 13:36:40 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 14 Fedora End Of Life 2015-02-17 10:46:50 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.