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 780403 - JS ERROR: TypeError: can't convert undefined to object in objectManager.js
JS ERROR: TypeError: can't convert undefined to object in objectManager.js
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.23.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-03-22 14:55 UTC by Bastien Nocera
Modified: 2017-06-22 18:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
objectManager: handle object manager sending empty array (3.45 KB, patch)
2017-06-14 21:12 UTC, Ray Strode [halfline]
committed Details | Review

Description Bastien Nocera 2017-03-22 14:55:33 UTC
On startup:
gnome-settings-daemon-3.23.92-1.fc26.x86_64
gnome-shell-3.23.92-2.fc26.x86_64

Mar 22 15:17:13 classic gnome-shell[1021]: JS ERROR: TypeError: can't convert undefined to object
                                           ObjectManager<._onManagerProxyLoaded/<@resource:///org/gnome/shell/misc/objectManager.js:196:31
                                           _proxyInvoker/asyncCallback@resource:///org/gnome/gjs/modules/overrides/Gio.js:86:13
Comment 1 Florian Müllner 2017-03-22 15:03:16 UTC
Possibly related to bug 772589.
Comment 2 Ray Strode [halfline] 2017-06-14 20:39:47 UTC
i don't think it's related to bug 772589 really.

code has this:

            let [objects] = result;•

            let objectPaths = Object.keys(objects);•


indeed, looking glass shows:

>>> Object.keys(undefined)
TypeError: can't convert undefined to object

result is an array of dict entries:

a{oa{sa{sv}}}

so i guess what's happening is the other side is returning a 0-length array.
Comment 3 Ray Strode [halfline] 2017-06-14 21:12:42 UTC
Created attachment 353776 [details] [review]
objectManager: handle object manager sending empty array

If the service implementing the object manager returns
a 0 length array we currently throw an exception.

This commit fixes that.
Comment 4 Florian Müllner 2017-06-14 21:16:35 UTC
Review of attachment 353776 [details] [review]:

Untested on my side, but makes sense to me
Comment 5 Ray Strode [halfline] 2017-06-22 18:32:17 UTC
Attachment 353776 [details] pushed as 9c4e875 - objectManager: handle object manager sending empty array