neuromorph / openbar

A GNOME Shell extension for theming Gnome Top Bar / Top Panel, Menus, Dash/Dock, Gnome Shell and Gtk/Flatpak Apps.
https://extensions.gnome.org/extension/6580/open-bar/
GNU General Public License v3.0
268 stars 4 forks source link

TypeError: btn.child is null #9

Closed Mateuszm126 closed 9 months ago

Mateuszm126 commented 10 months ago

TypeError: btn.child is null Screenshot from 2024-01-26 07-57-16 To get rid of it, log out, log in.

neuromorph commented 10 months ago

Can you please run the following command in a terminal and then install the extension? The journal will show more detailed error message, please paste that here (mainly it'll show the line number). journalctl /usr/bin/{gjs,gnome-shell} -fo cat

I have an idea what might be wrong but this will help to confirm. Meanwhile I will get that thing fixed.

Thank you for reporting!

neuromorph commented 10 months ago

Please also mention what other extensions you are using, esp. the ones that deal with the Top panel. (I am unable to reproduce the issue here but it could be an edge case that can occur with some setups so I'll fix it).

mkalinski commented 10 months ago

I have a similar issue, with the error saying btn.child is undefined. I was trying to identify another extension that could be causing this, by disabling them one by one, but did not succeed.

The error seems to happen randomly when enabling extensions (after they were disabled) in the extension app, or when unlocking screen after locking it. So far I haven't seen this happen on log-in with extensions enabled.

neuromorph commented 10 months ago

Thank you @mkalinski for the update ! Here's a hotfix patch. You can try it out by using following command. After running the command, you need to logout and login to refresh Gnome/extension.

cd ~/.local/share/gnome-shell/extensions/openbar@neuromorph/; curl -LJO https://raw.githubusercontent.com/neuromorph/openbar/main/extension.js; cd

This should fix the issue. Let me know how it goes.

neuromorph commented 10 months ago

I have also published new version with the fix so you might as well update the extension. Note: when you upgrade the extension, the stylesheet will be replaced by default so you need to click 'Apply Menu Styles' button or change some other setting in the extension to refresh stylesheet with your saved settings.

mkalinski commented 10 months ago

I have used this patched version for a whole day, and haven't seen the problem reoccurring. But since it was happening randomly, it's hard to say yet if it's a definitive fix.

Thanks for the speedy response!

neuromorph commented 10 months ago

Thank you for the update! I do believe it's fixed. I will keep the issue open for a while so feel free to comment if it recurs.

neuromorph commented 9 months ago

Resolved in v13/v14, closing it.