Caffeine error, "this._grid.layout_manager is null"
wwklnd opened this issue · comments
After running an update last night, the Caffeine GNOME extension seems to no longer be working. When I opened the extension menu there is a warning which reads: this._grid.layout_manager is null
I tried removing and reinstalling the extension, but no dice. I checked journalctl /usr/bin/gnome-shell | grep caffeine
and this seems to repeat every time I install the extension:
➜ ~ sudo journalctl /usr/bin/gnome-shell | grep caffeine
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #0 55f365561fd0 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:383 (2b380dc5dbf0 @ 2037)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #2 55f365561e70 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:237 (2b380dc84e70 @ 27)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #3 55f365561da0 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:1074 (2b380dc84f10 @ 41)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #4 55f365561fd0 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:384 (2b380dc5dbf0 @ 2063)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #6 55f365561e70 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:237 (2b380dc84e70 @ 27)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #7 55f365561da0 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:1074 (2b380dc84f10 @ 41)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #4 55f365561fd0 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:384 (2b380dc5dbf0 @ 2063)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #6 55f365561e70 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:237 (2b380dc84e70 @ 27)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: #7 55f365561da0 i /home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:1074 (2b380dc84f10 @ 41)
feb 08 17:15:40 BALVEDA gnome-shell[2334]: JS ERROR: Extension caffeine@patapon.info: TypeError: this._grid.layout_manager is null
_init@/home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:384:27
Caffeine@/home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:237:1
enable@/home/william/.local/share/gnome-shell/extensions/caffeine@patapon.info/extension.js:1074:25
Are you running gnome 43 ?
I believe you are not on the latest version, can you share what's in .local/share/gnome-shell/extensions/caffeine@patapon.info/metadata.json
, thanks.
Ah, gotcha! I am indeed running Gnome 43, my OS is Manjaro, on the Unstable branch.
Here's metadata.json
:
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Disable the screensaver and auto suspend",
"gettext-domain": "gnome-shell-extension-caffeine",
"name": "Caffeine",
"settings-schema": "org.gnome.shell.extensions.caffeine",
"shell-version": [
"43"
],
"url": "https://github.com/eonpatapon/gnome-shell-extension-caffeine",
"uuid": "caffeine@patapon.info",
"version": 44
}
Ok this is strange, the error comes from the usage of QuickSettingsMenu._addItems
in our extension
The error suggests that some object is not initialized properly in gnome-shell, somewhere here: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/gnome-43/js/ui/quickSettings.js#L615
Ah! That explains it. It seems there was a conflict with the Compact Quick Settings extension. Thanks for the help! Caffeine works perfectly again after disabling that.