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

Test under gnome-shell 3.36 needed #321

Closed
DirkHoffmann opened this issue Mar 3, 2020 · 39 comments
Closed

Test under gnome-shell 3.36 needed #321

DirkHoffmann opened this issue Mar 3, 2020 · 39 comments
Labels
testing Label for issues related to tesing (e2e, unit, ...)

Comments

@DirkHoffmann
Copy link
Member

Originally posted by @mwilck in #319 (comment)

3.36: Ubuntu 20.04 LTS

Do we have any information whether our 3.34 code works with 3.36?

Please feel free to add any (positive or negative) feedback here.

@elbenfreund elbenfreund added the testing Label for issues related to tesing (e2e, unit, ...) label Mar 6, 2020
@mordax7
Copy link

mordax7 commented Mar 10, 2020

If I try installing it via extensions.gnome.org I am getting an error...

@mwilck
Copy link
Contributor

mwilck commented Mar 10, 2020

If I try installing it via extensions.gnome.org I am getting an error...

E.G.O. is out of date. Please install from source, as described in README.rst. And if you want someone to fix it, please provide logs (journalctl --user -b) rather then just saying "I'm getting an error".

@mordax7
Copy link

mordax7 commented Mar 10, 2020

Archive:  /tmp/QCQFH0.shell-extension.zip
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/stylesheet.css
   creating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/
   creating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/nl/LC_MESSAGES/
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/pl/LC_MESSAGES/hamster-shell-extension.po
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/pt-BR/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/README.md
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/pt-BR/LC_MESSAGES/hamster-shell-extension.po
   creating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/
   creating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/es/LC_MESSAGES/
   creating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/cs/LC_MESSAGES/
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/ru/LC_MESSAGES/hamster-shell-extension.po
   creating: ~/.local/share/gnome-shell/extensions/[email protected]/images/
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/hamster-shell-extension.po
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/ru/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/cs/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/cs/LC_MESSAGES/hamster-shell-extension.po
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/fr/LC_MESSAGES/hamster-shell-extension.po
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/schemas/org.gnome.shell.extensions.project-hamster.gschema.xml
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/stuff.js
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/es/LC_MESSAGES/hamster-shell-extension.po
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/pl/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/schemas/gschemas.compiled
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/build.sh
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/convenience.js
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/nl/LC_MESSAGES/hamster-shell-extension.po
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/fr/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/extension.js
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/CHANGES
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/prefs.js
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/images/hamster-idle-symbolic.svg
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/nl/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/es/LC_MESSAGES/hamster-shell-extension.mo
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/images/hamster-tracking-symbolic.svg
  inflating: ~/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/hamster-shell-extension.mo
 extracting: ~/.local/share/gnome-shell/extensions/[email protected]/metadata.json
Mar 10 21:02:53: JS ERROR: Extension [email protected]: SyntaxError: redeclaration of let fact @ ~/.local/share/gnome-shell/extensions/[email protected]/extension.js:367

I thought that the problem was known, therefore I was not posting any Error logs.

Would be nice to have it installed via the official extensions page.

@mwilck
Copy link
Contributor

mwilck commented Mar 10, 2020

Could you try the code from #316, please, my master branch? It seems you were using sufiyan's version from E.G.O. I said already, it's outdated. If you must try E.G.O, please use @jasuarez' version, it's the one that's closest to our code here.

Would be nice to have it installed via the official extensions page.

Sure. We're actively working on it. See #316. GNOME 3.36 support is currently the open question, thus this issue. Are you using 3.36?

@DirkHoffmann
Copy link
Member Author

I thought that the problem was known, therefore I was not posting any Error logs.

