Cancel 'Wireles Key Required' dialog, can't connect on subsequent attempt

Bug #124706 reported by Reinhard Tartler
20
Affects Status Importance Assigned to Milestone
NetworkManager
Expired
High
network-manager (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Won't Fix
Medium
Unassigned
Intrepid
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: network-manager

- Sometimes, NM tries to connect, but thinks association failed because of wrong credentials.
- NM and asks for a password then.
- I press 'Cancel' and try again.
- Most of the cases, connection then works

If this bug happens, I always have this snippet in the log:

Jul 8 09:59:33 faui44a NetworkManager: nm_device_is_802_3_ethernet: assertion `dev != NULL' failed
Jul 8 09:59:33 faui44a NetworkManager: nm_device_is_802_11_wireless: assertion `dev != NULL' failed

Version information:
ii network-manager 0.6.5-0ubuntu6 network management framework daemon

Revision history for this message
Reinhard Tartler (siretart) wrote :
description: updated
Changed in network-manager:
status: Unknown → New
Revision history for this message
Basilio Kublik (sourcercito) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here:
http://bugzilla.gnome.org/show_bug.cgi?id=454697

Changed in network-manager:
assignee: nobody → desktop-bugs
status: New → Invalid
Changed in network-manager:
status: Invalid → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

is this issue still present for you in latest gutsy network-manager 0.6.5-0ubuntu15?

 - Alexander

Changed in network-manager:
assignee: desktop-bugs → nobody
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

This bug report is being closed because we received no reponse to the last inquiry for information. Please reopen it if this is still an issue in the current Gutsy Gibbon release. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Please don't hesitate to submit bug reports in the future, we really appreciate it. Thanks again!

Changed in network-manager:
status: Incomplete → Invalid
Changed in network-manager:
status: New → Invalid
Revision history for this message
Jens Gersdorf (jens-gersdorf) wrote :

I encountered this bug in Gutsy Gibbon.

When I just boot my notebook, I often see the following happen:

* 1.) Trying to connect to WLAN, but then I'm being asked for the WPA Key, although this key is already stored in the key chain.
In the logfile, I see the following:
....
Dec 16 11:29:09 jens-laptop NetworkManager: <info> Activation (eth1/wireless): access point 'DSLWLANXQRZ' is encrypted, and a key exists. No new key needed.
....
Dec 16 11:29:36 jens-laptop NetworkManager: <info> Activation (eth1/wireless): disconnected during association, asking for new key.
Dec 16 11:29:36 jens-laptop NetworkManager: <info> Activation (eth1) New wireless user key requested for network 'DSLWLANXQRZ'.
....

* 2.) I cancel the dialog asking me for a new key.
...
Dec 16 11:30:26 jens-laptop NetworkManager: <info> Activation (eth1) New wireless user key request for network 'DSLWLANXQRZ' was canceled.
...

* 3.) I try again to connect to the network. For some milliseconds I think it is now working, but then again I am disconnected. For some reason NetworkManager thinks the connection is no longer valid???
....
Dec 16 11:30:29 jens-laptop NetworkManager: <info> Activation (eth1/wireless): access point 'DSLWLANXQRZ' is encrypted, and a key exists. No new key needed.
...
Dec 16 11:30:50 jens-laptop NetworkManager: <info> Activation (eth1/wireless) Stage 2 of 5 (Device Configure) successful. Connected to access point 'DSLWLANXQRZ'.
....
Dec 16 11:31:07 jens-laptop NetworkManager: <info> Activation (eth1) successful, device activated.
Dec 16 11:31:07 jens-laptop NetworkManager: <debug> [1197801067.245940] nm_dbus_signal_filter(): NetworkManagerInfo triggered update of wireless network 'DSLWLANXQRZ'
Dec 16 11:31:07 jens-laptop NetworkManager: <info> SWITCH: terminating current connection 'eth1' because it's no longer valid.
Dec 16 11:31:07 jens-laptop NetworkManager: <info> Deactivating device eth1.
Dec 16 11:31:08 jens-laptop NetworkManager: nm_device_is_802_3_ethernet: assertion `dev != NULL' failed
Dec 16 11:31:08 jens-laptop NetworkManager: nm_device_is_802_11_wireless: assertion `dev != NULL' failed

* 4.) Again I force the NetworkManager to connect to my WLAN, and now everything works fine.

Network Manager is using the following driver on my notebook.
Dec 16 11:28:38 jens-laptop NetworkManager: <info> eth1: Device is fully-supported using driver 'ipw3945'.

Find attached the complete log of NetworkManager.

Revision history for this message
Jens Gersdorf (jens-gersdorf) wrote :

Changed Status to New as I can confirm this bug under Gutsy Gibbon.

Changed in network-manager:
status: Invalid → New
Revision history for this message
Olivier (olivier-lacroix) wrote :

Hi !

I started to encounter this bug in Hardy recently. I never had any problem with NM before. I am using NM on a centrino (ipw2200) platform

Revision history for this message
Yan Li (yanli) wrote :

