Skip to content
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

Not compatible with Gnome 3.24 #55

Open
ikuraj opened this issue May 20, 2017 · 12 comments
Open

Not compatible with Gnome 3.24 #55

ikuraj opened this issue May 20, 2017 · 12 comments

Comments

@ikuraj
Copy link

ikuraj commented May 20, 2017

The extension does not work with Gnome 3.24. (On Arch Linux, package gnome-shell 3.24.1+2+g45c2627d4-1.) It seems that updating the version in metadata.json cannot help either. The extensions throws the following error:

gnome-shell[638]: JS ERROR: Exception in callback for signal: extension-found: TypeError: redeclaration of let i
                                                 @/usr/share/gnome-shell/extensions/[email protected]/extension.js:50:7
                                                 initExtension@resource:///org/gnome/shell/ui/extensionSystem.js:221:5
                                                 loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:168:18
                                                 _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:304:9
                                                 _emit@resource:///org/gnome/gjs/modules/signals.js:126:27
                                                 ExtensionFinder<._loadExtension@resource:///org/gnome/shell/misc/extensionUtils.js:184:9
                                                 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                                 bind/<@resource:///org/gnome/gjs/modules/lang.js:95:16
                                                 collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:1
                                                 ExtensionFinder<.scanExtensions@resource:///org/gnome/shell/misc/extensionUtils.js:189:9
                                                 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                                 _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:306:5
                                                 enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:314:9
                                                 _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:345:9
                                                 init@resource:///org/gnome/shell/ui/extensionSystem.js:353:5
                                                 _initializeUI@resource:///org/gnome/shell/ui/main.js:219:5
                                                 start@resource:///org/gnome/shell/ui/main.js:127:5
                                                 @<main>:1:31

It seems GJS was updated, as reported here; gjs changelog.

Can the extension be easily fixed, i.e. modified to accommodate these changes? If not, is it possible for the author to describe how the extension works, so that the community (including myself) can step in and try to make the extension work?

@diaevd
Copy link

diaevd commented Jun 1, 2017

Author is unavailable for us :(. You can fix it easily by yourself. Unfortunately I do not have gnome 3.24 to do this myself.

@ikuraj
Copy link
Author

ikuraj commented Jun 1, 2017

I see. I am indeed a programmer so that sounds quite plausible; I would be happy to fix this. However, I have no knowledge about the Gnome framework and how this extension achieves its effect (thus the question I asked at the end in the previous message). (I am also pretty bad with Javascript, but I guess that's would be a minor issue.)

Do you have any suggestions? More specifically, about how the extension works (useful also for some sort of documentation), what needs to be changed, etc.

@DuBistKomisch
Copy link

I'm not familiar with GNOME development either, but managed to fix it in #57, since it was just a simple JS error (something I am unfortunately familiar with).

Until the maintainer updates the extensions page, you can just:

git clone https://github.com/DuBistKomisch/GnomeExtensionMaximusTwo
cd GnomeExtensionMaximusTwo
git checkout fix/let-i
cp -r maximus-two\@wilfinitlike.gmail.com/ ~/.local/share/gnome-shell/extensions/

and restart GNOME.

P.S. From what I've read, the version in the metadata.json isn't checked nowadays so it won't make a difference.

@ikuraj
Copy link
Author

ikuraj commented Aug 23, 2017

Interestingly enough, after installing the version with your fix, the tweak tool reports "Error loading extension" while the extension seems to be working properly (removing the title bar).

Moreover, there are some errors in the log (from journalctl), which are appearing repeatedly:

gnome-shell[585]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/decoration.js 153]: assignment to undeclared variable pid
gnome-shell[585]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/decoration.js 153]: assignment to undeclared variable success
gnome-shell[585]: [maximus-two]: Can't find original state for avant-window-navigator with id 0x2c00004


gnome-shell[582]: Extension "[email protected]" had error: Error: No signal 'maximize' on object 'ShellWM'
gnome-shell[582]: gsignal.c:2641: instance '0x5642f7da79a0' has no handler with id '188312'
gnome-shell[582]: Attempting to remove actor of type 'StLabel' from group of class 'ShellGenericContainer', but the container is not the actor's parent.

