-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Generate Support Log" no longer works #1862
Comments
I'm not sure why this would stop working, to be honest. dconf uses a memory mapped file to share settings across processes, but as far as I can tell no changes are being propagated to the daemon at all. Maybe something got nudged during the ESM transition? I don't think so though. |
My thinking was that the issue isn't that the dconf value doesn't get propagated, but rather that the resulting redefinition of (I suppose that's easy enough to test, actually, by adding some logging to the ...I'm also trying to figure out how to best deal with this in the Wiki. Best I can come up with so far is just telling people to run this command in a terminal, once after activating "Generate Support Log" and a second time after ending it: for p in $(pidof gjs); do grep daemon.js /proc/${p}/cmdline && kill -HUP ${p}; done (That's the most compact version of a one-liner I could come up with that will definitely HUP only I wonder if it would work to run that command ourselves from the Preferences app, using const daemon_restart = new Gio.Subprocess({
argv: [
'/bin/bash', '-c',
'for p in $(pidof gjs); do grep daemon.js /proc/${p}/cmdline && kill -HUP ${p}; done'
],
flags: (Gio.SubprocessFlags.STDOUT_SILENCE |
Gio.SubprocessFlags.STDERR_SILENCE),
}); ..."Ewwww." (Edit: Or we could just use |
There's no real concept of compiled code, from the perspective of a JavaScript process. The engine is free to interpret directly, JIT-compile in progressive stages and start over. For the programmer it's just a run-time only language.
I gave that a shot and was getting no signal emissions. I looked to see if someone had set the GSettings to delay-apply mode, but found nothing that should affect it. |
Grumpf. Same. I even tried experimentally changing the name of the setting to If I run a
|
Maybe the object is being collected, and assigning it with |
I did think about that. The one difference between the |
I'mma add a |
(Heck, it means we'll also be able to toggle on debugging via DBus, so win/win.) |
SUCCESS! \o/ |
Describe the bug
It turns out that the method we use for switching debug logging on and off (by detecting a GSettings change and changing the definition of
globalThis.debug()
) no longer works with GNOME 46gjs
. Even if the setting value is changed, the code won't alter its logging unless the GSConnect backend is reloaded (by runningkill -HUP
on thedaemon.js
process).I've tried rewriting
globalThis.debug
as a static function that checks the value of a booleanglobalThis._debugEnabled
each time it's called, and having the GSettings watcher update the value of that variable instead, but it made no difference.Presumably it has something to do with compiled code and/or multithreading, such that the other bits of the codebase aren't picking up on runtime changes to the global function definition / variable value. But it looks like we'll have to find a new way to implement on-the-fly debug enabling/disabling.
Something like this would probably work, but it would slow the code down horribly whether or not debugging is enabled:
cc: @andyholmes
Steps to reproduce
No response
Expected behavior
No response
GSConnect version
57
Installed from
other source
GNOME Shell version
46
Linux distribution/release
Fedora 40
Paired device(s)
No response
KDE Connect app version
No response
Plugin(s)
No response
Support log
No response
Screenshots
No response
Notes
No response
The text was updated successfully, but these errors were encountered: