Wireless networks greyed out

Bug #907528 reported by Raghav K.
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
wicd
Fix Released
Low
David Paleino

Bug Description

Wicd: 1.7.1~b3
Computer: HP Pavilion DV6000
OS: Debian unstable

Clicking on "Refresh" results in a crash after one or two results loading (and remaining greyed out), with the following error:

[Begin log]
ESSID : ke_wireless
Traceback (most recent call last):
  File "/usr/share/wicd/gtk/gui.py", line 587, in refresh_networks
    tempnet = WirelessNetworkEntry(x)
  File "/usr/share/wicd/gtk/netentry.py", line 811, in __init__
    "essid"))
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 745, in _message_cb
    _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 252, in _method_reply_return
    reply.append(signature=signature, *retval)
TypeError: expected string without null bytes
[End log]

The output of 'iwlist scan' is also attached. Thanks for your help!

Related branches

Revision history for this message
Raghav K. (raghavk) wrote :
Revision history for this message
David Paleino (dpaleino) wrote : Re: [Bug 907528] [NEW] Wireless networks greyed out

Hello,

On Wed, 21 Dec 2011 21:24:27 -0000, Raghav Krishnapriyan wrote:

> Clicking on "Refresh" results in a crash after one or two results
> loading (and remaining greyed out), with the following error:
>
> [Begin log]
> ESSID : ke_wireless
> Traceback (most recent call last):
> File "/usr/share/wicd/gtk/gui.py", line 587, in refresh_networks
> tempnet = WirelessNetworkEntry(x)
> File "/usr/share/wicd/gtk/netentry.py", line 811, in __init__
> "essid"))
> File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in
> __call__ **keywords)
> File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in
> call_blocking message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError:
> Traceback (most recent call last): File
> "/usr/lib/python2.7/dist-packages/dbus/service.py", line 745, in _message_cb
> _method_reply_return(connection, message, method_name, signature, *retval)
> File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 252, in
> _method_reply_return reply.append(signature=signature, *retval) TypeError:
> expected string without null bytes [End log]
>
> The output of 'iwlist scan' is also attached. Thanks for your help!

Oh, that's a strange output. That "\x00" is *really* strange.

What is your wifi card? Can you tell whether those are "hidden networks", being
reported with essid \x00 ?

If yes, I could special-case them to be handled like "hidden".

Thanks,
David

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Revision history for this message
Raghav K. (raghavk) wrote :

My wireless card is the following:

Broadcom Corporation BCM4311 802.11b/g WLAN (rev 02)

Yeah, I think they're supposed to be hidden networks: they show up as such in the Intel Proset WiFi utilities that my company uses.

Thanks,

Raghav

Revision history for this message
Raghav K. (raghavk) wrote :

The following issue might also be related. (If it's not, I'll delete it.) When I run wicd-curses, it crashes with the following added to the logs:

2011/12/21 14:31:18 :: ERROR:dbus.service:Unable to append ('\x00',) to message with signature (s) (guessed): <type 'exceptions.TypeError'>: expected string without null bytes

The full traceback is as follows:

DBus failure! This is most likely caused by the wicd daemon stopping while wicd-curses is running. Please restart the daemon, and then restart wicd-curses.

DBus failure! This is most likely caused by the wicd daemon stopping while wicd-curses is running. Please restart the daemon, and then restart wicd-curses.
Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1063, in <module>
    main()
  File "/usr/share/wicd/curses/wicd-curses.py", line 995, in main
    ui.run_wrapper(run)
  File "/usr/lib/python2.7/dist-packages/urwid/raw_display.py", line 237, in run_wrapper
    return fn()
  File "/usr/share/wicd/curses/wicd-curses.py", line 89, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1003, in run
    app = appGUI()
  File "/usr/share/wicd/curses/wicd-curses.py", line 551, in __init__
    self.update_netlist(force_check=True,firstrun=True)
  File "/usr/share/wicd/curses/wicd-curses.py", line 89, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 670, in update_netlist
    wiredL,wlessL = gen_network_list()
  File "/usr/share/wicd/curses/wicd-curses.py", line 177, in gen_network_list
    label = NetLabel(network_id,is_active)
  File "/usr/share/wicd/curses/wicd-curses.py", line 347, in __init__
    self.essid = wireless.GetWirelessProperty(id, 'essid')
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 745, in _message_cb
    _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 252, in _method_reply_return
    reply.append(signature=signature, *retval)
TypeError: expected string without null bytes

Revision history for this message
David Paleino (dpaleino) wrote : Re: [Bug 907528] Re: Wireless networks greyed out

On Wed, 21 Dec 2011 22:18:21 -0000, Raghav Krishnapriyan wrote:

> My wireless card is the following:
>
> Broadcom Corporation BCM4311 802.11b/g WLAN (rev 02)

Oh, I have that same card (it seems), and it reports hidden networks with an
empty ESSID.

> Yeah, I think they're supposed to be hidden networks: they show up as
> such in the Intel Proset WiFi utilities that my company uses.

Uhm, ok.

Could you please try the attached patch? You might need to restart the WICD
daemon to make it work.

Thanks,
David

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Revision history for this message
Raghav K. (raghavk) wrote :

Sorry, I meant that I think my company has access points that are meant to be hidden that broadcast '\x00' ESSIDs, not that my wireless card reports all hidden ESSIDs as '\x00'. (I haven't verified whether the latter is true.)

Thanks for the patch, but unfortunately, it seems to result in the same crash.

Revision history for this message
David Paleino (dpaleino) wrote :

On Wed, 21 Dec 2011 23:33:50 -0000, Raghav Krishnapriyan wrote:

> Sorry, I meant that I think my company has access points that are meant
> to be hidden that broadcast '\x00' ESSIDs, not that my wireless card
> reports all hidden ESSIDs as '\x00'. (I haven't verified whether the
> latter is true.)
>
> Thanks for the patch, but unfortunately, it seems to result in the same
> crash.

Oh ok.

It really seems a bug in DBus (or at least in its python bindings) -- I'll see
if that's workaroundable.

(see also http://code.google.com/p/quodlibet/issues/detail?id=242 ,
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=30397 ,
http://web.archiveorange.com/archive/v/qyfArA1SdRzJiIe0rG4l , ...)

It will probably make sense transmitting the ESSID as a sequence of bytecodes
(i.e. a list, like the last link developers did), rather than a string, to
overcome problems like this.
However, I don't know how common it is having ESSIDs with NULL bytes (\x00),
and if it's worth breaking the API again.

Probably NULL bytes also break the GTK gui (in the sense that, if it's not the
daemon crashing, it will be the GUI), so I'll also need special care when
showing the ESSID there (maybe replacing it with <NULL>?)

As a quick patch though, I could release 1.7.1 with those \x00 networks
dropped, so that you can still use other networks in range (that's if you don't
need the \x00 ones :))

Have a nice day,
David

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Revision history for this message
Raghav K. (raghavk) wrote :

Yeah, it seems like it would only break under a fairly obscure set of circumstances.

Just dropping the networks with NULL bytes in the ESSIDs would work fine for me -- thanks for your help!

David Paleino (dpaleino)
Changed in wicd:
assignee: nobody → David Paleino (dpaleino)
importance: Undecided → Low
Revision history for this message
David Paleino (dpaleino) wrote :

Hello Raghav,

I fixed the code not to support NULL-bytes ESSIDs in rev. 691.

Would you please test it?

http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/691

Thanks,
David

Changed in wicd:
status: New → Fix Committed
milestone: none → 1.7.1
Revision history for this message
Raghav K. (raghavk) wrote :

Unfortunately, I still get an error. I also don't think it's just the access points at my workplace, because I've found other networks elsewhere whose ESSIDs are reported with NULL-bytes:

refreshing...
Traceback (most recent call last):
  File "/usr/share/wicd/gtk/gui.py", line 587, in refresh_networks
    tempnet = WirelessNetworkEntry(x)
  File "/usr/share/wicd/gtk/netentry.py", line 814, in __init__
    "essid"))
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 745, in _message_cb
    _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 252, in _method_reply_return
    reply.append(signature=signature, *retval)
TypeError: expected string without null bytes

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 214, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/wicd/gtk/gui.py", line 253, in handle_connection_results
    error(self.window, language[results], block=False)
NameError: global name 'language' is not defined

Revision history for this message
David Paleino (dpaleino) wrote : WICD and ESSIDs with '\x00' bytes

Hello everyone involved,

I just reverted upstream commit 691, and did two new commits (700-701, [0]),
hopefully fixing things. From the various bugreports I can understand there's
some AP that reports th fact of being hidden with a NULL byte (one or more,
even). My "solution" is to just replace '\x00' with '': if these are, in fact,
hidden networks, one would connect specifying an ESSID (see [1]), which is
*not* a NULL byte, usually :)

I would be grateful to all of you if you could test the two commits linked in
[0].
If you're not able to apply the patches on your own (remember to delete *.pyc
and *.pyo files!), I can provide the full set of .debs to install with "dpkg
-i".

(please remember to keep in CC at least the two bugreports)

Have a nice day, and thanks for your patience,
David

[0]: http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/700
     http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/701

[1]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655159#26

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

David Paleino (dpaleino)
Changed in wicd:
status: Fix Committed → Confirmed
David Paleino (dpaleino)
Changed in wicd:
status: Confirmed → Fix Committed
David Paleino (dpaleino)
Changed in wicd:
status: Fix Committed → Fix Released
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.