GNOME Bugzilla – Bug 647040
JS ERROR: !!! Exception was: Error: Expected type array for Argument 'ssid' but got type 'object' (nil)
Last modified: 2011-04-11 14:46:49 UTC
Window manager warning: Log level 16: _nm_object_get_property: Error getting 'Ssid' for /org/freedesktop/NetworkManager/AccessPoint/14: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist JS ERROR: !!! Exception was: Error: Expected type array for Argument 'ssid' but got type 'object' (nil) JS ERROR: !!! lineNumber = '0' JS ERROR: !!! fileName = 'gjs_throw' JS ERROR: !!! stack = '("Expected type array for Argument 'ssid' but got type 'object' (nil)")@gjs_throw:0 ([object Array])@/usr/share/gnome-shell/js/ui/status/network.js:105 NMNetworkMenuItem([object Array])@/usr/share/gnome-shell/js/ui/status/network.js:92 ()@/usr/share/gnome-shell/js/ui/status/network.js:1473 ([object _private_NMClient_DeviceWifi],[object _private_NMClient_AccessPoint])@/usr/share/gnome-shell/js/ui/status/network.js:1176 ([object _private_NMClient_DeviceWifi],[object _private_NMClient_AccessPoint])@/usr/share/gjs-1.0/lang.js:110 ' gnome-shell-3.0.0.1-1.fc15.x86_64 NetworkManager-0.8.998-2.git20110406.fc15.x86_64
The first part of the report reveals the issue. The access points's ssid is null, therefore it cannot be converted to a ByteArray. Likely a dup of bug 646454.
Created attachment 185466 [details] [review] NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8 It expects an Array or a ByteArray, and gjs throws in that case.
*** Bug 647042 has been marked as a duplicate of this bug. ***
Comment on attachment 185466 [details] [review] NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8 > let ssid = this.bestAP.get_ssid(); >+ if (ssid) >+ title = title || NetworkManager.utils_ssid_to_utf8(ssid) || _("<unknown>"); >+ else >+ title = title || _("<unknown>"); the logic here is pretty weird, particularly since ssid doesn't get used after this point. (So, eg, if title is already set, then we call get_ssid() but then don't use the result.) How about: if (!title) { let ssid = this.bestAP.get_ssid(); if (ssid) title = NetworkManager.utils_ssid_to_utf8(ssid); if (!title) title = _("<unknown>"); }
Created attachment 185651 [details] [review] NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8 It expects an Array or a ByteArray, and gjs throws in that case.
Attachment 185651 [details] pushed as 6a27d5e - NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8