Bug 138404

Summary: NetworkManager applet cannot ask for passphrase
Product: [openSUSE] SUSE Linux 10.1 Reporter: Martin Vidner <mvidner>
Component: NetworkAssignee: Robert Love <rml>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Beta 2   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: nm-applet-nokey.png

Description Martin Vidner 2005-12-13 21:11:58 UTC
I have updated NM to 20051212. I do not have gnome-keyring running (bug 129643) and the rest of the system is 10.0.

When I try to connect to an encrypted network, I get a popup for the passphrase, BUT it does not have an entry field for the passphrase and the Login button stays disabled (only Cancel works). There is a combo box Wreless Security with the values None, WEP Passphrase, WEP Hex and WEP ASCII which is initially empty.

To access the network, I have to quit nm-applet and connect using knetworkmanager.
Comment 1 Robert Love 2005-12-14 17:19:40 UTC
This is because gnome-keyring is not running.  It needs to be running.
Comment 2 Robert Love 2005-12-14 19:46:01 UTC
By and by, gnome-keyring should be started automatically by something, and the library should start it automatically as a last resort if it is not.

If these are not happening (I am sure that GNOME itself starts it ...) then perhaps there is a bug, but not in NM.
Comment 3 Martin Vidner 2005-12-15 09:50:15 UTC
While I would prefer the old behavior of simply being able to enter the passphrase even if the keyring is not running, I accept that a running keyring is a requirement.
But in the error case when we don't have the keyring, nm-applet should say so (a message on the console would be fine) instead of appearing broken. Aren't you able to detect such a situation?

BTW, which library should start the keyring automatically?
Comment 4 Robert Love 2005-12-15 15:22:16 UTC
I don't think it is appearing broken, it sounds as if it is disabling keyring-requiring features by greying them out.

libgnome-keyring should start gnome-keyring, I guess.  It seems silly to push this behavior into the clients.

If you aren't using GNOME, why not use KNM?
Comment 5 Martin Vidner 2005-12-15 16:25:26 UTC
It gets more interesting. I have tried to start a regular GNOME session (WINDOWMANAGER=gnome startx). gnome-session and gnome-keyring are running. Yet I cannot enter the passphrase. I suspect a library incompatibility between the 10.0 GNOME libraries and the recent NM.
Comment 6 Martin Vidner 2005-12-15 16:26:50 UTC
Created attachment 61000 [details]
nm-applet-nokey.png

This is how it looks like. I don't think it is an intentional disabling of a feature.
Comment 7 Robert Love 2005-12-15 17:38:18 UTC
Okay, but I don't think this is an NM bug.  gnome-keyring needs to be running ...
Comment 8 Robert Love 2005-12-15 17:46:26 UTC
I just verified that disabling the 'Connect' button is an intentional feature in the code whenever the security subsystem reports a failure (e.g., gnome-keyring fails).

I consider this NOTABUG ...
Comment 9 Robert Love 2006-01-03 20:17:58 UTC
Marking resolved.
Comment 10 Martin Vidner 2006-01-09 16:42:27 UTC
So now I have retried on SL 10.1 Alpha4 (aka Preview2) and get the same problem. But this time there should be no incompatibility (comment 5). Also, I have started the GNOME session from GDM, GNOME_KEYRING_SOCKET is set and has good permissions, the keyring daemon is running.

Even if the applet disables the widgets intentionally, it should print a diagnostic message.
But now I believe the keyring should really work. How can I debug it?
Comment 11 Robert Love 2006-01-12 22:49:45 UTC
Hi, Martin.  Can you retest, whenever you get a chance, with 0.5.1cvs20060112, once it pops out of autobuild?  There is some new code wrt the security dialog.

Also, can you run "nm-applet --sm-disable" from the command line, so we can get the output from the applet when you pop up the dialog?  Please attach the output to this bug.

Danke, sir!
Comment 12 Robert Love 2006-01-20 15:16:59 UTC
*** Bug 144268 has been marked as a duplicate of this bug. ***
Comment 13 Robert Love 2006-01-20 15:17:56 UTC
Bart: Can you run nm-applet from the console and see if any warnings/errors/spew show up when you instantiate the dialog?

Also, does selecting an encrypted network from the scanlist work?
Comment 14 Bart Whiteley 2006-01-27 06:56:43 UTC
Here is the output from nm-applet.  Following the output below I see this: 
https://bugzilla.novell.com/attachment.cgi?id=64101&action=view


> nm-applet

** (nm-applet:6542): WARNING **: <WARNING>       hal_info_vendor_cb (): hal_info_vendor_cb(): dbus returned an error.
  (org.freedesktop.Hal.NoSuchProperty) No property info.vendor on device with id /org/freedesktop/Hal/devices/pcmcia__1__1



