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 670631 - Keeps asking for wireless password
Keeps asking for wireless password
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Wi-Fi
git master
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-02-22 18:38 UTC by Mathieu Trudel-Lapierre
Modified: 2014-01-23 20:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't reset retries after 5 min if the failure was because there were no secrets (1.35 KB, patch)
2014-01-08 16:56 UTC, Mathieu Trudel-Lapierre
none Details | Review

Description Mathieu Trudel-Lapierre 2012-02-22 18:38:01 UTC
Originally reported downstream in Launchpad: http://pad.lv/923737

This issue is actually both in NM and nm-applet -- what seems to happen is that despite NM gives up connecting to ask an agent for the password to a wireless network (if the password has changed or something), it doesn't turn down the link.

Later, what seems like a rescan will trigger the last activated connection to be activated again, thus ending up asking for the password again...

The result, an increasing number of auth dialogs for the same wireless network appear on screen.

Relevant excerpt from syslog:

Feb 22 13:24:48 selene NetworkManager[879]: <warn> No agents were available for this request.
Feb 22 13:24:48 selene NetworkManager[879]: <info> (wlan0): device state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
Feb 22 13:24:48 selene NetworkManager[879]: <warn> Activation (wlan0) failed for access point (rebirth_NET)
Feb 22 13:24:48 selene NetworkManager[879]: <info> Marking connection 'rebirth_NET' invalid.
Feb 22 13:24:48 selene NetworkManager[879]: <warn> Activation (wlan0) failed.
Feb 22 13:24:48 selene NetworkManager[879]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Feb 22 13:24:48 selene NetworkManager[879]: <info> (wlan0): deactivating device (reason 'none') [0]
Feb 22 13:29:48 selene NetworkManager[879]: <info> Auto-activating connection 'rebirth_NET'.
Feb 22 13:29:48 selene NetworkManager[879]: <info> Activation (wlan0) starting connection 'rebirth_NET'
Feb 22 13:29:48 selene NetworkManager[879]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb 22 13:29:48 selene NetworkManager[879]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Comment 1 Dan Williams 2012-05-03 22:41:12 UTC
Yeah, connections get failed for a short period of time and then retried after a while, like 5 minutes.  The real fix here is to make NM smarter about asking for passwords, ie, make it ask for them less and just notify you that "hey your password may be wrong".  I dont' think there's a problem with periodically attempting reconnection to a configured wifi network, but the failure case shouldn't be quite so in-your-face.
Comment 2 Reuben Thomas 2013-01-23 16:38:46 UTC
Isn't there some way that NM can distinguish between an authentication failure (hence the password might be wrong) and a general failure to connect (because of inability to talk to the AP)?

There's a particular problem with the user interaction here: frequently, I find one of these password dialogs pops up when I'm already typing, and I type an unknown number of characters at the end of an already correct password. It's easy to mess up a stored password this way. It would seem to be more sensible to use a notification than a popup dialog, then the user can deal with it when they like (often, I don't care immediately that there are network problems, if I'm working on something offline).
Comment 3 Mathieu Trudel-Lapierre 2013-01-23 17:34:05 UTC
As far as I know this is in fact fixed in git already. I'll double check myself in a little while but we can probably easily get the confirmation from Dan.
Comment 4 Reuben Thomas 2013-01-23 17:35:53 UTC
Great, thanks, I hope this means it lands in GNOME 3.8!
Comment 5 Dan Winship 2014-01-02 17:30:43 UTC
(In reply to comment #3)
> As far as I know this is in fact fixed in git already.
Comment 6 Reuben Thomas 2014-01-02 17:33:36 UTC
If you're relying purely on comment #3 to close this bug, not so fast! The bug is certainly still present in network-manager 0.9.8.0.
Comment 7 Mathieu Trudel-Lapierre 2014-01-08 16:55:35 UTC
Indeed, it's not fixed. I could confirm myself after I got a new report of the same issue popping up again; it's just harder for me to reproduce given that part of the code changed as per bug 665503.

Reopening.
Comment 8 Mathieu Trudel-Lapierre 2014-01-08 16:56:20 UTC
Created attachment 265726 [details] [review]
don't reset retries after 5 min if the failure was because there were no secrets
Comment 9 Thomas Haller 2014-01-09 14:21:46 UTC
(In reply to comment #8)
> Created an attachment (id=265726) [details] [review]
> don't reset retries after 5 min if the failure was because there were no
> secrets

ACK, this looks correct to me.

Maybe we can reference the full URLs in the commit message?
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1224040
https://bugzilla.gnome.org/show_bug.cgi?id=670631



Also, the use of RESET_RETRIES_TIMESTAMP_TAG, FAILURE_REASON_TAG and RETRIES_TAG is a bit convoluted. Maybe we could cleanup all in a second patch.
Comment 10 Dan Winship 2014-01-09 16:19:45 UTC
(In reply to comment #9)
> Also, the use of RESET_RETRIES_TIMESTAMP_TAG, FAILURE_REASON_TAG and
> RETRIES_TAG is a bit convoluted. Maybe we could cleanup all in a second patch.

see the danw/autoconnect branch
Comment 11 Dan Winship 2014-01-23 20:19:12 UTC
fixed in master