Hello @xMordax,
First of all thanks for answering to this call. It is what is stated above: An open question to 3.36 users, if the present latest version of code (which works for 3.34 as far as we know) works on 3.36.
Hence it would help us, if you could make firm statements on both (3.36 and code from @mwilck's repository).

For your information (and that of others):

Looking forward to your further feedback!

@mordax7
Copy link

mordax7 commented Mar 11, 2020

Hey @mwilck @DirkHoffmann,

first of all, thanks for your responses. Yes I am using 3.36, when I try to install the @mwilck fix I am getting the following error:

$ make dist
rm -fr build
mkdir -p build
cp -R extension/* build
cp -R data/* build
wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/master/lib/convenience.js -O build/convenience.js
--2020-03-11 07:38:07--  https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/master/lib/convenience.js
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving gitlab.gnome.org (gitlab.gnome.org)... 209.132.180.181
Connecting to gitlab.gnome.org (gitlab.gnome.org)|209.132.180.181|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-03-11 07:38:08 ERROR 404: Not Found.

make: *** [Makefile:59: collect] Error 8

Any Idea why?

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@xMordax,

Any Idea why?

Because you are using some other code, not mine.

wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/master /lib/convenience.js -O build/convenience.js

This is not code from my master branch. This code has been removed in two steps, first eea1424, and then 52dd4c1.

@mordax7
Copy link

mordax7 commented Mar 11, 2020

@mwilck
Sorry about that, I made sure that I used your branch and was able to build it, but the installation failed with this error:

gnome-shell[1304]: JS ERROR: Extension [email protected]: Error: Type name Gjs_widgets_ongoingFactEntry_OngoingFactEntry is already registered
                                                    _init/GObject.Object._classInit@resource:///org/gnome/gjs/modules/core/overrides/GObject.js:448:27
                                                    registerClass@resource:///org/gnome/gjs/modules/core/overrides/GObject.js:94:22
                                                    @/home/aljaz/.local/share/gnome-shell/extensions/[email protected]/widgets/ongoingFactEntry.js:42:32
                                                    @/home/aljaz/.local/share/gnome-shell/extensions/[email protected]/widgets/factsBox.js:36:26
                                                    @/home/aljaz/.local/share/gnome-shell/extensions/[email protected]/widgets/panelWidget.js:36:18
                                                    @/home/aljaz/.local/share/gnome-shell/extensions/[email protected]/extension.js:35:21
                                                    _callExtensionInit@resource:///org/gnome/shell/ui/extensionSystem.js:374:13
                                                    loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:308:27
                                                    _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:536:18
                                                    collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:17
                                                    _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:515:19
                                                    _enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:545:18
                                                    _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:576:18
                                                    init@resource:///org/gnome/shell/ui/extensionSystem.js:54:14
                                                    _initializeUI@resource:///org/gnome/shell/ui/main.js:244:22
                                                    start@resource:///org/gnome/shell/ui/main.js:138:5
                                                    @<main>:1:47

maybe as a side note, I am using Wayland.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

Thanks, this looks much more helpful. The error message that matters is this:

 Error: Type name Gjs_widgets_ongoingFactEntry_OngoingFactEntry is already registered

I don't think Wayland matters here. It's yet another JS incompatibilty.

@matthijskooijman
Copy link
Member

Could the problem be that the older extension is still installed? If it is one from ego, it might have a different id so not be removed when installing this one? Just guessing here, though.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@matthijskooijman, good hint. @xMordax, please make sure you wipe the old extension(s) you had used, at least temporarily, and cleanly restart the GNOME shell.

@DirkHoffmann
Copy link
Member Author

I don't think Wayland matters here.

Right. I am using wayland (and gnome-shell 3.34). It's without problems for me.

It's yet another JS incompatibilty.

You mean it is an update in gnome-shell 3.36, which makes another update on our (hamster-extension) side necessary?

Could the problem be that the older extension is still installed?

Good point! @xMordax, you may want to manually remove all hamster extensions from your $HOME/.local/share/gnome-shell/extensions/ (eventually move them to another place rather than remove, but I guess you know what "backup" means 😉). You will also need to logoff/login with wayland, as the Ctrl-F2+R restart of ghone-shell does not work there.

@mordax7
Copy link

mordax7 commented Mar 11, 2020

@mwilck @DirkHoffmann
I removed all the relevant extensions rebooted my system installed as it is described in the README and rebooted once more, this is what I get in the logs:

gnome-shell[1244]: JS WARNING: [~/.local/share/gnome-shell/extensions/[email protected]/widgets/todaysFactsWidget.js 49]: reference to undefined property "TableLayout"
gnome-shell[1244]: JS ERROR: TypeError: Clutter.TableLayout is not a constructor
                                                                _init@~/.local/share/gnome-shell/extensions/[email protected]/widgets/todaysFactsWidget.js:49:29
                                                                _init@~/.local/share/gnome-shell/extensions/[email protected]/widgets/factsBox.js:75:34
                                                                _init@~/.local/share/gnome-shell/extensions/[email protected]/widgets/panelWidget.js:104:25
                                                                deferred_enable@~/.local/share/gnome-shell/extensions/[email protected]/extension.js:148:28
                                                                enable/<@~/.local/share/gnome-shell/extensions/[email protected]/extension.js:131:10
                                                                _makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:262:21
gnome-software[1498]: failed to create an app for user/*/extensions-web/shell-extension/contact_projecthamster.org/*

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

This seems to affect other extensions, too.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@xMordax, this is just a shot in the dark, but could you try replacing

layout_manager: new Clutter.TableLayout(),

with

layout_manager: new Clutter.TableLayout({}),

in todaysFactsWidget.js? (i.e. insert an empty hash as argument)?

@mordax7
Copy link

mordax7 commented Mar 11, 2020

@mwilck I did the change and tried to disable and enable the extension and get the following error:

gnome-shell[1277]: JS ERROR: Extension [email protected]: TypeError: this.panelWidget is null
_removeWidget@~/.local/share/gnome-shell/extensions/[email protected]/extension.js:262:13
disable@~/.local/share/gnome-shell/extensions/[email protected]/extension.js:195:14
_callExtensionDisable@resource:///org/gnome/shell/ui/extensionSystem.js:107:32
_onEnabledExtensionsChanged/<@resource:///org/gnome/shell/ui/extensionSystem.js:454:18
_onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:453:21
gnome-software[1482]: contact_projecthamster.org has error: TypeError: this.panelWidget is null

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

Clutter.TableLayout has been depecated. But there's more on the table. I'm on it, updated to GNOME shell 3.35.92 now. This will take time.

It seems that this version of the shell deletes an extension that causes an error from disk. Nice.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

I seem to have fixed two minor issues, so that now I don't observe any error messages from GNOME shell 3.36 regarding the hamster extension any more. I can actually see "no activity" showing up for a moment on the panel. Than it vanishes, and in the log I see only "Shutting down hamster-shell-extension.". After that, my extension directory is wiped from disk. WTH.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

Stack:

  disable@/home/mwilck/.local/share/gnome-shell/extensions/[email protected]>
 _callExtensionDisable@resource:///org/gnome/shell/ui/extensionSystem.js:107:32
 unloadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:325:14
 uninstallExtension@resource:///org/gnome/shell/ui/extensionDownloader.js:55:32
 checkForUpdates/<@resource:///org/gnome/shell/ui/extensionDownloader.js:148:17

So the shell is actively trying to disable our extension.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

It looks as if the GNOME shell checks https://extensions.gnome.org/extension-info and obtains the info that [email protected] is blacklisted.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@elbenfreund, have you done something to set our extension to "blacklisted" on extensions.gnome.org? I just tried to change the UUID from [email protected] to something else and whoa, it works!

@mordax7
Copy link

mordax7 commented Mar 11, 2020

@mwilck can you tell how to change the UUID to get it working? I am getting the same error also after renaming the directory after the uuid configuration in the metadata.json.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@xMordax , please check out #323. Note the special instructions.

@mwilck
Copy link
Contributor

mwilck commented Mar 11, 2020

@mwilck can you tell how to change the UUID to get it working?

Check out #323. Changing the UUID is not all you need to do. In #323, I changed the Makefile to make it possible to change the UUID. I used [email protected], and it works fine.
Note this is still work in progress, I used gnome-shell-3.35.92. Your feedback would be very welcome.

@mwilck
Copy link
Contributor

mwilck commented Mar 12, 2020

The GNOME shell code that's responsible for auto-disabling and deleting the extension [email protected] is in extensionDownloader.js:checkForUpdates(). It sends a message to the https://extensions.gnome.org/extension-info/ including the GNOME shell version, JSON metadata of installed extensions, and the boolean disable-extension-version-validation (which is TRUE in my case). It expects a message back with a JSON dictionary providing actions for each extension UUID. The possible actions are upgrade, downgrade, and blacklist. In the last case, the extension with the given UUID will be disabled and scratched.

So far I've found no human-accessible way to figure out this status information for a given UUID on extensions.gnome.org. Strangely, out of the 4 extensions that are listed on E.G.O. when searching for "hamster", none acutally uses the [email protected] UUID (@elbenfreund's extension is still listed with the old UUID [email protected], and none of the others uses the original UUID).

This leaves me pretty puzzled. I also don't understand why this effect is only observed on GNOME 3.36, as the JS code linked above is anything but new.

@matthijskooijman
Copy link
Member

This leaves me pretty puzzled. I also don't understand why this effect is only observed on GNOME 3.36, as the JS code linked above is anything but new.

Given that you send the gnome-shell version, maybe the online service only returns blacklist for 3.36? If so, then maybe this code is somehow tied in with automated feedback from users? E.g. they can push an extension to users on a newer gnome-shell than is reported supported and when they get errors or problem reports back, the extension is blacklisted or something? It's a bit of a bummer that this also applies to locally installed versions and seems to apply regardless of the extension version...

@matthijskooijman
Copy link
Member

Looking at the client code, that has been in place for 7 years and the discussion about it focuses about the code and updates, so no clue what the blacklist is for: https://bugzilla.gnome.org/show_bug.cgi?id=679099

It sends a message to the extensions.gnome.org/extension-info

It actually sends to https://extensions.gnome.org/update-info/ it seems?

The code for that endpoint is here: https://gitlab.gnome.org/Infrastructure/extensions-web/-/blob/master/sweettooth/extensions/views.py#L111-157

It looks like this can return 'blacklist' when e.g.o has no version available for your shell version, i.e. grab_proper_extension_version returns None (which would be the case with 3.36).

I suspect that the usecase here is when you upgrade from e.g. 3.34 to 3.36, that it can uninstall the extension if it is not supported there.

However, this situation should not actually happen:

@mwilck
Copy link
Contributor

mwilck commented Mar 12, 2020

Given that you send the gnome-shell version, maybe the online service only returns blacklist for 3.36?

I played with the versions first, no success. Then I changed the UUID, immediate success.

If so, then maybe this code is somehow tied in with automated feedback from users?

the question being feedback towards WHAT?, as no extension with the [email protected] UUID appears to exist on E.G.O. currently.

It's a bit of a bummer that this also applies to locally installed versions and seems to apply regardless of the extension version...

Indeed. The first half-a-dozen times my extension dir had been wiped I thought I was dreaming.

It actually sends to https://extensions.gnome.org/update-info/ it seems?

Right, copy-n-paste mistake. Thanks for spotting it.

It looks like this can return 'blacklist' when e.g.o has no version available for your shell version, i.e. grab_proper_extension_version returns None (which would be the case with 3.36).

I suspect that the usecase here is when you upgrade from e.g. 3.34 to 3.36, that it can uninstall the extension if it is not supported there.

Thanks for figuring that out, very helpful 👍 But that has never happened to me before. As you knowl, hamster shell extension has been broken with every new GNOME shell version, but it has never before been auto-uninstalled. Perhaps it's because 3.36 isn't public yet?

However, this situation should not actually happen:
[...]

GNOME bug report ... ?

You did have disable_version_validation set, right?

yes, most definitely. I checked yesterday, and today again, using dconf-editor.

@mwilck
Copy link
Contributor

mwilck commented Mar 12, 2020

Perhaps it's because 3.36 isn't public yet?

Well, it is public now. We don't have it in openSUSE yet though, as I said I was using 3.35.96. Perhaps that explains it, no idea. I'll retest when 3.36 hits openSUSE repos, shouldn't be long any more.

@matthijskooijman
Copy link
Member

as no extension with the [email protected] UUID appears to exist on E.G.O. currently.

Hm, that might be relevant. If the extension exists, but it has no version at all, then that might be the one corner case the triggers disable_version_validation to return None, though that would also mean the version passed is unknown and should be skipped, as I mentioned already.

I tried getting info about the extension through the ajax API, but this failed (https://extensions.gnome.org/extension-info/[email protected] returns 404 and https://extensions.gnome.org/extension-query/[email protected] returns an empty list). Both urls worked with antoher UUID, so the syntax is ok. It looks like this means the uuid is not known at all, or it is an extension with visible=False and/or only invisible versions....

Did you already try dumping the exact parameters used, maybe by adding some prints? I tried reproducing this, but this just returns an empty response as expected: https://extensions.gnome.org/update-info/?shell_version=3.35.92&disable_version_validation=1&installed={%22uuid%22:{%22version%22:%[email protected]%22}}

@mwilck
Copy link
Contributor

mwilck commented Mar 12, 2020

If the extension exists, but it has no version at all, then that might be the one corner case the triggers disable_version_validation to return None, though that would also mean the version passed is unknown and should be skipped, as I mentioned already.

But [email protected], as well as totally random UUID, works.

Both urls worked with antoher UUID, so the syntax is ok. It looks like this means the uuid is not known at all, or it is an extension with visible=False and/or only invisible versions....

Have you found an email address or other possible way to contact the maintainers of the E.G.O. data base and figure it out? I have not, so far.

Did you already try dumping the exact parameters used, maybe by adding some prints?

AFAIK this requires recompiling GNOME shell, so far I shied away from that. strace doesn't work because it's https.

I tried reproducing this, but this just returns an empty response as expected:

Wow, cool. I tried to do this, but I couldn't figure it out.

@mordax7
Copy link

mordax7 commented Mar 13, 2020

@mwilck I checked out your branch and followed the instructions and it works on Arch GNOME 3.36 with Wayland...

@mwilck
Copy link
Contributor

mwilck commented Mar 13, 2020

@xMordax , thanks a lot for the feedback. Stay, tuned, we'll continue looking into the "blacklilst" issue.

@mwilck
Copy link
Contributor

mwilck commented Mar 13, 2020

I updated to GNOME shell 3.36.0 now, and I'm still seeing the same issue with the extension being auto-blacklisted and removed. So using 3.35.96 was not the reason.

@mwilck
Copy link
Contributor

mwilck commented Mar 13, 2020

@matthijskooijman,

did you locally bump the version? Or are you still using a version number that is known by e.g.o?

No, I hadn't changed the version of the extension. But I just tried now (set it to 3.36), and it makes no difference, the extension is still auto-blacklisted.

Typical logs look like this:

Mar 13 12:43:55 apollon.suse.de gnome-shell[4788]: GNOME Shell started at Fri Mar 13 2020 12:43:55 GMT+0100 (CET)
Mar 13 12:43:55 apollon.suse.de gnome-shell[4788]: Registering session with GDM
Mar 13 12:43:55 apollon.suse.de gnome-shell[4788]: Shutting down hamster-shell-extension.

with no visible error messages from the extension before this.

@matthijskooijman
Copy link
Member

@mwilck I just opened #324, lets move the blacklist discussion there to prevent further clutter of this issue :-)

@rhertzog
Copy link
Contributor

FTR, the extension as present in mwilck/GNOME-3.36 is working fine for me in GNOME 3.36 in Debian Unstable. Thanks for your work on this!

@mwilck
Copy link
Contributor

mwilck commented Apr 30, 2020

Fixed with the merge of #323.

@mwilck mwilck closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Label for issues related to tesing (e2e, unit, ...)
Projects
None yet
Development

No branches or pull requests

6 participants