Not sure if the last two are related to the extension though.

The error (during loading) is probably this one:

gnome-shell[598]: JS ERROR: Exception in callback for signal: extension-found: TypeError: redeclaration of let i
                                                 @/usr/share/gnome-shell/extensions/[email protected]/extension.js:50:7
                                                 initExtension@resource:///org/gnome/shell/ui/extensionSystem.js:221:5
                                                 loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:168:18
                                                 _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:312:9
                                                 _emit@resource:///org/gnome/gjs/modules/signals.js:126:27
                                                 ExtensionFinder<._loadExtension@resource:///org/gnome/shell/misc/extensionUtils.js:184:9
                                                 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                                 bind/<@resource:///org/gnome/gjs/modules/lang.js:95:16
                                                 collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:1
                                                 ExtensionFinder<.scanExtensions@resource:///org/gnome/shell/misc/extensionUtils.js:189:9
                                                 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                                 _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:314:5
                                                 enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:322:9
                                                 _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:353:9
                                                 init@resource:///org/gnome/shell/ui/extensionSystem.js:361:5
                                                 _initializeUI@resource:///org/gnome/shell/ui/main.js:219:5
                                                 start@resource:///org/gnome/shell/ui/main.js:127:5
                                                 @<main>:1:31

@DuBistKomisch
Copy link

DuBistKomisch commented Aug 23, 2017

I didn't notice that since it seemed to work fine, but you're right, I also get:

gnome-shell[719]: Extension "[email protected]" had error: Error: No signal 'maximize' on object 'ShellWM'
gnome-shell[719]: [maximus-two]: Can't find original state for gnome-shell with id 0x40000b
gnome-shell[719]: JS WARNING: [/home/jake/.local/share/gnome-shell/extensions/[email protected]/decoration.js 153]: assignment to undeclared variable success            
gnome-shell[719]: JS WARNING: [/home/jake/.local/share/gnome-shell/extensions/[email protected]/decoration.js 153]: assignment to undeclared variable pid

I've added a fix for the last two JS warnings on my branch/PR, but I don't think they make a difference.

I think "can't find previous state" is normal operation.

The first one is probably what's causing the error to show up, seems like there's no maximize signal according to the docs, as used here. I don't think I know enough to fix this and it seems to function fine anyway, but you can probably just comment it out if you want to get rid of the error state.

That big error is the one I already fixed, you're probably looking at logs for an old session (given the different pid).

@DuBistKomisch
Copy link

DuBistKomisch commented Aug 23, 2017

After a little digging, looks like they replaced the maximize signal with size-changed since 3.18. Seems like it's covered in #42 and even has a fixed branch already, just need someone to merge all the fixes together! I'll open a PR with my fixes on @danielkza's fork I guess.

In the mean time I've merged them all together into master on my fork, so you can use that.

@ikuraj
Copy link
Author

ikuraj commented Aug 25, 2017

I see. Sounds good. You are right, looks like it's time to merge.

@diaevd
Copy link

diaevd commented Feb 6, 2018

@ivankuraj - because i'm upgraded to 3.26 i'm fix my local repo for extention https://github.com/diaevd/GnomeExtensionMaximusTwo - it's workin for me

@ikuraj
Copy link
Author

ikuraj commented Feb 23, 2018

Thanks. It's indeed working fine now. (Installed from your repo @diaevd.) It would be great to somehow consolidate and merge these.

@diaevd
Copy link

diaevd commented Mar 6, 2018

@ivankuraj - my repo always is actualy while i'm upgrade my shell first what i do - fix code ;)
but author is unavailable and we can't merge fixes to main repo :(

@diaevd
Copy link

diaevd commented Mar 9, 2018

@ivankuraj - we can publish our version on shell extentions. you can link with me by email (diaevd at gmail.com) if you think that this makes sense

@diaevd
Copy link

diaevd commented Nov 11, 2018

I published fix for support 3.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants