pop-os / gnome-shell-extension-system76-power

System76 Power Management Extension
MIT License
88 stars 26 forks source link

JS warning and error on pop-suspend-button #35

Open mehmetaergun opened 4 years ago

mehmetaergun commented 4 years ago

Hardware

Darter Pro darp6

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="18.04 LTS"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

gnome-shell-extension-system76-power:
  Installed: 1.0.0~1561669692~18.04~436b648
  Candidate: 1.0.0~1561669692~18.04~436b648
  Version table:
 *** 1.0.0~1561669692~18.04~436b648 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
       1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main i386 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:

While exploring system logs, I found the following entries. I don't think it has any user impacts, but I am not sure if it impacts anything that I might not be noticing.

I had installed Gnome Tweaks and disabled Suspend wherever I could find (since it does not work properly on darp6), which might be related to this issue.

Jan 17 07:40:54 darp6 gnome-shell[1541]: JS WARNING: [/usr/share/gnome-shell/extensions/pop-suspend-button@system76.com/extension.js 73]: reference to undefined property "_altsuspendAction"
Jan 17 07:40:54 darp6 gnome-shell[1541]: JS ERROR: Exception in callback for signal: open-state-changed: TypeError: this._altsuspendAction is undefined
                                         Extension<.enable/this._menuOpenStateChangedId<@/usr/share/gnome-shell/extensions/pop-suspend-button@system76.com/extension.js:73:17
                                         _emit@resource:///org/gnome/gjs/modules/signals.js:128:27
                                         open@resource:///org/gnome/shell/ui/popupMenu.js:1091:14
                                         wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                         addMenuItem/parentOpenStateChangedId<@resource:///org/gnome/shell/ui/popupMenu.js:667:21
                                         _emit@resource:///org/gnome/gjs/modules/signals.js:128:27
                                         open@resource:///org/gnome/shell/ui/popupMenu.js:880:9
                                         wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                         toggle@resource:///org/gnome/shell/ui/popupMenu.js:755:13
                                         wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                         _onEvent@resource:///org/gnome/shell/ui/panelMenu.js:138:13
                                         wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22

Steps to reproduce (if you know):

Unknown

Expected behavior:

No errors / warnings

Other Notes:

N/A

dingus9 commented 4 years ago

Looks like the same error for me as well

Screenshot from 2020-02-26 18-28-00

ii gnome-shell-extension-system76-power 1.2.0~1577990235~19.10~5253c21

mmstick commented 4 years ago

That error is from the suspend button extension. There should be an error from system76-power's extension if it's failing to initialize.

marksumm commented 3 years ago

Are these two extensions mutually exclusive? On my system, the situation is reversed i.e. "System76 power" is enabled and "Suspend button" cannot initialise.