JS ERROR: TypeError: window is null
tekstryder opened this issue · comments
Trying out this extension to replace GTK Titlebar.
Gnome / Mutter 43.2 and seeing this crash, though I've not been able to correlate it to any specific action.
Dec 08 17:19:27 gnome-shell[237829]: JS ERROR: TypeError: window is null
forWindow@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:150:7
_buildXWindow@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:94:29
_xWindow@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:86:22
_sync@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:58:26
enable/this._changedConnection<@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:25:23
connectDeferred/id</<@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:118:16
defer/<@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:137:7
Thunar file manager is unable to run in fullscreen with this extension (freezes/flickers), but perhaps that's a separate bug
@tekstryder Are you still seeing this issue with the latest version of the extension (8)?
@bartfailt Are you willing to share log output? Also, which application is not working?
@tekstryder Are you still seeing this issue with the latest version of the extension (8)?
Thanks for taking a look at this.
6 each (identical, guessing 1 for each open window) of a different error are thrown at installation time of version 8.
Dec 21 10:08:26 gnome-shell[3232]: Archive: /tmp/6EARX1.shell-extension.zip
Dec 21 10:08:26 gnome-shell[3232]: inflating: /home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js
Dec 21 10:08:26 gnome-shell[3232]: extracting: /home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/metadata.json
Dec 21 10:08:26 gnome-shell[1283]: JS ERROR: TypeError: window is undefined
findXIdForWindow@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:211:5
getXIdForWindow@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:200:11
_sync@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:59:32
enable/<@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:39:12
forEachWindow@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:131:7
enable@/home/username/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:38:18
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:184:32
_onEnabledExtensionsChanged/<@resource:///org/gnome/shell/ui/extensionSystem.js:529:35
_onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:529:14
createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:686:46
enableExtension@resource:///org/gnome/shell/ui/extensionSystem.js:211:29
_onInstallButtonPressed@resource:///org/gnome/shell/ui/extensionDownloader.js:268:40
After restarting the shell via logout / login the extension does not emit errors.
However... nor does the extension function in any capacity. Fullscreen windows display their titlebar.
Version 7 worked with GNOME 43.2, version 8 doesn't.
Dec 23 23:51:37 gnome-shell[1005]: JS ERROR: TypeError: window is undefined
findXIdForWindow@/home/mike/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:211:5
getXIdForWindow@/home/mike/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:200:11
_sync@/home/mike/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:59:32
enable/<@/home/mike/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:39:12
forEachWindow@/home/mike/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:131:7
enable@/home/mike/.local/share/gnome-shell/extensions/no-titlebar-when-maximized@alec.ninja/extension.js:38:18
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:184:32
_onEnabledExtensionsChanged/<@resource:///org/gnome/shell/ui/extensionSystem.js:529:35
_onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:529:14
createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:686:46
enableExtension@resource:///org/gnome/shell/ui/extensionSystem.js:211:29
EnableExtension@resource:///org/gnome/shell/ui/shellDBus.js:447:38
_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:324:38
_wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:401:34
I've inactivated version 8 and released version 9 which I think should fix these exceptions.
Version 9 produces this output when window becomes maximized (extension still doesn't work)
Dec 24 20:35:38 gnome-shell[999]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x5588ff03b940] is on because it needs an allocation.
Dec 24 20:35:38 gnome-shell[999]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x558900a7b630] is on because it needs an allocation.
Version 9 also does not hide titlebars so that's a fairly bigger issue I'd wager.
Dec 24 13:50:05 gnome-shell[102229]: expensive: reading _MOTIF_WM_HINTS for 0x1800007 (This should only happen once per window when it is created!)
Dec 24 13:50:22 gnome-shell[102229]: expensive: reading _MOTIF_WM_HINTS for 0x1c00024 (This should only happen once per window when it is created!)
Dec 24 13:50:32 gnome-shell[102229]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x558f0386cc50] is on because it needs an allocation.
Dec 24 13:50:32 gnome-shell[102229]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x558f050aad10] is on because it needs an allocation.
Dec 24 13:50:32 gnome-shell[102229]: expensive: reading _MOTIF_WM_HINTS for 0x1800013 (This should only happen once per window when it is created!)
Dec 24 13:50:36 gnome-shell[102229]: expensive: reading _MOTIF_WM_HINTS for 0x1c00003 (This should only happen once per window when it is created!)
Dec 24 13:50:50 gnome-shell[102229]: expensive: reading _MOTIF_WM_HINTS for 0x1c00007 (This should only happen once per window when it is created!)
Dec 24 13:51:05 gnome-shell[102229]: expensive: reading _MOTIF_WM_HINTS for 0x1c00006 (This should only happen once per window when it is created!)
Curious, why are you spamming the journal with this kind of debug info?
That sort of thing should be removed from tagged release versions.
@tekstryder I added additional logging to try to debug #5.
I think this has been a good lesson for me in not fixing what is not broken. Unfortunately, v8 and v9 of the extension does work properly for me, but clearly I have broken something for others.
Since v7 also worked fine for me, and I don't know for sure that any of the changes I made addressed #5, I have am going back to the code for that. I have re-released that code as v10 and inactivated v8 and v9.
Sorry for the trouble everyone!