GNOME Bugzilla – Bug 654898
("Argument 'str2' (type utf8) may not be null") in network.js
Last modified: 2011-08-16 17:43:16 UTC
Shell display error messages on console: JS ERROR: !!! Exception was: Error: Argument 'str2' (type utf8) may not be null JS ERROR: !!! lineNumber = '0' JS ERROR: !!! fileName = 'gjs_throw' JS ERROR: !!! stack = '("Argument 'str2' (type utf8) may not be null")@gjs_throw:0 ([object Object],[object Object])@/usr/share/gnome-shell/js/ui/status/network.js:1168 ([object _private_NMClient_DeviceWifi],[object _private_NMClient_AccessPoint])@/usr/share/gnome-shell/js/ui/status/network.js:1248 ([object _private_NMClient_DeviceWifi],[object _private_NMClient_AccessPoint])@/usr/share/gjs-1.0/lang.js:110 ' I haven't notice any ill effect but I guess they should be not thrown.
The "expected 4 got 3" error is because you need a newer version of gjs (and possibly glib and gobject-introspection). The stack trace you quoted is entirely unrelated, but is also an error.
*** Bug 655907 has been marked as a duplicate of this bug. ***
Created attachment 193195 [details] [review] network: ignore APs that hide their SSID
(In reply to comment #3) > Created an attachment (id=193195) [details] [review] > network: ignore APs that hide their SSID So, this patch in incomplete. I read through nm-applet's code and found the following in applet-device-wifi.c:get_menu_item_for_ap() /* Don't add BSSs that hide their SSID or are blacklisted */ ssid = nm_access_point_get_ssid (ap); if ( !ssid || nm_utils_is_empty_ssid (ssid->data, ssid->len) || is_blacklisted_ssid (ssid)) return NULL; I'm only doing the equivalent first check here. The 3rd check can easily be copied from nm-applet as the blacklist is quite simple: static const char *blacklisted_ssids[] = { /* http://www.npr.org/templates/story/story.php?storyId=130451369 */ "Free Public WiFi", NULL }; The 2nd check could be done by either a) doing a wrapper in shell or b) exporting a bindable function in libnm-util and start depending on it.
Created attachment 193198 [details] [review] network: always coerce the SSID to _something_ -- It seems we can't win even with the previous patch. nm-applet also does something like this...
Created attachment 193604 [details] [review] network: always coerce the SSID to _something_ -- - forgot to delete an if statement
Attachment 193195 [details] pushed as 6a3130e - network: ignore APs that hide their SSID Attachment 193604 [details] pushed as 60b54c0 - network: always coerce the SSID to _something_
(In reply to comment #3) > Created an attachment (id=193195) [details] [review] > network: ignore APs that hide their SSID This patch is wrong. It works in nm-applet, because it creates the menu on the fly, but in gnome-shell, which keeps the menu updated at all times, it will hide those APs forever, even after you connect to them. See discussion on bug 646454.
Created attachment 193833 [details] [review] Revert "network: ignore APs that hide their SSID" This reverts commit 6a3130e25fb8a9d83688f29346c187314d1c5745. This was wrong as it would hide those APs forever, even after connecting to them, which users can do via other means. -- Thanks for spotting Giovanni. The other patch is enough to have this specific bug fixed anyway. Ok to push the revert?
(In reply to comment #9) > Created an attachment (id=193833) [details] [review] > Revert "network: ignore APs that hide their SSID" > > This reverts commit 6a3130e25fb8a9d83688f29346c187314d1c5745. > > This was wrong as it would hide those APs forever, even after connecting to > them, which users can do via other means. > > -- > > Thanks for spotting Giovanni. The other patch is enough to have this > specific bug fixed anyway. > > Ok to push the revert? I think so, yes.
Attachment 193833 [details] pushed as ef87729 - Revert "network: ignore APs that hide their SSID"