Same problem for me. I'm running a Hardy kernel (2.6.24-8-generic i686) on a Gutsy system, with network-manager-gnome 0.6.5-0ubuntu10.

Changed in network-manager:
status: New → Confirmed
Revision history for this message
LCID Fire (lcid-fire) wrote :

Same here - did work with gutsy - after upgrade to hardy it's broken.
My current kernel is 2.6.24-12-rt.

Revision history for this message
LCID Fire (lcid-fire) wrote :

Did work for me when I remove the networks from the editor and then it searches and connects anew.

Revision history for this message
LCID Fire (lcid-fire) wrote :

Actually the problem were I tried to connect to another wireless network which had the same name as my home network: "default". Seems like using the same network name is a problem.

Revision history for this message
Tony Espy (awe) wrote : Confirmed in Hardy...

I ran into this while testing Ubuntu Mobile. We have a private bug that's been reported about this behavior ( ie. hit cancel on passphrase dialog, can't connect on next try ).

The red herring exists in the file nm_dbus_nmi.c, in the function nm_dbus_get_wireless_user_key_done(), lines: 66-72:

-------

/* FIXME: since we're not marking the device as invalid, it's a fair bet
 * that NM will just try to reactivate the device again, and may fail
 * to get the user key in exactly the same way, which ends up right back
 * here... ad nauseaum. Figure out how to deal with a failure here.
 */

nm_ap_list_append_ap (data->invalid_ap_list, ap);

--------

This code is run when the response from the NMI:getKeyForNetwork dbus message is received with the error NMI_DBUS_USER_KEY_CANCELED_ERROR.

If the user tries to connect to the same network again, since the ap is on the invalid_ap_list, you see the following error in the log:

Dec 16 11:31:07 jens-laptop NetworkManager: <info> SWITCH: terminating current connection 'wlan0' because it's no longer valid.

I'll ping upstream and see if I can get any suggestions on how to work around this problem.

{{{
% make it-work-just
}}}

Revision history for this message
Tony Espy (awe) wrote :

Marking critical... I'm working on a fix.

Changed in acton:
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Alexander Sack (asac) wrote :

Could you post the complete syslog after reproducing this?

Revision history for this message
Tony Espy (awe) wrote :

See comment #5, my log is exactly the same after "Cancel" is hit.

Also, I tried a quick hack and removed the line that adds the AP to the invalid_ap_list, and this seems to fix the problem.

I click 'Cancel', and nothing happens ( ie. it doesn't re-prompt me or try to connect automatically ), and then when I select the AP again, it connects like normal.

I'll add the patch to the bug, and also follow up with my email to the network-manager mailing list to see if anyone else cares to comment on the patch.

Revision history for this message
Tony Espy (awe) wrote :
Revision history for this message
Alexander Sack (asac) wrote :

ok, could you try the branch attached to this bug? We only blacklist AP in the non-cancel case.

to test:

 bzr branch https://code.edge.launchpad.net/~ubuntu-core-dev/network-manager/ubuntu.0.6.x
 cd ubuntu.0.6.x
 debuild -b

Thanks

Revision history for this message
Alexander Sack (asac) wrote :
Revision history for this message
Alexander Sack (asac) wrote :

fix committed for now.

Changed in network-manager:
status: Confirmed → Fix Committed
Revision history for this message
Tony Espy (awe) wrote :

Committed the fix to /ubuntu-jax this week. Will be released with Beta2.

Changed in acton:
milestone: none → beta2
status: In Progress → Fix Committed
Revision history for this message
Tony Espy (awe) wrote :

Released in Beta2 image.

Changed in acton:
status: Fix Committed → Fix Released
Alexander Sack (asac)
Changed in network-manager:
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager - 0.6.6-0ubuntu7

---------------
network-manager (0.6.6-0ubuntu7) intrepid; urgency=low

  * Fix LP: #124706 - "Cancel 'Wireles Key Required' dialog, can't connect on
    subsequent attempt"; we only blacklist and AP if receiving the secret
    ends up with a dbus error != NMI_DBUS_USER_KEY_CANCELED_ERROR
    - add debian/patches/44_lp124706_dont_blacklist_ap_on_user_cancel_key.patch
    - update debian/patches/series
  * Fix LP: #147119 - "network manager gives couldn't activate dialup service
    warning"; we properly set status to the return value of nm_spawn_process;
    thanks to bendis <email address hidden> for finding this glitch.
    - add debian/patches/45_debian_backend_fix_dialup.patch
    - update debian/patches/series
  * Fix LP: #203016 - "Memory Leak in NetworkManager"; Robert Knight found a
    leak the nm_dbus_net.c code.
    - add debian/patches/46_lp203016_nm_dbus_get_ap_from_object_path-leak-fix.patch
    - update debian/patches/series

 -- Alexander Sack <email address hidden> Thu, 26 Jun 2008 16:45:04 +0200

Changed in network-manager:
status: Fix Committed → Fix Released
Changed in network-manager:
importance: Unknown → High
status: Invalid → Expired
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in network-manager (Ubuntu Hardy):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.