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 772589 - objectManager: handle proxies coming and going
objectManager: handle proxies coming and going
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 778468 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-10-07 19:46 UTC by Ray Strode [halfline]
Modified: 2017-06-22 18:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
objectManager: handle proxies coming and going (8.69 KB, patch)
2016-10-07 19:46 UTC, Ray Strode [halfline]
none Details | Review
objectManager: handle proxies coming and going (9.49 KB, patch)
2016-10-12 17:30 UTC, Ray Strode [halfline]
none Details | Review
Revert "objectManager: handle proxies coming and going" (9.15 KB, patch)
2017-01-10 03:34 UTC, Ray Strode [halfline]
committed Details | Review
objectManager: handle proxies coming and going (9.61 KB, patch)
2017-06-14 21:15 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2016-10-07 19:46:27 UTC
Ever since commit b8e29ae8c78658917c8a8ddd391667d7d9e36971
(I think), start up is littered with this message:

 Gjs-WARNING **: JS ERROR: could not get remote objects for service
 org.gnome.SettingsDaemon.Smartcard path

since gnome-shell is now started before gnome-settings-daemon.

This commit addresses the problem by making the object manager code
not try to autostart its proxy, and instead wait for it to appear.
Comment 1 Ray Strode [halfline] 2016-10-07 19:46:33 UTC
Created attachment 337197 [details] [review]
objectManager: handle proxies coming and going
Comment 2 Ray Strode [halfline] 2016-10-07 19:47:01 UTC
Note i haven't tested this yet, so consider it a draft. It probably has typos.
Comment 3 Bastien Nocera 2016-10-10 13:29:43 UTC
Will this work? The well-known name isn't registered anywhere, and the proxy flags look like they don't pass G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START. So auto-start would be attempted, and would fail (it's not running, and it doesn't know how to run it either).
Comment 4 Ray Strode [halfline] 2016-10-10 13:55:31 UTC
Review of attachment 337197 [details] [review]:

::: js/misc/objectManager.js
@@ +93,1 @@
 

the patch adds DO_NOT_AUTO_START here ↑ (granted, still not tested)
Comment 5 Ray Strode [halfline] 2016-10-10 13:57:38 UTC
of course maybe the object manager should let the caller pass in flags, but right we only have one user of the object manager code so we should be fine with the simpler api for now.
Comment 6 Bastien Nocera 2016-10-10 14:20:13 UTC
Review of attachment 337197 [details] [review]:

::: js/misc/objectManager.js
@@ +47,3 @@
                                                  g_name: this._serviceName,
                                                  g_object_path: this._managerPath,
                                                  g_flags: Gio.DBusProxyFlags.NONE });

How about this call?
Comment 7 Ray Strode [halfline] 2016-10-12 17:29:20 UTC
(In reply to Bastien Nocera from comment #6)
> How about this call?

WOOPS
Comment 8 Ray Strode [halfline] 2016-10-12 17:30:11 UTC
Created attachment 337522 [details] [review]
objectManager: handle proxies coming and going

Ever since commit b8e29ae8c78658917c8a8ddd391667d7d9e36971
(I think), start up is littered with this message:

 Gjs-WARNING **: JS ERROR: could not get remote objects for service
 org.gnome.SettingsDaemon.Smartcard path

since gnome-shell is now started before gnome-settings-daemon.

This commit addresses the problem by making the object manager code
not try to autostart its proxy, and instead wait for it to appear.
Comment 9 Ray Strode [halfline] 2016-10-12 17:30:39 UTC
(still untested)
Comment 10 Ray Strode [halfline] 2017-01-05 18:19:56 UTC
I didn't do exhaustive testing, but the patch at least doesn't make the session crash,
and I don't see the message in my log.

Attachment 337522 [details] pushed as 1ef6262 - objectManager: handle proxies coming and going
Comment 11 Hussam Al-Tayeb 2017-01-09 22:26:45 UTC
Hello.
I am now seeing this in journalctl when I alt-f2 -> r.

Jan 10 00:19:05 hades gnome-shell[894]: JS ERROR: TypeError: this._dbusProxy is undefined
                                        ObjectManager<._onManagerProxyLoaded@resource:///org/gnome/shell/misc/objectManager.js:194:1
                                        wrapper@resource:///org/gnome/gjs/modules/lang.js:178:13
Jan 10 00:19:06 hades gnome-shell[894]: GNOME Shell started at Tue Jan 10 2017 00:19:02 GMT+0200 (EET)

I was told on irc that this is a regression from this bug.


> ptomato> hussam, looks like a gnome-shell bug, regression from https://bugzilla.gnome.org/show_bug.cgi?id=772589
> I checked in the corresponding source file, https://github.com/GNOME/gnome-shell/blob/master/js/misc/objectManager.js, and _dbusProxy isn't defined anywhere
> <hussam> Hussam Al-Tayeb ptomato: thank you. I will post in that bug.
Comment 12 Ray Strode [halfline] 2017-01-10 03:34:00 UTC
those _dbusProxy's should say managerProxy, I think, but the fact that this is failing, makes me think that I botched the limited testing I did in comment 10, so I"m going to reopen, revert, and post a new patch and do more thorough testing before pushing.
Comment 13 Ray Strode [halfline] 2017-01-10 03:34:43 UTC
Created attachment 343208 [details] [review]
Revert "objectManager: handle proxies coming and going"

This reverts commit 1ef626213952ea8568bb35ec0e96788a696d1fee.
Comment 14 Ray Strode [halfline] 2017-01-10 03:35:07 UTC
Comment on attachment 343208 [details] [review]
Revert "objectManager: handle proxies coming and going"

Attachment 343208 [details] pushed as 2e332ff - Revert "objectManager: handle proxies coming and going"
Comment 15 Bastien Nocera 2017-03-22 15:03:52 UTC
See also https://bugzilla.gnome.org/show_bug.cgi?id=780403
Comment 16 Christian Stadelmann 2017-05-16 21:09:55 UTC
*** Bug 778468 has been marked as a duplicate of this bug. ***
Comment 17 Ray Strode [halfline] 2017-06-14 21:15:39 UTC
Created attachment 353777 [details] [review]
objectManager: handle proxies coming and going

Ever since commit b8e29ae8c78658917c8a8ddd391667d7d9e36971
(I think), start up is littered with this message:

 Gjs-WARNING **: JS ERROR: could not get remote objects for service
 org.gnome.SettingsDaemon.Smartcard path

since gnome-shell is now started before gnome-settings-daemon.

This commit addresses the problem by making the object manager code
not try to autostart its proxy, and instead wait for it to appear.
Comment 18 Ray Strode [halfline] 2017-06-14 21:16:36 UTC
this time tested on a machine with enable-smartcard-authentication == true !
Comment 19 Ray Strode [halfline] 2017-06-22 18:32:30 UTC
Attachment 353777 [details] pushed as 9c8a470 - objectManager: handle proxies coming and going