Closed DirkHoffmann closed 4 years ago
If I try installing it via extensions.gnome.org I am getting an error...
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".
Archive: /tmp/QCQFH0.shell-extension.zip
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/stylesheet.css
creating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/
creating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/nl/LC_MESSAGES/
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/pl/LC_MESSAGES/hamster-shell-extension.po
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/pt-BR/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/README.md
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/pt-BR/LC_MESSAGES/hamster-shell-extension.po
creating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/de/LC_MESSAGES/
creating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/es/LC_MESSAGES/
creating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/cs/LC_MESSAGES/
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/ru/LC_MESSAGES/hamster-shell-extension.po
creating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/images/
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/de/LC_MESSAGES/hamster-shell-extension.po
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/ru/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/cs/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/cs/LC_MESSAGES/hamster-shell-extension.po
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/fr/LC_MESSAGES/hamster-shell-extension.po
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/schemas/org.gnome.shell.extensions.project-hamster.gschema.xml
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/stuff.js
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/es/LC_MESSAGES/hamster-shell-extension.po
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/pl/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/schemas/gschemas.compiled
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/build.sh
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/convenience.js
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/nl/LC_MESSAGES/hamster-shell-extension.po
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/fr/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/extension.js
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/CHANGES
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/prefs.js
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/images/hamster-idle-symbolic.svg
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/nl/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/es/LC_MESSAGES/hamster-shell-extension.mo
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/images/hamster-tracking-symbolic.svg
inflating: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/locale/de/LC_MESSAGES/hamster-shell-extension.mo
extracting: ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/metadata.json
Mar 10 21:02:53: JS ERROR: Extension hamster_sufiyan@projecthamster.wordpress.com: SyntaxError: redeclaration of let fact @ ~/.local/share/gnome-shell/extensions/hamster_sufiyan@projecthamster.wordpress.com/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.
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?
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!
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?
@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.
@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 contact@projecthamster.org: 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/contact@projecthamster.org/widgets/ongoingFactEntry.js:42:32
@/home/aljaz/.local/share/gnome-shell/extensions/contact@projecthamster.org/widgets/factsBox.js:36:26
@/home/aljaz/.local/share/gnome-shell/extensions/contact@projecthamster.org/widgets/panelWidget.js:36:18
@/home/aljaz/.local/share/gnome-shell/extensions/contact@projecthamster.org/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.
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.
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.
@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.
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 :wink:). You will also need to logoff/login with wayland, as the Ctrl-F2+R restart of ghone-shell does not work there.
@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/jasuarez@projecthamster.org/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/jasuarez@projecthamster.org/widgets/todaysFactsWidget.js:49:29
_init@~/.local/share/gnome-shell/extensions/jasuarez@projecthamster.org/widgets/factsBox.js:75:34
_init@~/.local/share/gnome-shell/extensions/jasuarez@projecthamster.org/widgets/panelWidget.js:104:25
deferred_enable@~/.local/share/gnome-shell/extensions/jasuarez@projecthamster.org/extension.js:148:28
enable/<@~/.local/share/gnome-shell/extensions/jasuarez@projecthamster.org/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/*
This seems to affect other extensions, too.
@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({}),
intodaysFactsWidget.js
? (i.e. insert an empty hash as argument)?
@mwilck I did the change and tried to disable and enable the extension and get the following error:
gnome-shell[1277]: JS ERROR: Extension contact@projecthamster.org: TypeError: this.panelWidget is null
_removeWidget@~/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:262:13
disable@~/.local/share/gnome-shell/extensions/contact@projecthamster.org/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
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.
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.
Stack:
disable@/home/mwilck/.local/share/gnome-shell/extensions/contact@projecthamster.o>
_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.
It looks as if the GNOME shell checks https://extensions.gnome.org/extension-info and obtains the info that contact@projecthamster.org
is blacklisted.
@elbenfreund, have you done something to set our extension to "blacklisted" on extensions.gnome.org? I just tried to change the UUID from contact@projecthamster.org
to something else and whoa, it works!
@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.
@xMordax , please check out #323. Note the special instructions.
@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 extension@projecthamster.org
, and it works fine.
Note this is still work in progress, I used gnome-shell-3.35.92. Your feedback would be very welcome.
The GNOME shell code that's responsible for auto-disabling and deleting the extension contact@projecthamster.org
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 contact@projecthamster.org
UUID (@elbenfreund's extension is still listed with the old UUID hamster@projecthamster.wordpress.com
, 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.
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...
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:
disable_version_validation
is true, grab_proper_extension_version
should never return None
(unless no shell versions are supported by any extension version). See https://gitlab.gnome.org/Infrastructure/extensions-web/-/blob/master/sweettooth/extensions/views.py#L48-81 You did have disable_version_validation
set, right?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 contact@projecthamster.org
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 :+1: 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.
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.
as no extension with the contact@projecthamster.org 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/?uuid=contact@projecthamster.org returns 404 and https://extensions.gnome.org/extension-query/?uuid=contact@projecthamster.org 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:%22contact@projecthamster.org%22}}
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 extension@projecthamster.org
, 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.
@mwilck I checked out your branch and followed the instructions and it works on Arch GNOME 3.36 with Wayland...
@xMordax , thanks a lot for the feedback. Stay, tuned, we'll continue looking into the "blacklilst" issue.
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.
@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.
@mwilck I just opened #324, lets move the blacklist discussion there to prevent further clutter of this issue :-)
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!
Fixed with the merge of #323.
Originally posted by @mwilck in https://github.com/projecthamster/hamster-shell-extension/issues/319#issuecomment-593486468
Please feel free to add any (positive or negative) feedback here.