hardpixel / unite-shell

Unite is an extension that makes GNOME Shell look like Ubuntu Unity Shell.
GNU General Public License v3.0
906 stars 61 forks source link

Fails to load with: TypeError: Main.panel.__proto__[Gi.hook_up_vfunc_symbol] is not a function #286

Closed nobuto-m closed 2 years ago

nobuto-m commented 2 years ago

With some recent updates in Ubuntu jammy (22.04), the extension fails to start with the following traceback. I'm not sure which exact update caused it but gjs package has been updated from 1.70.1-1 to 1.71.1-1 recently.

Mar 06 18:06:05 t480 gnome-shell[4196]: JS ERROR: Extension unite@hardpixel.eu: TypeError: Main.panel.__proto__[Gi.hook_up_vfunc_symbol] is not a function
                                        _injectAllocate@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/panel.js:212:50
                                        activate@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/panel.js:206:10
                                        onChange@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/handlers.js:186:24
                                        add/feature._doActivate@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/handlers.js:197:7
                                        activate/<@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/handlers.js:209:46
                                        activate@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/handlers.js:209:19
                                        activate@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/panel.js:675:21
                                        activate@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/extension.js:24:25
                                        enable@/home/nobuto/.local/share/gnome-shell/extensions/unite@hardpixel.eu/extension.js:45:16
                                        _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:167:32
                                        loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:350:26
                                        _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:596:18
                                        collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:28
                                        _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:571:19
                                        _enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:605:18
                                        _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:636:18
                                        init@resource:///org/gnome/shell/ui/extensionSystem.js:56:14
                                        _initializeUI@resource:///org/gnome/shell/ui/main.js:268:22
                                        start@resource:///org/gnome/shell/ui/main.js:165:5
                                        @resource:///org/gnome/shell/ui/init.js:6:17
jonian commented 2 years ago

Hi @nobuto-m, thanks for the report. It looks like something has changed in gnome-shell 42. I have to set-up a VM and test it.

nobuto-m commented 2 years ago

gnome-shell version is actually 41.3 here since 42 is not released yet for jammy.

I've localized the issue to the gjs related one. By downgrading gjs related packages by hand, unite started to work again.

$ apt-cache policy gnome-shell
gnome-shell:
  Installed: 41.3-1ubuntu1
  Candidate: 41.3-1ubuntu1
  Version table:
     42~beta-1ubuntu1 400
        400 http://ftp.riken.jp/Linux/ubuntu jammy-proposed/main amd64 Packages
 *** 41.3-1ubuntu1 500
        500 http://ftp.riken.jp/Linux/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

How I've confirmed the downgrade.

$ wget https://launchpad.net/ubuntu/+source/gjs/1.70.1-1/+build/23148091/+files/gjs_1.70.1-1_amd64.deb
$ wget https://launchpad.net/ubuntu/+source/gjs/1.70.1-1/+build/23148091/+files/libgjs0g_1.70.1-1_amd64.deb

$ sudo apt install --allow-downgrades -y ./gjs_1.70.1-1_amd64.deb ./libgjs0g_1.70.1-1_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'gjs' instead of './gjs_1.70.1-1_amd64.deb'
Note, selecting 'libgjs0g' instead of './libgjs0g_1.70.1-1_amd64.deb'
The following package was automatically installed and is no longer required:
  libmozjs-91-0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libmozjs-78-0
The following NEW packages will be installed:
  libmozjs-78-0
The following packages will be DOWNGRADED:
  gjs libgjs0g
0 upgraded, 1 newly installed, 2 downgraded, 0 to remove and 0 not upgraded.
jonian commented 2 years ago

You are right, I checked the gnome-shell 42 code for panel and nothing has changed. I'm looking now at gjs changelog for 1.71.1 but can't find anything related. Thanks for the help!

jonian commented 2 years ago

I did not find any info on how to fix this so I opened an issue on gjs issue tracker here.

plumlis commented 2 years ago

same here. Any progress on fixing this?

tomicakorac commented 2 years ago

My GNOME Shell version is 42.beta and I am facing the same bug.

gonzaarcr commented 2 years ago

I made a version with all the changes for it to work on 42, but I don’t know how is the metodology for a PR. Should I keep compatibility with older versions?

jonian commented 2 years ago

His @gonzaarcr, you can make your PR and we can move current code into overrides folder. This is how compatibility is maintained in this extension. Code for latest version is on main project files while code for older versions goes into overrides folder. This way when we decide to drop support for older versions we just delete files/code from overrides.

Submit your PR and I will move current code later.