cosmic icon indicating copy to clipboard operation
cosmic copied to clipboard

fails to load in GNOME 41

Open carlwgeorge opened this issue 3 years ago • 3 comments

I'm working on building pop-cosmic for Fedora. I've packaged up commit ea74293 as gnome-shell-extension-pop-cosmic-0.1.0^1.ea74293-1 in copr repository (similar to a PPA). It appears to work fine on Fedora 34 with GNOME 40. On Fedora 35 with GNOME 41, I disabled extension version validation and tried to enable the extension, and it failed with this error

Oct 25 12:07:48 silver gnome-shell[6912]: JS ERROR: Extension [email protected]: TypeError: AppDisplay.AppIconMenu is undefined
                                          enable@/usr/share/gnome-shell/extensions/[email protected]/extension.js:474:32
                                          _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:166:32
                                          loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:349:26
                                          _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:587:18
                                          collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:28
                                          _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:566:19
                                          _enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:596:18
                                          _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:627:18
                                          init@resource:///org/gnome/shell/ui/extensionSystem.js:55:14
                                          _initializeUI@resource:///org/gnome/shell/ui/main.js:265:22
                                          start@resource:///org/gnome/shell/ui/main.js:162:5
                                          @resource:///org/gnome/shell/ui/init.js:6:17

carlwgeorge avatar Oct 25 '21 18:10 carlwgeorge

You can find a solution by replacing references to AppIconMenu to AppMenu in source code.

You can edit the file extension.js and change lines #369 and #370 to let original_rebuildMenu = AppDisplay.AppMenu.prototype._rebuildMenu; inject(AppDisplay.AppMenu.prototype, "_rebuildMenu", function () {

LaurentOngaro avatar Dec 08 '21 10:12 LaurentOngaro

@LaurentOngaro I tried that with the latest commits, but now it complains:

this.resultsView._available_spinner is undefined

yochananmarqos avatar Dec 08 '21 19:12 yochananmarqos

I'm using f2d477d now on Manjaro GNOME 41.2 now. My Manjaro COSMIC stuff is here: master / WIP

yochananmarqos avatar Dec 08 '21 21:12 yochananmarqos