Bug 980467 - Fails to show VPN status correctly.
Summary: Fails to show VPN status correctly.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 967743 969855 995617 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-02 13:12 UTC by David Woodhouse
Modified: 2015-02-17 15:46 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 15:46:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 698962 0 None None None Never

Description David Woodhouse 2013-07-02 13:12:46 UTC
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 13:13:52 UTC
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 08:22:24 UTC
*** Bug 969855 has been marked as a duplicate of this bug. ***

Comment 3 Charles Bovy 2013-07-11 08:45:34 UTC
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 09:09:36 UTC
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 09:34:47 UTC
Minor issue still: VPN icon is missing when there is an active VPN connection.

Comment 6 Charles Bovy 2013-07-11 10:52:34 UTC
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 09:33:43 UTC
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 20:26:08 UTC
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 20:27:28 UTC
*** Bug 967743 has been marked as a duplicate of this bug. ***

Comment 10 Dan Williams 2013-09-20 20:28:49 UTC
*** Bug 995617 has been marked as a duplicate of this bug. ***

Comment 11 Dan Williams 2013-09-20 20:31:45 UTC
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-21 01:33:20 UTC
Thank you for quick attention, is this patch will be pushed to updated rpm ?

Comment 13 Fedora End Of Life 2015-01-09 18:36:40 UTC
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 15:46:50 UTC
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.