-
Notifications
You must be signed in to change notification settings - Fork 460
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
Fix dockmanager null #2148
Fix dockmanager null #2148
Conversation
Dockmanager can be null, and this spams the log if desktopIconsIntegration class is initialized and used. desktopIconsIntegration class is initialized and called from the extension and really should not have any other dependencies other than the shell, it is meant to be used and can be used as is by any extension if called as is independently without modifications. Fix resource path for Extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are sensible. I think that they should be merged.
@3v1n0 Can you review this, please? I think it's a good idea to merge it. |
Please also see previous MR #2132 |
Sounds like this should close #1444 |
@vanvugt I don't have permissions to merge here. Can you do it, please? |
I was waiting for us to complete #2146 first, just in case this caused unnecessary conflicts. |
|
||
const IDENTIFIER_UUID = '130cbc66-235c-4bd6-8571-98d2d8bba5e2'; | ||
|
||
export class DesktopIconsUsableAreaClass { | ||
constructor() { | ||
const Me = Extension.lookupByURL(import.meta.url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes dash-to-dock to not load at all in GNOME 46:
(gnome-shell:21081): GNOME Shell-CRITICAL **: 13:59:17.826: Extension dash-to-dock@micxgx.gmail.com: TypeError: (intermediate value).lookupByURL is not a function
Stack trace:
DesktopIconsUsableAreaClass@file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/desktopIconsIntegration.js:67:30
DockManager@file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/docking.js:1658:40
enable@file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/extension.js:11:23
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:266:38
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:478:32
async*_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:786:24 async*_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:792:48
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:827:20
async*init@resource:///org/gnome/shell/ui/extensionSystem.js:76:14
_initializeUI@resource:///org/gnome/shell/ui/main.js:303:22
start@resource:///org/gnome/shell/ui/main.js:175:11
@resource:///org/gnome/shell/ui/init.js:12:47
@resource:///org/gnome/shell/ui/init.js:21:20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems the import form ./dependencies breaks it. The files have to be imported directly ? static function importByUrl()
The previous MR #2132 works perfectly. That also answers Marco Trevisan's question - I forgot why I imported the files directly. I can close this MR, I just have to figure out how to re-open #2132 😄
Dockmanager can be null, and this spams the log if desktopIconsIntegration class is initialized and used.
Dec 11: JS ERROR: TypeError: DockManager.getDefault() is null
get extension@file:///home//.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmai>
_sendMarginsToExtension@file:///home//.local/share/gnome-shell/extensions/dash-to-dock@m>
_sendMarginsToAll/<@file:///home//.local/share/gnome-shell/extensions/dash-to-dock@micxg>
_sendMarginsToAll@file:///home//.local/share/gnome-shell/extensions/dash-to-dock@micxgx.>
_changedMargins/this._timedMarginsID<@file:///home/*/.local/share/gnome-shell/extensions/>
@resource:///org/gnome/shell/ui/init.js:21:20
desktopIconsIntegration class is initialized and called from the extension and really should not have any other dependencies other than the shell, it is meant to be used and can be used as is by any extension if called as is independently without modifications.