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 684823 - "Activation of network connection failed" for user-canceled operations
"Activation of network connection failed" for user-canceled operations
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 685327
Blocks:
 
 
Reported: 2012-09-25 21:18 UTC by Cosimo Cecchi
Modified: 2012-12-03 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkMenu: don't notify for failed connections if cancelled by the user (1.77 KB, patch)
2012-10-02 19:04 UTC, Giovanni Campagna
committed Details | Review

Description Cosimo Cecchi 2012-09-25 21:18:38 UTC
To reproduce:
- select a protected wireless in range from the network menu, for which no secrets are saved in the session yet
- at the password prompt press Cancel
- you'll get an "Activation of network connection failed" notification

The use of this notification is unnecessary; since the user manually canceled the password dialog just one instant before, the notification is just extra noise.
Comment 1 Carlos Soriano 2012-09-29 18:43:13 UTC
"This problem" is commented in the code indirectly.

In the code:
"
// XXX: nm-applet has no special text depending on reason
// but I'm not sure of this generic message
"

The problem is that nm-applet launch a NM_DEVICE_STATE_REASON_NO_SECRETS when we cancel. And this can be caused for cancel the dialog or for other reasons. So we can discern between "reasons".
I think that we have to file a bug against nm-applet.
Can someone confirm this?
Comment 2 Giovanni Campagna 2012-10-02 18:58:57 UTC
I can confirm it partially, in the sense that yes, we can discern based on the reason, but no, nm-applet is not at all involved in those notifications (and indeed, it should not be running at all in a non fallback session).
I'll prepare a patch.
Comment 3 Giovanni Campagna 2012-10-02 19:04:11 UTC
Created attachment 225611 [details] [review]
NetworkMenu: don't notify for failed connections if cancelled by the user

If the user cancels the secret dialog, the NM will report the connection
failure, but we should not notify it as it is a user-initiated action.
Comment 4 Carlos Soriano 2012-10-02 19:48:59 UTC
Thanks Giovanni for the patch.
Comment 5 Cosimo Cecchi 2012-10-02 20:08:31 UTC
I tested the patch, and it indeed suppresses the Shell notification.
I still seem to get another kind of notification, probably from nm-applet, with a non-symbolic icon; I get both that and the shell one without the patch though, so I think this is good to apply.
Comment 6 Cosimo Cecchi 2012-10-02 20:21:39 UTC
I filed https://bugzilla.gnome.org/show_bug.cgi?id=685327 for network-manager-applet.

Why does the applet need to run at all in a non-fallback session though?
Comment 7 Giovanni Campagna 2012-10-14 16:50:38 UTC
(In reply to comment #5)
> I tested the patch, and it indeed suppresses the Shell notification.
> I still seem to get another kind of notification, probably from nm-applet, with
> a non-symbolic icon; I get both that and the shell one without the patch
> though, so I think this is good to apply.

Uhm... does that count as a review?
Comment 8 Matthias Clasen 2012-10-15 19:25:40 UTC
would be nice to get this in for 3.6.1
Comment 9 Cosimo Cecchi 2012-10-16 00:49:19 UTC
(In reply to comment #7)

> Uhm... does that count as a review?

I don't know that code, so probably not, but it fixes the bug.
Comment 10 Giovanni Campagna 2012-12-03 18:03:27 UTC
Bah, nobody complained, let's get this in...
Attachment 225611 [details] pushed as 6b1e632 - NetworkMenu: don't notify for failed connections if cancelled by the user