After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647040 - JS ERROR: !!! Exception was: Error: Expected type array for Argument 'ssid' but got type 'object' (nil)
JS ERROR: !!! Exception was: Error: Expected type array for Argument 'ssid'...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 647042 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-07 14:31 UTC by Bill Nottingham
Modified: 2011-04-11 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8 (1.06 KB, patch)
2011-04-07 19:45 UTC, Giovanni Campagna
reviewed Details | Review
NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8 (1.19 KB, patch)
2011-04-10 17:19 UTC, Giovanni Campagna
committed Details | Review

Description Bill Nottingham 2011-04-07 14:31:15 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
Comment 1 Giovanni Campagna 2011-04-07 15:21:16 UTC
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.
Comment 2 Giovanni Campagna 2011-04-07 19:45:37 UTC
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.
Comment 3 Giovanni Campagna 2011-04-07 20:34:17 UTC
*** Bug 647042 has been marked as a duplicate of this bug. ***
Comment 4 Dan Winship 2011-04-08 13:22:13 UTC
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>");
    }
Comment 5 Giovanni Campagna 2011-04-10 17:19:29 UTC
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.
Comment 6 Dan Winship 2011-04-11 14:46:42 UTC
Attachment 185651 [details] pushed as 6a27d5e - NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8