** (nm-applet:6542): WARNING **: <WARNING>       hal_info_vendor_cb (): hal_info_vendor_cb(): dbus returned an error.
  (org.freedesktop.Hal.NoSuchProperty) No property info.vendor on device with id /org/freedesktop/Hal/devices/pcmcia__1__1



** (nm-applet:6542): WARNING **: <WARNING>       hal_info_vendor_cb (): hal_info_vendor_cb(): dbus returned an error.
  (org.freedesktop.Hal.NoSuchProperty) No property info.vendor on device with id /org/freedesktop/Hal/devices/pcmcia__1__1
Comment 15 Robert Love 2006-01-27 18:56:55 UTC
Ah, useful.  Thanks, Bart.
Comment 16 Robert Love 2006-01-27 20:10:30 UTC
Hrm, that does not seem to be related.  Bummer.
Comment 17 Bart Whiteley 2006-01-27 20:19:36 UTC
That was my thought as well. 
Comment 18 Robert Love 2006-01-27 21:32:23 UTC
Bart: I just submitted 0.5.1cvs20060127 (not yet build).  Whenever it pops out the other end and you get the chance, can you please retest?

This version has a debugging check that will emit one or two lines from nm-applet.  Can you paste the output from nm-applet with this version, please?

Also, it has a hack that may or may not fix the problem.  Even if not, it should help narrow down the issue.

Martin: Feel free to test, too.

Thank you!
Comment 19 Bart Whiteley 2006-01-28 01:41:45 UTC
with 0.5.1cvs20060127 the output is identical to #14.  There is no additional output, and it still does not work.  Or perhaps I'm not invoking nm-applet quite like you want me to.  I simply run it from an xterm.  Note that this causes two NM tray icons to be present. 
Comment 20 Robert Love 2006-01-28 01:57:47 UTC
Kill all instances of the applet, so that there are only one running.  Session management may restart it; you need to kill it quickly or remove it from the session.

Running it from an xterm is fine.

Are you still seeing this dialog:

https://bugzilla.novell.com/attachment.cgi?id=64101&action=view

?

There is definitely a printf sitting there.
Comment 21 Bart Whiteley 2006-01-28 03:49:36 UTC
Here we go. 
> killall nm-applet; nm-applet

** (nm-applet:5578): WARNING **: <WARNING>       hal_info_vendor_cb (): hal_info_vendor_cb(): dbus returned an error.
  (org.freedesktop.Hal.NoSuchProperty) No property info.vendor on device with id /org/freedesktop/Hal/devices/pcmcia__1__1



** (nm-applet:5578): WARNING **: <WARNING>       hal_info_vendor_cb (): hal_info_vendor_cb(): dbus returned an error.
  (org.freedesktop.Hal.NoSuchProperty) No property info.vendor on device with id /org/freedesktop/Hal/devices/pcmcia__1__1



** (nm-applet:5578): WARNING **: <WARNING>       hal_info_vendor_cb (): hal_info_vendor_cb(): dbus returned an error.
  (org.freedesktop.Hal.NoSuchProperty) No property info.vendor on device with id /org/freedesktop/Hal/devices/pcmcia__1__1


** Message: <information>       nmi_passphrase_dialog_new(): Found caps '1' for network 'abcdefghijk'


** (nm-applet:5578): WARNING **: <WARNING>       nmi_dbus_return_user_key (): nmi_dbus_return_user_key(): couldn't serialize gconf_wso

Comment 22 Robert Love 2006-01-28 04:09:50 UTC
'abcdefghijk' is a valid non-broadcasting AP with WEP?
Comment 23 Bart Whiteley 2006-01-28 04:37:24 UTC
Yes.  It works with "Traditional method with ifup", and has worked with various versions of NM. 
Comment 24 Robert Love 2006-01-30 18:10:47 UTC
Alright.  Bart, whenever you get a chance, can you test 0.5.1cvs20060130?  It should pop up an error dialog.

Martin, I would like to know if you are still seeing this problem, too.
Comment 25 Martin Vidner 2006-01-31 15:51:47 UTC
With the Beta2 release (20060123) I get asked for the passphrase and it works with the keyring too.
I guess it obviously depends on the net I connect to, but how about the card driver? I am using a different one now (hostap), my Ralink has other problems.
Comment 26 Robert Love 2006-01-31 16:21:16 UTC
Martin: Great.

It depends on the overlap between the wireless network's reported required security methods and your card's.  There is now a dialog in place to explain the error, instead of the broken dialog.  And some debugging info is printed.

I think this bug is fixed (waiting to see what Bart says), but your wireless drivers probably _do_ support the wireless security and they just lie.  So we need to fix those.
Comment 27 Robert Love 2006-02-08 03:08:01 UTC
Bart confirms fixed.