cinatic / stocks-extension

A extension to display stock quotes in GNOME Shell Panel
GNU General Public License v3.0
84 stars 31 forks source link

Crash in Gnome 42.9 (Ubuntu 22.04.4) #100

Closed philsf closed 6 months ago

philsf commented 6 months ago

Extension version v32 (used from #93) has the following stack trace:

The settings of extension stocks@infinicode.de had an error:

SyntaxError: import declarations may only appear at top level of a module

Stack trace:

_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:23:33
ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:10:4
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:129:33
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:186:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:22:13
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
start@resource:///org/gnome/gjs/modules/script/package.js:190:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
philsf commented 6 months ago

Installing v33 from githug triggers an upgrade (??) that reverts to the latest upstream version (v24), at which point I lose the fix for the yahoo source.

cinatic commented 6 months ago

v33 is for Gnome Shell Version 45 and later, you could try https://github.com/cinatic/stocks-extension/releases/tag/v24.2-GS42 which is for GS 42. But according to your error message it looks like you already have es6 imports in GS 42.9 which is strange but maybe it has been merged back or something.

if however v33 is working for your 42.9 installation, than just add "42" to the "shell-versions" in the metadata.json inside the zip package or in your installation path, then gnome shouldn't override it anymore

philsf commented 6 months ago

I can confirm that manually installing v24.2 works for me. Thanks!