Extension spams log message "st_widget_get_theme_node called on the widget"
Describe what is happening
Whenever I have this extension enabled, I get frequent log messages like:
(gnome-shell:1208552): St-CRITICAL **: 22:10:11.896: st_widget_get_theme_node called on the widget [0x5c475bfa20d0 Gjs_bluetooth-quick-connect_bjarosze_gmail_com_ui_BatteryInfoWidgetClass:insensitive ("100x%")] which is not in the stage.
It's quite annoying to debug other issues when logs are being filled with noise.
This issue was also reported on the old gnome-bluetooth-quick-connect repo:
- https://github.com/bjarosze/gnome-bluetooth-quick-connect/issues/87
Reproudction Steps (If any)
Check gnome-shell or journalctl logs.
Checklist
- [x] Tried restarting the device
- [x] Uninstalled and resinstalled the extension
System Info
OS: Arch Linux x86_64
Kernel: 6.13.8-arch1-1
Uptime: 6 days, 3 hours, 20 mins
Packages: 2444 (pacman), 17 (flatpak)
Shell: fish 4.0.1
Resolution: 3840x2160
DE: GNOME 48.0
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: gnome-terminal
Logs
Example log posted above.
The log appears to be caused by this hack in BatteryInfoWidgetClass:
https://github.com/Extensions-Valhalla/gnome-bluetooth-quick-connect/blob/f122bfc34c8918a3b3a4eaaeab456b5d70dd031c/src/ui.ts#L251-L263
I tried to debug it myself, but the shell extension development tooling is so horrible and documentation misleading. I don't know how anybody manages.
the errors probably come from this code added by the original creator https://github.com/Extensions-Valhalla/gnome-bluetooth-quick-connect/blob/master/src/ui.ts#L251-#L258
I don't know if the issue is still relevant, you can try to remove the text: 100%, it should fix the error spam.
I don't own any device where I can run linux to try out this, as I own a Mac now. So I can't do the work myself, if you manage to fix it, feel free to submit a PR
The log appears to be caused by this hack in
BatteryInfoWidgetClass:gnome-bluetooth-quick-connect/src/ui.ts
Lines 251 to 263 in f122bfc
// dirty trick: instantiate the label with text 100%, so we can set // the natural width of the label in case monospace has no effect this._label = new St.Label({ xAlign: Clutter.ActorAlign.START, yAlign: Clutter.ActorAlign.CENTER, text: "100%", styleClass: "monospace", });
this._label.naturalWidth = this._label.width; this._label.text = "";
this.add_child(this._label); I tried to debug it myself, but the shell extension development tooling is so horrible and documentation misleading. I don't know how anybody manages.
yeah i know, its horrible to debug it, when I was actively maintaining the fork i used this part, it should help https://gjs.guide/extensions/development/creating.html#wayland-sessions
it worked till atleast gnome 45, i cant say for later versions tho