joaocandre / sticky-notes-integration

Gnome Shell extension providing integration for Sticky Notes
GNU General Public License v2.0
6 stars 1 forks source link

Error in Gnome 46 #2

Open aidanlw505 opened 2 months ago

aidanlw505 commented 2 months ago

I get this error

TypeError: (intermediate value)(...) is null

Stack trace:
  @file:///home/username/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/globals.js:15:19
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
isaacItz commented 2 months ago

Same problem in Gnome 46

I solved the issue by changing line 15 from /home/$USER/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/globals.js

to 'version': execute('flatpak run com.vixalien.sticky -v').split('\n')[0].slice(0, 6),

Also make sure you have installed the sticky notes flatpak

https://flathub.org/apps/com.vixalien.sticky

Otherwise it won't work

joaocandre commented 2 months ago

What OS and version of Sticky Notes are you using? I only really tested with Archlinux and version 0.2.5, and it raises no issue.

It shouldn't matter how you install it, as long as the binary is available on system's path. Perhaps it has a different name? You can try running 'com.vixalien.sticky -v' or 'sticky-notes -v' on the command line to check. Flatpak sandboxes the app, so that may be the root of the issue.

isaacItz commented 2 months ago

How did you install the Sticky Notes app? could you share the repo? or you used AUR?

I used this flatpak, but I think the extension looking for the process directly on the pc, not inside a flatpak.

joaocandre commented 2 months ago

Yes, I used the AUR, and I usually don't use Flatpak, hence why I didn't consider this possiblity.

I've updated the code (cf. 22274de) and patched the latest version (0.1.2) to disable version checking unless the binary is available; it should fix the issue in flatpak installations.

But some of the extension functionality (launching and creating new notes for instance) are predicated upon that, so I'm guessing those features do not work in your case?

anika200 commented 2 months ago

Getting the same error on Ubuntu 24.04 with Gnome 46 , I used extension manager to install from the desktop.

joaocandre commented 2 months ago

I only updated the version on the extensions website today, version 0.1.2 should be available now.

Jalaliozz commented 1 month ago

My knowledge of javascript and all that is basically zero so I apologize if what I say is useless.

I'm having a similar issue. Installed with FlatPak on Ubuntu Gome 46 and getting the error:

ReferenceError: is_available is not defined

Stack trace:
  @file:///home/username/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/globals.js:15:5
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

This may not be relevant but I found the "note-path' for the flatpak version:

/home/username/.var/app/com.vixalien.sticky/data/com.vixalien.sticky/notes​​​

I thought changing it in globals.js would do something but it didn't.

Last thing again probably irrelevant but the process name for the flatpak version is com.vixalien.st not com.vixalien.sticky

Any advice on fixing? Really would like to use this extension!

joaocandre commented 1 month ago

@Jalaliozz Thanks, I'll look into it.

The current issue is being caused by a missed line during the last commit, I'll fix it ASAP.

But knowing the process name in Flatpak installs is useful regardless.

avantbored commented 1 month ago

Gnome 46 on Arch 6.10 here too.

Similar error:


Stack trace:
  @file:///home/avantbored/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/globals.js:15:5
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
rudhra97 commented 1 month ago

facing the same error here, not resolved yet?

joaocandre commented 1 month ago

Should be fixed by now, v0.1.3 available on Gnome Extensions.

It attempts to id the available process and fetch the app version, but in case it fails the extension should still provide minimal functionality. Some of the features (e.g. creating a new note) may not work well in sandboxed installations such as Flatpak, will address that in the future.

avantbored commented 1 month ago

Thank you for your prompt attention! Functionality confirmed.

Jalaliozz commented 1 month ago

@joaocandre I'm using the flatpak version. Clicking Launch or New Note does nothing if the application isn't open. Clicking New Note when it is open closes the application. All other quick actions work great (being able to cycle back and forth would be nice for the scroll wheel).

Could the Launch issue be due to a different launch command? I have to use flatpak run com.vixalien.sticky in gnome's global keyboard shortcuts.

Also have this error in the extension's preferences:

Error: Argument program may not be null

Stack trace:
  is_available@file:///home/username/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/utils.js:145:25

  fillPreferencesWindow@file:///home/username/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/prefs.js:163:14

  _loadPrefs@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:41:18

  async*_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:26:14

  ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:17:4

  OpenExtensionPrefsAsync@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:139:33

  async*_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:373:35

  _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34

  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
cristobal87 commented 1 month ago

@joaocandre I'm using the flatpak version. Clicking Launch or New Note does nothing if the application isn't open. Clicking New Note when it is open closes the application. All other quick actions work great (being able to cycle back and forth would be nice for the scroll wheel).

Could the Launch issue be due to a different launch command? I have to use flatpak run com.vixalien.sticky in gnome's global keyboard shortcuts.

Also have this error in the extension's preferences:

Error: Argument program may not be null

Stack trace:
  is_available@file:///home/jzakaria/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/utils.js:145:25

  fillPreferencesWindow@file:///home/jzakaria/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/prefs.js:163:14

  _loadPrefs@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:41:18

  async*_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:26:14

  ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:17:4

  OpenExtensionPrefsAsync@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:139:33

  async*_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:373:35

  _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34

  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Hi,

Same here. I am on fedora 40, GNOME 46

Cheers

hernan32 commented 3 weeks ago

The settings of extension sticky-notes-integration@joaocandre had an error:

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

Stack trace:

_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
rudhra97 commented 3 weeks ago

Same here!!

The settings of extension sticky-notes-integration@joaocandre had an error:

Error: Argument program may not be null

Stack trace:
  is_available@file:///home/rudra/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/lib/utils.js:145:25
  fillPreferencesWindow@file:///home/rudra/.local/share/gnome-shell/extensions/sticky-notes-integration@joaocandre/prefs.js:163:14
  _loadPrefs@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:41:18
  async*_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:26:14
  ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:17:4
  OpenExtensionPrefsAsync@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:139:33
  async*_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:373:35
  _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34