shyzus / gnome-shell-extension-screen-autorotate

Enable screen rotation regardless of touch mode
GNU General Public License v3.0
30 stars 9 forks source link

Gnome Extension Manager showing error #38

Closed astro-ray closed 2 weeks ago

astro-ray commented 2 weeks ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. open gnome extension manager
  2. turn on the extention
  3. gnome extension manager shows error

Expected behavior The extension should run when turned on

Screenshots Screenshot from 2024-08-28 12-42-12

Desktop (please complete the following information):

Additional context I installed the extension from gnome extension manager

Relevant logs (please use a tool like fpaste or a service like pastebin.) Place a link here or the logs themselves if they are less than 50 lines.

Aug 28 12:40:14 fedora gnome-shell[2383]: Need keyval or commitString
Aug 28 12:41:05 fedora gnome-shell[2383]: Need keyval or commitString
Aug 28 12:41:10 fedora gnome-shell[2383]: Need keyval or commitString
Aug 28 12:41:43 fedora gnome-shell[2383]: Need keyval or commitString
Aug 28 12:47:26 fedora gnome-shell[2383]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
Aug 28 12:52:31 fedora gnome-shell[2383]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
Aug 28 12:57:26 fedora gnome-shell[2383]: JS ERROR: TypeError: this.actor is null
                                          _syncEnabled@resource:///org/gnome/shell/ui/windowManager.js:145:25
                                          onStopped@resource:///org/gnome/shell/ui/windowManager.js:157:35
                                          _makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:65:22
                                          _easeActorProperty/<@resource:///org/gnome/shell/ui/environment.js:232:60
                                          _destroyWindowDone@resource:///org/gnome/shell/ui/windowManager.js:1607:21
                                          onStopped@resource:///org/gnome/shell/ui/windowManager.js:1575:39
                                          _makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:65:22
                                          _easeActor/<@resource:///org/gnome/shell/ui/environment.js:154:64
                                          @resource:///org/gnome/shell/ui/init.js:21:20
Aug 28 12:57:55 fedora gnome-shell[2383]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
Aug 28 12:58:44 fedora gnome-shell[2383]: libinput error: event5  - DELL0A8C:00 06CB:CE26 Touchpad: kernel bug: Touch jump detected and discarded.
Aug 28 12:58:44 fedora gnome-shell[2383]: See https://wayland.freedesktop.org/libinput/doc/1.26.2/touchpad-jumping-cursors.html for details
shyzus commented 2 weeks ago

@astro-ray Thanks for creating this issue. I have been looking into it and trying to reproduce it but can't seem to be able to.

What I would like to suggest to do next. I will create a new branch for this issue that will include some additional debug logs to see what the state of this.flipIndicator is at different parts of the extension.

shyzus commented 2 weeks ago

Do the following below to use this new branch on your machine.

git clone https://github.com/shyzus/gnome-shell-extension-screen-autorotate.git
cd gnome-shell-extension-screen-autorotate
git switch 38-gnome-extension-manager-showing-error
cp -r screen-rotate@shyzus.github.io ~/.local/share/gnome-shell/extensions

then log out and log back in to see the changes applied. The logs created up until the point it errors again should provide some more insights into what is causing this.

cameronaw13 commented 2 weeks ago

I'm getting the same error as well, here's my journalctl log:

gnome-shell[11412]: Archive:  /tmp/1X83S2.shell-extension.zip
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/displayConfigState.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/extension.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/logicalMonitor.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/manualOrientationIndicator.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/manualOrientationMenuToggle.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/monitor.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/orientation.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/prefs.js
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/rotator.js
gnome-shell[11412]:    creating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/schemas/
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/schemas/gschemas.compiled
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/schemas/org.gnome.shell.extensions.screen-rotate.gschema.xml
gnome-shell[11412]:   inflating: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/sensorProxy.js
gnome-shell[11412]:  extracting: /home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/metadata.json
gnome-shell[9801]: Extension screen-rotate@shyzus.github.io: TypeError: this.flipIndicator is undefined
                                                     _remove_manual_flip@file:///home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/extension.js:118:7
                                                     enable@file:///home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/extension.js:72:12
shyzus commented 2 weeks ago

@cameronaw13 Thanks for chiming in. I see your output includes the offending lines of code. That cause this. Give me some time to push an update to the branch attached to this issue and see if that fixed this.

shyzus commented 2 weeks ago

I believe I found and fixed the issue. Please try the branch attached to this issue and verify if this also applies to your machines.

cameronaw13 commented 2 weeks ago

Seems that the extension doesn't crash anymore but, whenever I enable the auto-rotate toggle it shows this error:

gnome-shell[22143]: JS ERROR: TypeError: this.toggle is not a function
                                                    _orientation_lock_changed@file:///home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/extension.js:170:12
                                                    createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:730:46
                                                    activateLockOrientation@resource:///org/gnome/shell/misc/systemActions.js:416:35
                                                    _init/<@resource:///org/gnome/shell/ui/status/autoRotate.js:34:39
                                                    @resource:///org/gnome/shell/ui/init.js:21:20

Manual rotate still works though

shyzus commented 2 weeks ago

In the mean time il invalidate v22 from extensions.gnome.org so people aren't affected by this until its fixed.

shyzus commented 2 weeks ago

Seems that the extension doesn't crash anymore but, whenever I enable the auto-rotate toggle it shows this error:

gnome-shell[22143]: JS ERROR: TypeError: this.toggle is not a function
                                                    _orientation_lock_changed@file:///home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/extension.js:170:12
                                                    createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:730:46
                                                    activateLockOrientation@resource:///org/gnome/shell/misc/systemActions.js:416:35
                                                    _init/<@resource:///org/gnome/shell/ui/status/autoRotate.js:34:39
                                                    @resource:///org/gnome/shell/ui/init.js:21:20

Manual rotate still works though

Should now be fixed in the new branch. This appears to be caused by a function call not being refactored correctly.

cameronaw13 commented 2 weeks ago

Seems that the extension doesn't crash anymore but, whenever I enable the auto-rotate toggle it shows this error:

gnome-shell[22143]: JS ERROR: TypeError: this.toggle is not a function
                                                    _orientation_lock_changed@file:///home/cameron/.local/share/gnome-shell/extensions/screen-rotate@shyzus.github.io/extension.js:170:12
                                                    createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:730:46
                                                    activateLockOrientation@resource:///org/gnome/shell/misc/systemActions.js:416:35
                                                    _init/<@resource:///org/gnome/shell/ui/status/autoRotate.js:34:39
                                                    @resource:///org/gnome/shell/ui/init.js:21:20

Manual rotate still works though

Should now be fixed in the new branch. This appears to be caused by a function call not being refactored correctly.

Cool seems to work for me now